hw/misc/iotkit-sysctl: Add SSE-300 cases which match SSE-200 behaviour
commit31b0c6b17691b16175cb4bb01068df15d3b3b08c
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 19 Feb 2021 14:45:46 +0000 (19 14:45 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 8 Mar 2021 17:20:01 +0000 (8 17:20 +0000)
tree19143c5933dc6aaeb3b102122704bc6336ba35cc
parent0b8ceee822ae6d3bc4033c9b406c5f8d8c71ee6d
hw/misc/iotkit-sysctl: Add SSE-300 cases which match SSE-200 behaviour

The SSE-300's iokit-sysctl device is similar to the SSE-200, but
some registers have moved address or have different behaviours.
In this commit we add case statements for the registers where
the SSE-300 and SSE-200 have the same behaviour. Some registers
are the same on all SSE versions and so need no code change at all.
Putting both of these categories together covers:

0x0 SECDBGSTAT
0x4 SECDBGSET
0x8 SECDBGCLR
0xc SCSECCTRL
0x10 CLK_CFG0 -- this is like SSE-200 FCLK_DIV but with a
   different set of clocks being controlled; our implementation
   is a dummy reads-as-written anyway
0x14 CLK_CFG1 -- similar to SSE-200 SYSCLK_DIV; our implementation
   is a dummy
0x18 CLK_FORCE -- similar to SSE-200 but different bit allocations;
   we have a dummy implementation
0x100 RESET_SYNDROME -- bit allocation differs from SSE-200 but our
   implementation is a dummy
0x104 RESET_MASK -- bit allocation differs from SSE-200 but our
   implementation is a dummy
0x108 SWRESET
0x10c GRETREG
0x200 PDCM_PD_SYS_SENSE -- some bit allocations differ, but our
   implementation is a dummy

We also need to migrate the state of these registers which are shared
between the SSE-200 and SSE-300, so update the vmstate 'needed'
function to do this.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210219144617.4782-14-peter.maydell@linaro.org
hw/misc/iotkit-sysctl.c