qemu-e2k/hw/timer
Peter Maydell 9598c1bb39 ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY
The traditional ptimer behaviour includes a collection of weird edge
case behaviours.  In 2016 we improved the ptimer implementation to
fix these and generally make the behaviour more flexible, with
ptimers opting in to the new behaviour by passing an appropriate set
of policy flags to ptimer_init().  For backwards-compatibility, we
defined PTIMER_POLICY_DEFAULT (which sets no flags) to give the old
weird behaviour.

This turns out to be a poor choice of name, because people writing
new devices which use ptimers are misled into thinking that the
default is probably a sensible choice of flags, when in fact it is
almost always not what you want.  Rename PTIMER_POLICY_DEFAULT to
PTIMER_POLICY_LEGACY and beef up the comment to more clearly say that
new devices should not be using it.

The code-change part of this commit was produced by
  sed -i -e 's/PTIMER_POLICY_DEFAULT/PTIMER_POLICY_LEGACY/g' $(git grep -l PTIMER_POLICY_DEFAULT)
with the exception of a test name string change in
tests/unit/ptimer-test.c which was added manually.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220516103058.162280-1-peter.maydell@linaro.org
2022-05-19 16:19:03 +01:00
..
a9gtimer.c hw/timer: fix a9gtimer vmstate 2022-02-21 13:30:21 +00:00
allwinner-a10-pit.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
altera_timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
arm_mptimer.c
arm_timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
armv7m_systick.c hw/timer/armv7m_systick: Update clock source before enabling timer 2022-02-08 10:56:28 +00:00
aspeed_timer.c aspeed/timer: Add AST1030 support 2022-05-02 17:03:03 +02:00
avr_timer16.c
bcm2835_systmr.c
cadence_ttc.c timer: cadence_ttc: Break out header file to allow embedding 2022-04-21 11:37:03 +01:00
cmsdk-apb-dualtimer.c
cmsdk-apb-timer.c
digic-timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
etraxfs_timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
exynos4210_mct.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
exynos4210_pwm.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
grlib_gptimer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
hpet.c
i8254_common.c
i8254.c
ibex_timer.c hw: timer: ibex_timer: update/add reg address 2022-01-21 15:52:56 +10:00
imx_epit.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
imx_gpt.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
Kconfig hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
meson.build hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
mips_gictimer.c hw: Do not include hw/sysbus.h if it is not necessary 2021-05-02 17:24:50 +02:00
mss-timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
npcm7xx_timer.c
nrf51_timer.c
omap_gptimer.c
omap_synctimer.c
pxa2xx_timer.c
renesas_cmt.c
renesas_tmr.c hw/timer/renesas_tmr: Add default-case asserts in read_tcnt() 2021-03-30 14:05:34 +01:00
sh_timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
sifive_pwm.c hw/timer: Add SiFive PWM support 2021-09-21 07:56:49 +10:00
slavio_timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00
sse-counter.c hw: Do not include hw/irq.h if it is not necessary 2021-05-02 17:24:50 +02:00
sse-timer.c
stellaris-gptm.c hw/timer/stellaris-gptm: Use Clock input instead of system_clock_scale 2021-09-01 11:08:20 +01:00
stm32f2xx_timer.c
trace-events hw/sh4: Change debug printfs to traces 2021-10-30 18:39:37 +02:00
trace.h
xilinx_timer.c ptimer: Rename PTIMER_POLICY_DEFAULT to PTIMER_POLICY_LEGACY 2022-05-19 16:19:03 +01:00