[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/9] hw/arm/stellaris: Only map existing devices as unimplemented
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 8/9] hw/arm/stellaris: Only map existing devices as unimplemented |
Date: |
Fri, 10 Jan 2025 17:02:03 +0100 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/arm/stellaris.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
index d87587225c2..c89522332e2 100644
--- a/hw/arm/stellaris.c
+++ b/hw/arm/stellaris.c
@@ -1390,11 +1390,21 @@ static void stellaris_init(MachineState *ms,
stellaris_board_info *board)
/* Add dummy regions for the devices we don't implement yet,
* so guest accesses don't cause unlogged crashes.
*/
- create_unimplemented_device("PWM", 0x40028000, 0x1000);
- create_unimplemented_device("QEI-0", 0x4002c000, 0x1000);
- create_unimplemented_device("QEI-1", 0x4002d000, 0x1000);
- create_unimplemented_device("analogue-comparator", 0x4003c000, 0x1000);
- create_unimplemented_device("hibernation", 0x400fc000, 0x1000);
+ if (DEV_CAP(1, PWM)) {
+ create_unimplemented_device("PWM", 0x40028000, 0x1000);
+ }
+ if (DEV_CAP(2, QEI(0))) {
+ create_unimplemented_device("QEI-0", 0x4002c000, 0x1000);
+ }
+ if (DEV_CAP(2, QEI(0))) {
+ create_unimplemented_device("QEI-1", 0x4002d000, 0x1000);
+ }
+ if (DEV_CAP(2, COMP(0))) {
+ create_unimplemented_device("analogue-comparator", 0x4003c000, 0x1000);
+ }
+ if (DEV_CAP(1, HIB)) {
+ create_unimplemented_device("hibernation", 0x400fc000, 0x1000);
+ }
create_unimplemented_device("flash-control", 0x400fd000, 0x1000);
armv7m_load_kernel(ARM_CPU(first_cpu), ms->kernel_filename, 0, flash_size);
--
2.47.1
- [PATCH 0/9] hw/arm/stellaris: Fix overwritten IRQs and cleanups, Philippe Mathieu-Daudé, 2025/01/10
- [PATCH 1/9] hw/arm/stellaris: Link each board schematic, Philippe Mathieu-Daudé, 2025/01/10
- [PATCH 2/9] hw/arm/stellaris: Constify read-only arrays, Philippe Mathieu-Daudé, 2025/01/10
- [PATCH 3/9] hw/arm/stellaris: Remove incorrect unimplemented i2c-0 at 0x40002000, Philippe Mathieu-Daudé, 2025/01/10
- [PATCH 5/9] hw/arm/stellaris: Use DEVCAP macro to access DeviceCapability registers, Philippe Mathieu-Daudé, 2025/01/10
- [PATCH 8/9] hw/arm/stellaris: Only map existing devices as unimplemented,
Philippe Mathieu-Daudé <=
- [PATCH 9/9] hw/arm/stellaris: Wire GPTM[#n] output to ADC input #n, Philippe Mathieu-Daudé, 2025/01/10
- [PATCH 6/9] hw/arm/stellaris: Map both I2C controllers, Philippe Mathieu-Daudé, 2025/01/10
- [PATCH 4/9] hw/arm/stellaris: Replace magic numbers by definitions, Philippe Mathieu-Daudé, 2025/01/10
- [PATCH 7/9] hw/arm/stellaris: Only create MPU when available, Philippe Mathieu-Daudé, 2025/01/10