[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/25] hw/arm/armsse: Rename "MAINCLK" property to "MAINCLK_F
From: |
Luc Michel |
Subject: |
Re: [PATCH 10/25] hw/arm/armsse: Rename "MAINCLK" property to "MAINCLK_FRQ" |
Date: |
Fri, 22 Jan 2021 16:22:47 +0100 |
On 19:06 Thu 21 Jan , Peter Maydell wrote:
> While we transition the ARMSSE code from integer properties
> specifying clock frequencies to Clock objects, we want to have the
> device provide both at once. We want the final name of the main
> input Clock to be "MAINCLK", following the hardware name.
> Unfortunately creating an input Clock with a name X creates an
> under-the-hood QOM property X; for "MAINCLK" this clashes with the
> existing UINT32 property of that name.
>
> Rename the UINT32 property to MAINCLK_FRQ so it can coexist with the
> MAINCLK Clock; once the transition is complete MAINCLK_FRQ will be
> deleted.
>
> Commit created with:
> perl -p -i -e 's/MAINCLK/MAINCLK_FRQ/g' hw/arm/{armsse,mps2-tz,musca}.c
> include/hw/arm/armsse.h
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Luc Michel <luc@lmichel.fr>
> ---
> include/hw/arm/armsse.h | 2 +-
> hw/arm/armsse.c | 6 +++---
> hw/arm/mps2-tz.c | 2 +-
> hw/arm/musca.c | 2 +-
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/hw/arm/armsse.h b/include/hw/arm/armsse.h
> index 83f5e28c16e..4860a793f4b 100644
> --- a/include/hw/arm/armsse.h
> +++ b/include/hw/arm/armsse.h
> @@ -39,7 +39,7 @@
> * QEMU interface:
> * + QOM property "memory" is a MemoryRegion containing the devices provided
> * by the board model.
> - * + QOM property "MAINCLK" is the frequency of the main system clock
> + * + QOM property "MAINCLK_FRQ" is the frequency of the main system clock
> * + QOM property "EXP_NUMIRQ" sets the number of expansion interrupts.
> * (In hardware, the SSE-200 permits the number of expansion interrupts
> * for the two CPUs to be configured separately, but we restrict it to
> diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c
> index baac027659d..d2ba0459c44 100644
> --- a/hw/arm/armsse.c
> +++ b/hw/arm/armsse.c
> @@ -47,7 +47,7 @@ static Property iotkit_properties[] = {
> DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
> MemoryRegion *),
> DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
> - DEFINE_PROP_UINT32("MAINCLK", ARMSSE, mainclk_frq, 0),
> + DEFINE_PROP_UINT32("MAINCLK_FRQ", ARMSSE, mainclk_frq, 0),
> DEFINE_PROP_UINT32("SRAM_ADDR_WIDTH", ARMSSE, sram_addr_width, 15),
> DEFINE_PROP_UINT32("init-svtor", ARMSSE, init_svtor, 0x10000000),
> DEFINE_PROP_BOOL("CPU0_FPU", ARMSSE, cpu_fpu[0], true),
> @@ -59,7 +59,7 @@ static Property armsse_properties[] = {
> DEFINE_PROP_LINK("memory", ARMSSE, board_memory, TYPE_MEMORY_REGION,
> MemoryRegion *),
> DEFINE_PROP_UINT32("EXP_NUMIRQ", ARMSSE, exp_numirq, 64),
> - DEFINE_PROP_UINT32("MAINCLK", ARMSSE, mainclk_frq, 0),
> + DEFINE_PROP_UINT32("MAINCLK_FRQ", ARMSSE, mainclk_frq, 0),
> DEFINE_PROP_UINT32("SRAM_ADDR_WIDTH", ARMSSE, sram_addr_width, 15),
> DEFINE_PROP_UINT32("init-svtor", ARMSSE, init_svtor, 0x10000000),
> DEFINE_PROP_BOOL("CPU0_FPU", ARMSSE, cpu_fpu[0], false),
> @@ -448,7 +448,7 @@ static void armsse_realize(DeviceState *dev, Error **errp)
> }
>
> if (!s->mainclk_frq) {
> - error_setg(errp, "MAINCLK property was not set");
> + error_setg(errp, "MAINCLK_FRQ property was not set");
> return;
> }
>
> diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
> index 3707876d6d4..6a9eed9022a 100644
> --- a/hw/arm/mps2-tz.c
> +++ b/hw/arm/mps2-tz.c
> @@ -402,7 +402,7 @@ static void mps2tz_common_init(MachineState *machine)
> object_property_set_link(OBJECT(&mms->iotkit), "memory",
> OBJECT(system_memory), &error_abort);
> qdev_prop_set_uint32(iotkitdev, "EXP_NUMIRQ", MPS2TZ_NUMIRQ);
> - qdev_prop_set_uint32(iotkitdev, "MAINCLK", SYSCLK_FRQ);
> + qdev_prop_set_uint32(iotkitdev, "MAINCLK_FRQ", SYSCLK_FRQ);
> sysbus_realize(SYS_BUS_DEVICE(&mms->iotkit), &error_fatal);
>
> /*
> diff --git a/hw/arm/musca.c b/hw/arm/musca.c
> index b50157f63a6..d82bef11cf2 100644
> --- a/hw/arm/musca.c
> +++ b/hw/arm/musca.c
> @@ -375,7 +375,7 @@ static void musca_init(MachineState *machine)
> qdev_prop_set_uint32(ssedev, "EXP_NUMIRQ", mmc->num_irqs);
> qdev_prop_set_uint32(ssedev, "init-svtor", mmc->init_svtor);
> qdev_prop_set_uint32(ssedev, "SRAM_ADDR_WIDTH", mmc->sram_addr_width);
> - qdev_prop_set_uint32(ssedev, "MAINCLK", SYSCLK_FRQ);
> + qdev_prop_set_uint32(ssedev, "MAINCLK_FRQ", SYSCLK_FRQ);
> /*
> * Musca-A takes the default SSE-200 FPU/DSP settings (ie no for
> * CPU0 and yes for CPU1); Musca-B1 explicitly enables them for CPU0.
> --
> 2.20.1
>
--
- Re: [PATCH 11/25] hw/arm/armsse: Wire up clocks, (continued)
- [PATCH 09/25] hw/watchdog/cmsdk-apb-watchdog: Add Clock input, Peter Maydell, 2021/01/21
- [PATCH 02/25] clock: Add new clock_has_source() function, Peter Maydell, 2021/01/21
- [PATCH 10/25] hw/arm/armsse: Rename "MAINCLK" property to "MAINCLK_FRQ", Peter Maydell, 2021/01/21
- [PATCH 07/25] hw/timer/cmsdk-apb-timer: Add Clock input, Peter Maydell, 2021/01/21
- [PATCH 13/25] hw/arm/mps2: Create and connect SYSCLK Clock, Peter Maydell, 2021/01/21
- [PATCH 14/25] hw/arm/mps2-tz: Create and connect ARMSSE Clocks, Peter Maydell, 2021/01/21
- [PATCH 06/25] hw/timer/cmsdk-apb-timer: Rename CMSDKAPBTIMER struct to CMSDKAPBTimer, Peter Maydell, 2021/01/21