[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 32/53] lasi: update lasi_initfn() to return LASIState
From: |
Mark Cave-Ayland |
Subject: |
[PULL 32/53] lasi: update lasi_initfn() to return LASIState |
Date: |
Sun, 8 May 2022 20:56:29 +0100 |
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-33-mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/hppa/hppa_sys.h | 3 ++-
hw/hppa/lasi.c | 4 ++--
hw/hppa/machine.c | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/hppa/hppa_sys.h b/hw/hppa/hppa_sys.h
index 0929dedded..3832b787d1 100644
--- a/hw/hppa/hppa_sys.h
+++ b/hw/hppa/hppa_sys.h
@@ -7,10 +7,11 @@
#include "hw/pci/pci_host.h"
#include "hw/boards.h"
#include "hw/intc/i8259.h"
+#include "lasi.h"
#include "hppa_hardware.h"
-DeviceState *lasi_initfn(MemoryRegion *);
+LasiState *lasi_initfn(MemoryRegion *);
#define enable_lasi_lan() 0
/* hppa_pci.c. */
diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index 219eb779f3..65139bb29b 100644
--- a/hw/hppa/lasi.c
+++ b/hw/hppa/lasi.c
@@ -231,7 +231,7 @@ static void lasi_set_irq(void *opaque, int irq, int level)
}
}
-DeviceState *lasi_initfn(MemoryRegion *address_space)
+LasiState *lasi_initfn(MemoryRegion *address_space)
{
DeviceState *dev;
@@ -260,7 +260,7 @@ DeviceState *lasi_initfn(MemoryRegion *address_space)
lasips2_init(address_space, LASI_PS2KBD_HPA,
qdev_get_gpio_in(dev, LASI_IRQ_PS2KBD_HPA));
- return dev;
+ return LASI_CHIP(dev);
}
static void lasi_reset(DeviceState *dev)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 6618bce435..c815dde305 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -18,6 +18,7 @@
#include "hw/net/lasi_82596.h"
#include "hw/nmi.h"
#include "hw/pci-host/dino.h"
+#include "lasi.h"
#include "hppa_sys.h"
#include "qemu/units.h"
#include "qapi/error.h"
@@ -175,7 +176,7 @@ static void machine_hppa_init(MachineState *machine)
/* Init Lasi chip */
- lasi_dev = lasi_initfn(addr_space);
+ lasi_dev = DEVICE(lasi_initfn(addr_space));
memory_region_add_subregion(addr_space, LASI_HPA,
sysbus_mmio_get_region(
SYS_BUS_DEVICE(lasi_dev), 0));
--
2.20.1
- [PULL 19/53] hppa: move dino_init() from dino.c to machine.c, (continued)
- [PULL 19/53] hppa: move dino_init() from dino.c to machine.c, Mark Cave-Ayland, 2022/05/08
- [PULL 21/53] dino: move DINO HPA constants from hppa_hardware.h to dino.h, Mark Cave-Ayland, 2022/05/08
- [PULL 22/53] dino: move from hw/hppa to hw/pci-host, Mark Cave-Ayland, 2022/05/08
- [PULL 25/53] lasi: move register memory mapping from lasi.c to machine.c, Mark Cave-Ayland, 2022/05/08
- [PULL 26/53] lasi: move initialisation of iar and rtc to new lasi_reset() function, Mark Cave-Ayland, 2022/05/08
- [PULL 27/53] lasi: move LASIState and associated QOM structures to lasi.h, Mark Cave-Ayland, 2022/05/08
- [PULL 29/53] lasi: define IRQ inputs as qdev GPIOs, Mark Cave-Ayland, 2022/05/08
- [PULL 28/53] lasi: replace lasi_get_irq() with defined constants, Mark Cave-Ayland, 2022/05/08
- [PULL 31/53] lasi: fix serial port initialisation, Mark Cave-Ayland, 2022/05/08
- [PULL 30/53] lasi: use qdev GPIOs to wire up IRQs in lasi_initfn(), Mark Cave-Ayland, 2022/05/08
- [PULL 32/53] lasi: update lasi_initfn() to return LASIState,
Mark Cave-Ayland <=
- [PULL 37/53] lasi: remove address space parameter from lasi_initfn(), Mark Cave-Ayland, 2022/05/08
- [PULL 33/53] lasi: move LAN initialisation to machine.c, Mark Cave-Ayland, 2022/05/08
- [PULL 36/53] lasi: move PS2 initialisation to machine.c, Mark Cave-Ayland, 2022/05/08
- [PULL 34/53] lasi: move parallel port initialisation to machine.c, Mark Cave-Ayland, 2022/05/08
- [PULL 41/53] hppa: move device headers from hppa_sys.h into individual .c files, Mark Cave-Ayland, 2022/05/08
- [PULL 42/53] lasi: move from hw/hppa to hw/misc, Mark Cave-Ayland, 2022/05/08
- [PULL 38/53] lasi: move lasi_initfn() to machine.c, Mark Cave-Ayland, 2022/05/08
- [PULL 35/53] lasi: move second serial port initialisation to machine.c, Mark Cave-Ayland, 2022/05/08
- [PULL 39/53] lasi: use constants for device register offsets, Mark Cave-Ayland, 2022/05/08
- [PULL 40/53] lasi: use numerical constant for iar reset value, Mark Cave-Ayland, 2022/05/08