hw/arm_sysctl: Handle SYS_CFGCTRL in a more structured way
commit71538323358d77f6472d66a30e948a1c23bd9e87
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 15 Mar 2013 16:41:56 +0000 (15 16:41 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 15 Mar 2013 16:41:56 +0000 (15 16:41 +0000)
tree609e63c4ecf51acefcd10a659233aeb34c9f2d88
parentcdef10bb9373c2c22c517a4deef2363c7ebd5d48
hw/arm_sysctl: Handle SYS_CFGCTRL in a more structured way

The SYS_CFGCTRL register consists of separate fields
for DCC, function, site, position and device, as well
as a read/write bit. Refactor the code handling SYS_CFGCTRL
writes to make it easier to add support for functions
like SYS_CFG_OSC which support multiple device fields.
We also pull the handling out into its own function for
clarity, as there are potentially a lot of implementable
subfunctions.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm_sysctl.c