qemu-e2k/include/hw
Peter Maydell 99abcbc760 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
2021-09-01 11:08:19 +01:00
..
acpi hw/acpi/ich9: Enable ACPI PCI hot-plug 2021-07-16 04:33:35 -04:00
adc adc: Move the max111x driver to the adc directory 2021-06-17 07:10:32 -05:00
arm hw/arm/armv7m: Create input clocks 2021-09-01 11:08:19 +01:00
audio qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
block block: Add backend_defaults property 2021-07-06 14:28:55 +01:00
char hw/char/ibex_uart: Make the register layout private 2021-06-24 05:00:12 -07:00
core hw/core: Introduce CPUClass.gdb_adjust_breakpoint 2021-07-21 07:47:05 -10:00
cpu Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
cris hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
display Drop the deprecated lm32 target 2021-05-12 18:20:25 +02:00
dma hw/dma/xlnx-zdma Always expect 'dma' link property to be set 2021-08-26 17:01:59 +01:00
firmware hw/smbios: support for type 41 (onboard devices extended information) 2021-05-14 10:26:18 -04:00
gpio hw/gpio: Add GPIO model for Nuvoton NPCM7xx 2020-10-27 11:10:32 +00:00
hyperv Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
i2c hw/i2c: add support for PMBus 2021-07-08 14:15:45 -05:00
i386 hw: Add compat machines for 6.2 2021-09-01 11:08:16 +01:00
ide hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine 2021-07-19 10:08:45 +02:00
input hw/input/lm832x: Define TYPE_LM8323 in public header 2021-07-08 14:15:01 -05:00
intc arm: Move system PPB container handling to armv7m 2021-09-01 11:08:18 +01:00
ipack Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
ipmi Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
isa hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine 2021-07-19 10:08:45 +02:00
kvm target/i386: always create kvmclock device 2020-09-30 19:11:36 +02:00
m68k hw/m68k/next-cube: Add missing header comment to next-cube.h 2021-01-19 09:11:52 +01:00
mem pc-dimm: remove unnecessary get_vmstate_memory_region() method 2021-05-14 10:26:18 -04:00
mips hw/mips: Add a bootloader helper 2021-02-21 18:41:04 +01:00
misc arm: Move M-profile RAS register block into its own device 2021-09-01 11:08:18 +01:00
net hw/net: Add npcm7xx emc model 2021-03-05 15:17:34 +00:00
nubus Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
nvram fw_cfg: Refactor extra pci roots addition 2020-12-08 13:48:57 -05:00
pci hw/pci: Add pci_bus_range() to get PCI bus number range 2021-07-16 11:10:45 -04:00
pci-bridge Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pci-host ppc patch queue 2021-05-04 2021-05-05 20:29:14 +01:00
ppc ppc/xive: Export xive_presenter_notify() 2021-08-27 12:41:13 +10:00
rdma Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
remote multi-process: perform device reset in the remote process 2021-02-10 09:23:28 +00:00
riscv hw/riscv: opentitan: Add the flash alias 2021-07-15 08:56:00 +10:00
rtc m48t59: remove legacy m48t59_init() function 2020-10-18 16:21:42 +01:00
rx Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
s390x target/s390x: start moving TCG-only code to tcg/ 2021-07-07 14:01:56 +02:00
scsi esp: store lun coming from the MESSAGE OUT phase 2021-06-15 17:17:09 +02:00
sd Pull request trivial patches 20210220 2021-02-21 12:12:18 +00:00
sensor sensor: Move hardware sensors from misc to a sensor directory 2021-06-17 07:10:32 -05:00
sh4 hw/sh4: Add missing license 2021-03-06 16:18:42 +01:00
southbridge Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
sparc hw: Replace anti-social QOM type names 2021-03-19 15:18:43 +01:00
ssi aspeed/smc: Add extra controls to request DMA 2021-05-01 10:03:52 +02:00
timer hw/timer/armv7m_systick: Add input clocks 2021-09-01 11:08:19 +01:00
tricore hw/tricore: Add testdevice for tests in tests/tcg/ 2021-05-18 09:36:21 +01:00
usb Remove leading underscores from QEMU defines 2021-06-21 05:49:01 +02:00
vfio vfio: Query and store the maximum number of possible DMA mappings 2021-07-08 15:54:45 -04:00
virtio hw/display: fix virgl reset regression 2021-07-22 15:46:54 +02:00
watchdog arm: Remove frq properties on CMSDK timer, dualtimer, watchdog, ARMSSE 2021-01-29 15:54:44 +00:00
xen xen: Free xenforeignmemory_resource at exit 2021-05-10 13:43:58 +01:00
xtensa Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
boards.h hw: Add compat machines for 6.2 2021-09-01 11:08:16 +01:00
clock.h clock: Provide builtin multiplier/divider 2021-09-01 11:08:19 +01:00
elf_ops.h Remove the deprecated moxie target 2021-05-12 17:42:23 +02:00
fw-path-provider.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
hotplug.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
hw.h Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
ide.h hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h 2020-03-17 12:22:36 -04:00
irq.h include/hw/irq.h: New function qemu_irq_is_connected() 2020-08-03 17:55:03 +01:00
loader-fit.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
loader.h hw/core/loader: Add new function rom_ptr_for_as() 2021-03-23 11:47:31 +00:00
nmi.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
or-irq.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
pcmcia.h Use OBJECT_DECLARE_TYPE when possible 2020-09-18 14:12:32 -04:00
platform-bus.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
ptimer.h ptimer: Add new ptimer_set_period_from_clock() function 2021-01-29 15:54:42 +00:00
qdev-clock.h clock: Add ClockEvent parameter to callbacks 2021-03-08 17:20:01 +00:00
qdev-core.h machine: introduce MachineInitPhase 2020-12-15 12:51:52 -05:00
qdev-dma.h Supply missing header guards 2019-06-12 13:20:21 +02:00
qdev-properties-system.h qdev: Reuse DEFINE_PROP in all DEFINE_PROP_* macros 2020-12-18 15:20:17 -05:00
qdev-properties.h qdev: Rename qdev_get_prop_ptr() to object_field_prop_ptr() 2020-12-18 15:20:18 -05:00
register.h hw/core/register: Add more 64-bit utilities 2021-09-01 11:59:12 +10:00
registerfields.h hw/registerfields: Use 64-bit bitfield for FIELD_DP64 2021-09-01 11:59:12 +10:00
resettable.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00
stream.h hw/core/stream: Rename StreamSlave as StreamSink 2020-12-10 12:15:04 -05:00
sysbus.h qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
usb.h usb: drop usb_host_dev_is_scsi_storage hook 2021-07-09 18:21:33 +02:00
vmstate-if.h Use DECLARE_*CHECKER* macros 2020-09-09 09:27:09 -04:00