aboutsummaryrefslogtreecommitdiff
path: root/hw/mem
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2021-08-12 10:33:40 +0100
committerPeter Maydell <peter.maydell@linaro.org>2021-09-01 11:08:19 +0100
commit99abcbc7600c62c294e973db340adf6939932a93 (patch)
tree61c3fa0f1a7f6a70925a76a6d4f450610f9e40fe /hw/mem
parenta860df4f540d438a9531c70ff4eb0995841e7202 (diff)
downloadqemu-99abcbc7600c62c294e973db340adf6939932a93.zip
qemu-99abcbc7600c62c294e973db340adf6939932a93.tar.gz
qemu-99abcbc7600c62c294e973db340adf6939932a93.tar.bz2
clock: Provide builtin multiplier/divider
It is quite common for a clock tree to involve possibly programmable clock multipliers or dividers, where the frequency of a clock is for instance divided by 8 to produce a slower clock to feed to a particular device. Currently we provide no convenient mechanism for modelling this. You can implement it by having an input Clock and an output Clock, and manually setting the period of the output clock in the period-changed callback of the input clock, but that's quite clunky. This patch adds support in the Clock objects themselves for setting a multiplier or divider. The effect of setting this on a clock is that when the clock's period is changed, all the children of the clock are set to period * multiplier / divider, rather than being set to the same period as the parent clock. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alexandre Iooss <erdnaxe@crans.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Luc Michel <luc@lmichel.fr> Reviewed-by: Damien Hedde <damien.hedde@greensocs.com> Message-id: 20210812093356.1946-10-peter.maydell@linaro.org
Diffstat (limited to 'hw/mem')
0 files changed, 0 insertions, 0 deletions