[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/53] hppa: move dino_init() from dino.c to machine.c
From: |
Mark Cave-Ayland |
Subject: |
[PULL 19/53] hppa: move dino_init() from dino.c to machine.c |
Date: |
Sun, 8 May 2022 20:56:16 +0100 |
Now that dino_init() is completely decoupled from dino.c it can be moved to
machine.c with the rest of the board configuration.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Helge Deller <deller@gmx.de>
Message-Id: <20220504092600.10048-20-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/dino.c | 14 --------------
hw/hppa/hppa_sys.h | 2 --
hw/hppa/machine.c | 12 ++++++++++++
3 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c
index d8baf139d6..6d12c385aa 100644
--- a/hw/hppa/dino.c
+++ b/hw/hppa/dino.c
@@ -399,20 +399,6 @@ static int dino_pci_map_irq(PCIDevice *d, int irq_num)
return slot & 0x03;
}
-DinoState *dino_init(MemoryRegion *addr_space)
-{
- DeviceState *dev;
- DinoState *s;
-
- dev = qdev_new(TYPE_DINO_PCI_HOST_BRIDGE);
- object_property_set_link(OBJECT(dev), "memory-as", OBJECT(addr_space),
- &error_fatal);
- s = DINO_PCI_HOST_BRIDGE(dev);
- sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
-
- return s;
-}
-
static void dino_pcihost_reset(DeviceState *dev)
{
DinoState *s = DINO_PCI_HOST_BRIDGE(dev);
diff --git a/hw/hppa/hppa_sys.h b/hw/hppa/hppa_sys.h
index ebedecf1c8..7c31dd8396 100644
--- a/hw/hppa/hppa_sys.h
+++ b/hw/hppa/hppa_sys.h
@@ -9,9 +9,7 @@
#include "hw/intc/i8259.h"
#include "hppa_hardware.h"
-#include "dino.h"
-DinoState *dino_init(MemoryRegion *);
DeviceState *lasi_init(MemoryRegion *);
#define enable_lasi_lan() 0
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 49ecb971be..4b753fa346 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -122,6 +122,18 @@ static FWCfgState *create_fw_cfg(MachineState *ms)
return fw_cfg;
}
+static DinoState *dino_init(MemoryRegion *addr_space)
+{
+ DeviceState *dev;
+
+ dev = qdev_new(TYPE_DINO_PCI_HOST_BRIDGE);
+ object_property_set_link(OBJECT(dev), "memory-as", OBJECT(addr_space),
+ &error_fatal);
+ sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal);
+
+ return DINO_PCI_HOST_BRIDGE(dev);
+}
+
static void machine_hppa_init(MachineState *machine)
{
const char *kernel_filename = machine->kernel_filename;
--
2.20.1
- [PULL 12/53] hppa: use new CONFIG_HPPA_B160L option instead of CONFIG_DINO to build hppa machine, (continued)
- [PULL 12/53] hppa: use new CONFIG_HPPA_B160L option instead of CONFIG_DINO to build hppa machine, Mark Cave-Ayland, 2022/05/08
- [PULL 13/53] dino: change dino_init() to return the DINO device instead of PCIBus, Mark Cave-Ayland, 2022/05/08
- [PULL 14/53] machine.c: map DINO device during board configuration, Mark Cave-Ayland, 2022/05/08
- [PULL 15/53] dino.h: add defines for DINO IRQ numbers, Mark Cave-Ayland, 2022/05/08
- [PULL 16/53] dino: define IRQ inputs as qdev GPIOs, Mark Cave-Ayland, 2022/05/08
- [PULL 17/53] dino: wire up serial IRQ using a qdev GPIO in machine.c, Mark Cave-Ayland, 2022/05/08
- [PULL 18/53] dino: remove unused dino_set_timer_irq() IRQ handler, Mark Cave-Ayland, 2022/05/08
- [PULL 23/53] lasi: checkpatch fixes, Mark Cave-Ayland, 2022/05/08
- [PULL 24/53] lasi: move memory region initialisation to new lasi_init() function, Mark Cave-Ayland, 2022/05/08
- [PULL 20/53] dino: use numerical constant for iar0 and iar1 reset values, Mark Cave-Ayland, 2022/05/08
- [PULL 19/53] hppa: move dino_init() from dino.c to machine.c,
Mark Cave-Ayland <=
- [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, 2022/05/08