hw/mips/malta: Minor housekeeping in mips_malta_init()
cover hw/mips/malta: Minor housekeeping in mips_malta_init()
Move some code around to make this big function
easier to review.
Philippe Mathieu-Daudé (2):
hw/mips/malta: Move gt64120 related code together hw/mips/malta: Use clearer qdev style
hw/mips/malta.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/2 hw/mips/malta: Move gt64120 related code together
The 'empty_slot' region created is related to the gt64120. Move its creation close to the gt64120 instance creation.
--- hw/mips/malta.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
hw/mips/malta.c +6 -7
@@ -1235,13 +1235,6 @@ void mips_malta_init(MachineState *machine)DeviceState *dev =qdev_new (TYPE_MIPS_MALTA );MaltaState *s =MIPS_MALTA (dev); -/* -* The whole address space decoded by the GT-64120A doesn't generate -* exception when accessing invalid memory. Create an empty slot to -* emulate this feature. -*/ -empty_slot_init ("GT64120" ,0 ,0x20000000 ); -sysbus_realize_and_unref (SYS_BUS_DEVICE (dev), &error_fatal);/* create CPU */
@@ -1395,6 +1388,12 @@ void mips_malta_init(MachineState *machine)/* Northbridge */ pci_bus =gt64120_register (s->i8259); +/* +* The whole address space decoded by the GT-64120A doesn't generate +* exception when accessing invalid memory. Create an empty slot to +* emulate this feature. +*/ +empty_slot_init ("GT64120" ,0 ,0x20000000 );/* Southbridge */ dev =piix4_create (pci_bus, &isa_bus, &smbus);
Signature · 1 line
2.26.2
PATCH 2/2 hw/mips/malta: Use clearer qdev style
In reply to Philippe Mathieu-DaudéIn order to be consistent with the other code base uses, rewrite slightly how the MIPS_MALTA object is created. No logical change.
--- hw/mips/malta.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
hw/mips/malta.c +4 -4
@@ -1231,11 +1231,11 @@ void mips_malta_init(MachineState *machine)DriveInfo *dinfo;int fl_idx =0 ;int be; +MaltaState *s; +DeviceState *dev; -DeviceState *dev =qdev_new (TYPE_MIPS_MALTA ); -MaltaState *s =MIPS_MALTA (dev); - -sysbus_realize_and_unref (SYS_BUS_DEVICE (dev), &error_fatal); + s =MIPS_MALTA (qdev_new (TYPE_MIPS_MALTA )); +sysbus_realize_and_unref (SYS_BUS_DEVICE (s), &error_fatal);/* create CPU */ mips_create_cpu (machine, s, &cbus_irq, &i8259_irq);
Signature · 1 line
2.26.2
Quoted 3 lines · Philippe Mathieu-Daudé
Philippe Mathieu-Daudé (2):
hw/mips/malta: Move gt64120 related code together hw/mips/malta: Use clearer qdev style
r~
Philippe Mathieu-Daudé
AppliedQuoted 10 lines · Philippe Mathieu-Daudé
Move some code around to make this big function
easier to review.Philippe Mathieu-Daudé (2):
hw/mips/malta: Move gt64120 related code together hw/mips/malta: Use clearer qdev stylehw/mips/malta.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-)
Thanks, applied to mips-next.