[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 38/46] hw/arm/raspi: Trivial code movement
From: |
Peter Maydell |
Subject: |
[PULL 38/46] hw/arm/raspi: Trivial code movement |
Date: |
Thu, 13 Feb 2020 14:41:37 +0000 |
From: Philippe Mathieu-Daudé <address@hidden>
There is no point in creating the SoC object before allocating the RAM.
Move the call to keep all the SoC-related calls together.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Acked-by: Igor Mammedov <address@hidden>
Message-id: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
hw/arm/raspi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
index 7a2ca97347e..b3e6f72b55a 100644
--- a/hw/arm/raspi.c
+++ b/hw/arm/raspi.c
@@ -227,9 +227,6 @@ static void raspi_init(MachineState *machine, uint32_t
board_rev)
exit(1);
}
- object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc),
- board_soc_type(board_rev), &error_abort, NULL);
-
/* Allocate and map RAM */
memory_region_allocate_system_memory(&s->ram, OBJECT(machine), "ram",
machine->ram_size);
@@ -237,6 +234,8 @@ static void raspi_init(MachineState *machine, uint32_t
board_rev)
memory_region_add_subregion_overlap(get_system_memory(), 0, &s->ram, 0);
/* Setup the SOC */
+ object_initialize_child(OBJECT(machine), "soc", &s->soc, sizeof(s->soc),
+ board_soc_type(board_rev), &error_abort, NULL);
object_property_add_const_link(OBJECT(&s->soc), "ram", OBJECT(&s->ram),
&error_abort);
object_property_set_int(OBJECT(&s->soc), board_rev, "board-rev",
--
2.20.1
- [PULL 23/46] target/arm: Set PAN bit as required on exception entry, (continued)
- [PULL 23/46] target/arm: Set PAN bit as required on exception entry, Peter Maydell, 2020/02/13
- [PULL 27/46] target/arm: Update MSR access to UAO, Peter Maydell, 2020/02/13
- [PULL 26/46] target/arm: Add ID_AA64MMFR2_EL1, Peter Maydell, 2020/02/13
- [PULL 24/46] target/arm: Implement ATS1E1 system registers, Peter Maydell, 2020/02/13
- [PULL 25/46] target/arm: Enable ARMv8.2-ATS1E1 in -cpu max, Peter Maydell, 2020/02/13
- [PULL 30/46] hw/arm: ast2400/ast2500: Wire up EHCI controllers, Peter Maydell, 2020/02/13
- [PULL 28/46] target/arm: Implement UAO semantics, Peter Maydell, 2020/02/13
- [PULL 29/46] target/arm: Enable ARMv8.2-UAO in -cpu max, Peter Maydell, 2020/02/13
- [PULL 31/46] hw/arm: ast2600: Wire up EHCI controllers, Peter Maydell, 2020/02/13
- [PULL 32/46] hw/char/exynos4210_uart: Fix memleaks in exynos4210_uart_init, Peter Maydell, 2020/02/13
- [PULL 38/46] hw/arm/raspi: Trivial code movement,
Peter Maydell <=
- [PULL 33/46] hw/arm/raspi: Use BCM2708 machine type with pre Device Tree kernels, Peter Maydell, 2020/02/13
- [PULL 34/46] hw/arm/raspi: Correct the board descriptions, Peter Maydell, 2020/02/13
- [PULL 37/46] hw/arm/raspi: Extract the processor type from the board revision, Peter Maydell, 2020/02/13
- [PULL 35/46] hw/arm/raspi: Extract the version from the board revision, Peter Maydell, 2020/02/13
- [PULL 36/46] hw/arm/raspi: Extract the RAM size from the board revision, Peter Maydell, 2020/02/13
- [PULL 42/46] hw/arm/raspi: Set default RAM size to size encoded in board revision, Peter Maydell, 2020/02/13
- [PULL 44/46] hw/arm/raspi: Use a unique raspi_machine_class_init() method, Peter Maydell, 2020/02/13
- [PULL 41/46] hw/arm/raspi: Let class_init() directly call raspi_machine_init(), Peter Maydell, 2020/02/13
- [PULL 43/46] hw/arm/raspi: Extract the board model from the board revision, Peter Maydell, 2020/02/13
- [PULL 45/46] hw/arm/raspi: Extract the cores count from the board revision, Peter Maydell, 2020/02/13