qemu-e2k/include/hw
Peter Maydell ad140dadd5 ptimer: Add new ptimer_set_period_from_clock() function
The ptimer API currently provides two methods for setting the period:
ptimer_set_period(), which takes a period in nanoseconds, and
ptimer_set_freq(), which takes a frequency in Hz.  Neither of these
lines up nicely with the Clock API, because although both the Clock
and the ptimer track the frequency using a representation of whole
and fractional nanoseconds, conversion via either period-in-ns or
frequency-in-Hz will introduce a rounding error.

Add a new function ptimer_set_period_from_clock() which takes the
Clock object directly to avoid the rounding issues.  This includes a
facility for the user to specify that there is a frequency divider
between the Clock proper and the timer, as some timer devices like
the CMSDK APB dualtimer need this.

To avoid having to drag in clock.h from ptimer.h we add the Clock
type to typedefs.h.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Luc Michel <luc@lmichel.fr>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210128114145.20536-2-peter.maydell@linaro.org
Message-id: 20210121190622.22000-2-peter.maydell@linaro.org
2021-01-29 15:54:42 +00:00
..
acpi acpi: Add addr offset in build_crs 2021-01-17 06:42:54 -05:00
adc hw/adc: Add an ADC module for NPCM7XX 2021-01-12 21:19:02 +00:00
arm arm-virt: add secure pl061 for reset/power down 2021-01-29 10:47:28 +00:00
audio
block qdev: Move softmmu properties to qdev-properties-system.h 2020-12-18 15:20:17 -05:00
char hw/char/pl011: add a clock input 2020-10-27 11:10:44 +00:00
core tcg: Make tb arg to synchronize_from_tb const 2021-01-07 05:09:41 -10:00
cpu Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
cris
display Clean up includes 2020-12-10 17:16:44 +01:00
dma Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
firmware
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 Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
i386 i386: remove bios_name 2020-12-10 12:15:05 -05:00
ide nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
input input: tsc2xxx fix. 2020-09-22 21:11:10 +01:00
intc hw/ppc: Remove unused ppcuic_init() 2021-01-19 10:20:29 +11: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 vt82c686: Remove legacy vt82c686b_pm_init() function 2021-01-04 23:24:44 +01:00
kvm target/i386: always create kvmclock device 2020-09-30 19:11:36 +02:00
lm32
m68k hw/m68k/next-cube: Add missing header comment to next-cube.h 2021-01-19 09:11:52 +01:00
mem memory-device: Add get_min_alignment() callback 2020-11-03 07:19:26 -05:00
mips hw/mips: Move address translation helpers to target/mips/ 2020-12-13 19:58:54 +01:00
misc hw/misc/pvpanic: add PCI interface support 2021-01-29 10:47:28 +00:00
net hw/net/can: Introduce Xilinx ZynqMP CAN controller 2020-12-10 11:30:44 +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/misc/pvpanic: add PCI interface support 2021-01-29 10:47:28 +00:00
pci-bridge Use OBJECT_DECLARE_SIMPLE_TYPE when possible 2020-09-18 14:12:32 -04:00
pci-host spapr: Fix buffer overflow in spapr_numa_associativity_init() 2021-01-06 11:09:59 +11:00
ppc spapr_hcall.c: make do_client_architecture_support static 2021-01-19 10:20:29 +11:00
rdma
riscv riscv: Pass RISCVHartArrayState by pointer 2021-01-16 14:34:46 -08:00
rtc m48t59: remove legacy m48t59_init() function 2020-10-18 16:21:42 +01:00
rx
s390x s390x/pci: fix endianness issues 2020-11-18 16:59:29 +01:00
scsi scsi/scsi_bus: Add scsi_device_get 2020-10-12 11:50:51 -04:00
sd hw/sd: sd.h: Cosmetic change of using spaces 2021-01-24 20:11:05 +01:00
semihosting semihosting: Fix Lesser GPL version number 2020-11-15 16:38:03 +01:00
sh4
southbridge
sparc include/hw/sparc/grlib.h: Remove unused set_pil_in_fn typedef 2021-01-06 11:41:37 +00:00
ssi hw/core/stream: Rename StreamSlave as StreamSink 2020-12-10 12:15:04 -05:00
timer hw/timer: Refactor NPCM7XX Timer to use CLK clock 2021-01-12 21:19:02 +00:00
tricore
unicore32
usb usb: xlnx-usb-subsystem: Add xilinx usb subsystem 2020-12-15 12:04:30 +00:00
vfio vfio: Change default dirty pages tracking behavior during migration 2020-11-23 10:05:58 -07:00
virtio vhost-user-fs: add the "bootindex" property 2021-01-13 09:06:37 -05:00
watchdog hw/watchdog: Implement SBSA watchdog device 2020-10-27 11:10:44 +00:00
xen xen: remove GNUC check 2020-12-15 12:53:13 -05:00
xtensa
boards.h vl: clean up -boot variables 2020-12-10 12:15:19 -05:00
clock.h clock: Define and use new clock_display_freq() 2021-01-04 23:24:44 +01:00
elf_ops.h elf_ops.h: Be more verbose with ROM blob names 2020-12-15 12:04:30 +00:00
fw-path-provider.h
hotplug.h
hw.h
ide.h
irq.h
loader-fit.h nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
loader.h
nmi.h
or-irq.h
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
qdev-core.h machine: introduce MachineInitPhase 2020-12-15 12:51:52 -05:00
qdev-dma.h
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
registerfields.h
resettable.h
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: add pcap support. 2021-01-22 14:51:35 +01:00
vmstate-if.h