diff options
author | Peter Maydell | 2021-02-15 12:51:16 +0100 |
---|---|---|
committer | Peter Maydell | 2021-03-06 14:30:38 +0100 |
commit | 4fb013afcc037c27e3d0cd9af437a737106cca00 (patch) | |
tree | 105cec0ab9712fd95466ba1ac670d6a474d1a5a6 /include/hw/misc/mps2-scc.h | |
parent | hw/arm/mps2-tz: Make SYSCLK frequency board-specific (diff) | |
download | qemu-4fb013afcc037c27e3d0cd9af437a737106cca00.tar.gz qemu-4fb013afcc037c27e3d0cd9af437a737106cca00.tar.xz qemu-4fb013afcc037c27e3d0cd9af437a737106cca00.zip |
hw/misc/mps2-scc: Support configurable number of OSCCLK values
Currently the MPS2 SCC device implements a fixed number of OSCCLK
values (3). The variant of this device in the MPS3 AN524 board has 6
OSCCLK values. Switch to using a PROP_ARRAY, which allows board code
to specify how large the OSCCLK array should be as well as its
values.
With a variable-length property array, the SCC no longer specifies
default values for the OSCCLKs, so we must set them explicitly in the
board code. This defaults are actually incorrect for the an521 and
an505; we will correct this bug in a following patch.
This is a migration compatibility break for all the mps boards.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210215115138.20465-3-peter.maydell@linaro.org
Diffstat (limited to 'include/hw/misc/mps2-scc.h')
-rw-r--r-- | include/hw/misc/mps2-scc.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/hw/misc/mps2-scc.h b/include/hw/misc/mps2-scc.h index f65d873203..514da49f69 100644 --- a/include/hw/misc/mps2-scc.h +++ b/include/hw/misc/mps2-scc.h @@ -19,8 +19,6 @@ #define TYPE_MPS2_SCC "mps2-scc" OBJECT_DECLARE_SIMPLE_TYPE(MPS2SCC, MPS2_SCC) -#define NUM_OSCCLK 3 - struct MPS2SCC { /*< private >*/ SysBusDevice parent_obj; @@ -39,8 +37,9 @@ struct MPS2SCC { uint32_t dll; uint32_t aid; uint32_t id; - uint32_t oscclk[NUM_OSCCLK]; - uint32_t oscclk_reset[NUM_OSCCLK]; + uint32_t num_oscclk; + uint32_t *oscclk; + uint32_t *oscclk_reset; }; #endif |