From 376b851909d42c6faf4f780f25b6be55f17f3a6e Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Fri, 20 Dec 2019 22:15:08 +0100 Subject: hppa: Add support for LASI chip with i82596 NIC LASI is a built-in multi-I/O chip which supports serial, parallel, network (Intel i82596 Apricot), sound and other functionalities. LASI has been used in many HP PARISC machines. This patch adds the necessary parts to allow Linux and HP-UX to detect LASI and the network card. Signed-off-by: Helge Deller Signed-off-by: Sven Schnelle Message-Id: <20191220211512.3289-3-svens@stackframe.org> Signed-off-by: Richard Henderson --- hw/hppa/machine.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'hw/hppa/machine.c') diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 5d0de26140..33e3769d0b 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -16,6 +16,7 @@ #include "hw/ide.h" #include "hw/timer/i8254.h" #include "hw/char/serial.h" +#include "hw/net/lasi_82596.h" #include "hppa_sys.h" #include "qemu/units.h" #include "qapi/error.h" @@ -101,6 +102,9 @@ static void machine_hppa_init(MachineState *machine) "ram", ram_size); memory_region_add_subregion(addr_space, 0, ram_region); + /* Init Lasi chip */ + lasi_init(addr_space); + /* Init Dino (PCI host bus chip). */ pci_bus = dino_init(addr_space, &rtc_irq, &serial_irq); assert(pci_bus); @@ -125,7 +129,9 @@ static void machine_hppa_init(MachineState *machine) /* Network setup. e1000 is good enough, failing Tulip support. */ for (i = 0; i < nb_nics; i++) { - pci_nic_init_nofail(&nd_table[i], pci_bus, "e1000", NULL); + if (!enable_lasi_lan()) { + pci_nic_init_nofail(&nd_table[i], pci_bus, "e1000", NULL); + } } /* Load firmware. Given that this is not "real" firmware, -- cgit 1.4.1