[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 38/50] lasi: move lasi_initfn() to machine.c
From: |
Mark Cave-Ayland |
Subject: |
[PATCH 38/50] lasi: move lasi_initfn() to machine.c |
Date: |
Thu, 21 Apr 2022 20:30:48 +0100 |
Move the simplified lasi_initfn() back to machine.c whilst also renaming it
back to its original lasi_init() name.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/hppa/hppa_sys.h | 2 --
hw/hppa/lasi.c | 10 ----------
hw/hppa/machine.c | 12 +++++++++++-
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/hw/hppa/hppa_sys.h b/hw/hppa/hppa_sys.h
index 31e3856059..f7a127be19 100644
--- a/hw/hppa/hppa_sys.h
+++ b/hw/hppa/hppa_sys.h
@@ -7,11 +7,9 @@
#include "hw/pci/pci_host.h"
#include "hw/boards.h"
#include "hw/intc/i8259.h"
-#include "lasi.h"
#include "hppa_hardware.h"
-LasiState *lasi_initfn(void);
#define enable_lasi_lan() 0
/* hppa_pci.c. */
diff --git a/hw/hppa/lasi.c b/hw/hppa/lasi.c
index 81c8e4d2d9..ad50880a13 100644
--- a/hw/hppa/lasi.c
+++ b/hw/hppa/lasi.c
@@ -227,16 +227,6 @@ static void lasi_set_irq(void *opaque, int irq, int level)
}
}
-LasiState *lasi_initfn(void)
-{
- DeviceState *dev;
-
- dev = qdev_new(TYPE_LASI_CHIP);
- sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
-
- return LASI_CHIP(dev);
-}
-
static void lasi_reset(DeviceState *dev)
{
LasiState *s = LASI_CHIP(dev);
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index c4b2e69241..c8eee6398a 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -125,6 +125,16 @@ static FWCfgState *create_fw_cfg(MachineState *ms)
return fw_cfg;
}
+static LasiState *lasi_init(void)
+{
+ DeviceState *dev;
+
+ dev = qdev_new(TYPE_LASI_CHIP);
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
+
+ return LASI_CHIP(dev);
+}
+
static DinoState *dino_init(MemoryRegion *addr_space)
{
DeviceState *dev;
@@ -178,7 +188,7 @@ static void machine_hppa_init(MachineState *machine)
/* Init Lasi chip */
- lasi_dev = DEVICE(lasi_initfn());
+ lasi_dev = DEVICE(lasi_init());
memory_region_add_subregion(addr_space, LASI_HPA,
sysbus_mmio_get_region(
SYS_BUS_DEVICE(lasi_dev), 0));
--
2.20.1
- [PATCH 30/50] lasi: use qdev GPIOs to wire up IRQs in lasi_initfn(), (continued)
- [PATCH 30/50] lasi: use qdev GPIOs to wire up IRQs in lasi_initfn(), Mark Cave-Ayland, 2022/04/21
- [PATCH 31/50] lasi: fix serial port initialisation, Mark Cave-Ayland, 2022/04/21
- [PATCH 32/50] lasi: update lasi_initfn() to return LASIState, Mark Cave-Ayland, 2022/04/21
- [PATCH 34/50] lasi: move parallel port initialisation to machine.c, Mark Cave-Ayland, 2022/04/21
- [PATCH 36/50] lasi: move PS2 initialisation to machine.c, Mark Cave-Ayland, 2022/04/21
- [PATCH 33/50] lasi: move LAN initialisation to machine.c, Mark Cave-Ayland, 2022/04/21
- [PATCH 39/50] lasi: use constants for device register offsets, Mark Cave-Ayland, 2022/04/21
- [PATCH 35/50] lasi: move second serial port initialisation to machine.c, Mark Cave-Ayland, 2022/04/21
- [PATCH 41/50] hppa: move device headers from hppa_sys.h into individual .c files, Mark Cave-Ayland, 2022/04/21
- [PATCH 37/50] lasi: remove address space parameter from lasi_initfn(), Mark Cave-Ayland, 2022/04/21
- [PATCH 38/50] lasi: move lasi_initfn() to machine.c,
Mark Cave-Ayland <=
- [PATCH 40/50] lasi: use numerical constant for iar reset value, Mark Cave-Ayland, 2022/04/21
- [PATCH 42/50] lasi: move from hw/hppa to hw/misc, Mark Cave-Ayland, 2022/04/21
- [PATCH 44/50] hppa: remove hw/hppa/pci.c, Mark Cave-Ayland, 2022/04/21
- [PATCH 45/50] hppa: remove unused trace-events from from hw/hppa, Mark Cave-Ayland, 2022/04/21
- [PATCH 48/50] hppa: use MACHINE QOM macros for defining the hppa machine, Mark Cave-Ayland, 2022/04/21
- [PATCH 46/50] hppa: move enable_lan() define from hppa_sys.h to machine.c, Mark Cave-Ayland, 2022/04/21
- [PATCH 49/50] hppa: fold machine_hppa_machine_init() into machine_hppa_machine_init_class_init(), Mark Cave-Ayland, 2022/04/21
- [PATCH 43/50] hppa: move hppa_pci_ignore_ops from pci.c to machine.c, Mark Cave-Ayland, 2022/04/21
- [PATCH 47/50] hppa: remove the empty hppa_sys.h file, Mark Cave-Ayland, 2022/04/21
- [PATCH 50/50] hppa: simplify machine function names in machine.c, Mark Cave-Ayland, 2022/04/21