lasi: move lasi_initfn() to machine.c
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> Acked-by: Helge Deller <deller@gmx.de> Message-Id: <20220504092600.10048-39-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>
This commit is contained in:
parent
deaa5d3b4e
commit
e881e3c83a
@ -7,11 +7,9 @@
|
|||||||
#include "hw/pci/pci_host.h"
|
#include "hw/pci/pci_host.h"
|
||||||
#include "hw/boards.h"
|
#include "hw/boards.h"
|
||||||
#include "hw/intc/i8259.h"
|
#include "hw/intc/i8259.h"
|
||||||
#include "lasi.h"
|
|
||||||
|
|
||||||
#include "hppa_hardware.h"
|
#include "hppa_hardware.h"
|
||||||
|
|
||||||
LasiState *lasi_initfn(void);
|
|
||||||
#define enable_lasi_lan() 0
|
#define enable_lasi_lan() 0
|
||||||
|
|
||||||
/* hppa_pci.c. */
|
/* hppa_pci.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)
|
static void lasi_reset(DeviceState *dev)
|
||||||
{
|
{
|
||||||
LasiState *s = LASI_CHIP(dev);
|
LasiState *s = LASI_CHIP(dev);
|
||||||
|
@ -125,6 +125,16 @@ static FWCfgState *create_fw_cfg(MachineState *ms)
|
|||||||
return fw_cfg;
|
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)
|
static DinoState *dino_init(MemoryRegion *addr_space)
|
||||||
{
|
{
|
||||||
DeviceState *dev;
|
DeviceState *dev;
|
||||||
@ -178,7 +188,7 @@ static void machine_hppa_init(MachineState *machine)
|
|||||||
|
|
||||||
|
|
||||||
/* Init Lasi chip */
|
/* Init Lasi chip */
|
||||||
lasi_dev = DEVICE(lasi_initfn());
|
lasi_dev = DEVICE(lasi_init());
|
||||||
memory_region_add_subregion(addr_space, LASI_HPA,
|
memory_region_add_subregion(addr_space, LASI_HPA,
|
||||||
sysbus_mmio_get_region(
|
sysbus_mmio_get_region(
|
||||||
SYS_BUS_DEVICE(lasi_dev), 0));
|
SYS_BUS_DEVICE(lasi_dev), 0));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user