[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 12/25] hw/intc/sh_intc: Rename iomem region
From: |
BALATON Zoltan |
Subject: |
[PATCH v5 12/25] hw/intc/sh_intc: Rename iomem region |
Date: |
Fri, 29 Oct 2021 18:23:36 +0200 |
Rename the iomem region to "intc" from "interrupt-controller" which
makes the info mtree output less wide as it is already too wide
because of all the aliases. Also drop the format macro which was only
used twice in close proximity so we can just use the literal string
instead without a macro definition.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/intc/sh_intc.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c
index 18461ff554..e386372b6f 100644
--- a/hw/intc/sh_intc.c
+++ b/hw/intc/sh_intc.c
@@ -288,15 +288,13 @@ static unsigned int sh_intc_register(MemoryRegion *sysmem,
iomem_p4 = desc->iomem_aliases + index;
iomem_a7 = iomem_p4 + 1;
-#define SH_INTC_IOMEM_FORMAT "interrupt-controller-%s-%s-%s"
- snprintf(name, sizeof(name), SH_INTC_IOMEM_FORMAT, type, action, "p4");
+ snprintf(name, sizeof(name), "intc-%s-%s-%s", type, action, "p4");
memory_region_init_alias(iomem_p4, NULL, name, iomem, A7ADDR(address), 4);
memory_region_add_subregion(sysmem, P4ADDR(address), iomem_p4);
- snprintf(name, sizeof(name), SH_INTC_IOMEM_FORMAT, type, action, "a7");
+ snprintf(name, sizeof(name), "intc-%s-%s-%s", type, action, "a7");
memory_region_init_alias(iomem_a7, NULL, name, iomem, A7ADDR(address), 4);
memory_region_add_subregion(sysmem, A7ADDR(address), iomem_a7);
-#undef SH_INTC_IOMEM_FORMAT
/* used to increment aliases index */
return 2;
@@ -432,9 +430,8 @@ int sh_intc_init(MemoryRegion *sysmem,
}
desc->irqs = qemu_allocate_irqs(sh_intc_set_irq, desc, nr_sources);
-
- memory_region_init_io(&desc->iomem, NULL, &sh_intc_ops, desc,
- "interrupt-controller", 0x100000000ULL);
+ memory_region_init_io(&desc->iomem, NULL, &sh_intc_ops, desc, "intc",
+ 0x100000000ULL);
#define INT_REG_PARAMS(reg_struct, type, action, j) \
reg_struct->action##_reg, #type, #action, j
--
2.21.4
- [PATCH v5 00/25] More SH4 clean ups, BALATON Zoltan, 2021/10/29
- [PATCH v5 04/25] hw/char/sh_serial: Do not abort on invalid access, BALATON Zoltan, 2021/10/29
- [PATCH v5 02/25] hw/sh4: Change debug printfs to traces, BALATON Zoltan, 2021/10/29
- [PATCH v5 06/25] hw/char/sh_serial: Embed QEMUTimer in state struct, BALATON Zoltan, 2021/10/29
- [PATCH v5 03/25] hw/sh4/r2d: Use error_report instead of fprintf to stderr, BALATON Zoltan, 2021/10/29
- [PATCH v5 18/25] hw/intc/sh_intc: Replace abort() with g_assert_not_reached(), BALATON Zoltan, 2021/10/29
- [PATCH v5 19/25] hw/intc/sh_intc: Avoid using continue in loops, BALATON Zoltan, 2021/10/29
- [PATCH v5 13/25] hw/intc/sh_intc: Drop another useless macro, BALATON Zoltan, 2021/10/29
- [PATCH v5 17/25] hw/intc/sh_intc: Inline and drop sh_intc_source() function, BALATON Zoltan, 2021/10/29
- [PATCH v5 12/25] hw/intc/sh_intc: Rename iomem region,
BALATON Zoltan <=
- [PATCH v5 05/25] hw/char/sh_serial: Rename type sh_serial_state to SHSerialState, BALATON Zoltan, 2021/10/29
- [PATCH v5 11/25] hw/intc/sh_intc: Turn some defines into an enum, BALATON Zoltan, 2021/10/29
- [PATCH v5 08/25] hw/char/sh_serial: QOM-ify, BALATON Zoltan, 2021/10/29
- [PATCH v5 01/25] hw/sh4: Fix typos in a comment, BALATON Zoltan, 2021/10/29
- [PATCH v5 20/25] hw/intc/sh_intc: Simplify allocating sources array, BALATON Zoltan, 2021/10/29
- [PATCH v5 25/25] hw/timer/sh_timer: Remove use of hw_error, BALATON Zoltan, 2021/10/29
- [PATCH v5 22/25] hw/timer/sh_timer: Rename sh_timer_state to SHTimerState, BALATON Zoltan, 2021/10/29
- [PATCH v5 07/25] hw/char/sh_serial: Split off sh_serial_reset() from sh_serial_init(), BALATON Zoltan, 2021/10/29
- [PATCH v5 09/25] hw/char/sh_serial: Add device id to trace output, BALATON Zoltan, 2021/10/29
- [PATCH v5 10/25] hw/intc/sh_intc: Use existing macro instead of local one, BALATON Zoltan, 2021/10/29