tn3399_openwrt/target/linux
Markus Stockhausen 3cc8011171 realtek: resurrect timer driver
Now that we provide a clock driver for the Reltek SOCs the CPU frequency might
change on demand. This has direct visible effects during operation

- the CEVT 4K timer is no longer a stable clocksource
- after CPU frequencies changes time calculation works wrong
- sched_clock falls back to kernel default interval (100 Hz)
- timestamps in dmesg have only 2 digits left

[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps ...
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.080000] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.090000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ...

Looking around where we can start the CEVT timer for RTL930X is a good basis.
Initially it was developed as a clocksource driver for the broken timer in that
specific SOC series. Afterwards it was shifted around to the CEVT location,
got SMP enablement and lost its clocksource feature. So we at least have
something to copy from. As the timers on these devices are well understood
the implementation follows this way:

- leave the RTL930X implementation as is
- provide a new driver for RTL83XX devices only
- swap RTL930X driver at a later time

Like the clock driver this patch contains a self contained module that is SOC
independet and already provides full support for the RTL838X, RTL839X and
RTL930X devices. Some of the new (or reestablished) features are:

- simplified initialization routines
- SMP setup with CPU hotplug framework
- derived from LXB clock speed
- supplied clocksource
- dedicated register functions for better readability
- documentation about some caveats

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
[remove unused header includes, remove old CONFIG_MIPS dependency, add
REALTEK_ prefix to driver symbol]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2022-10-23 22:33:08 +02:00
..
airoha airoha: fix imagebuilder generation by introducing generic target 2022-10-13 17:38:59 +02:00
apm821xx apm821xx: make 5.15 kernel default 2022-09-24 23:53:53 +02:00
archs38 kernel: remove target specific CONFIG_IKCONFIG lines 2022-10-14 13:15:47 +02:00
armvirt kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
at91 at91: kernel v5.15: use KERNEL_TESTING_PATCHVER:=5.15 2022-10-22 00:51:25 +02:00
ath25 kernel: bump 5.10 to 5.10.137 2022-08-23 10:37:04 +02:00
ath79 ath79: fix reference clock for RouterBoard 912UAG 2022-10-23 01:45:52 +02:00
bcm27xx kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
bcm47xx kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
bcm53xx bcm53xx: only fixup seama on D-Link DIR-885L 2022-10-21 08:54:34 +02:00
bcm63xx kernel: bump 5.15 to 5.15.62 2022-08-23 10:37:04 +02:00
bcm4908 kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
bmips kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
gemini kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
generic kernel: move mac-address-ascii patches to generic 2022-10-23 01:45:52 +02:00
imx kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
ipq40xx ipq40xx: Convert Google Wifi to DSA, reenable 2022-10-23 08:27:40 +02:00
ipq806x ipq806x: 5.15: add 6.1 tag to upstream patch 2022-10-18 22:21:04 +02:00
kirkwood kernel: remove hack patch, move kirkwood specific kmods to target modules.mk 2022-09-30 12:59:19 +02:00
lantiq lantiq: add 6.1 tag to upstream patch 2022-10-23 01:45:52 +02:00
layerscape kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
malta kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
mediatek kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
mpc85xx mpc85xx: fix unset kernel symbol 2022-10-14 23:13:02 +02:00
mvebu kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
mxs kernel: Activate CONFIG_GPIOLIB in generic configuration 2022-08-10 21:36:17 +02:00
octeon kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
octeontx kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
omap kernel: remove target specific CONFIG_IKCONFIG lines 2022-10-14 13:15:47 +02:00
oxnas oxnas: shuttle-kd20: fix thermal zone 2022-10-21 20:57:53 +01:00
pistachio kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
qoriq qoriq: fix typo in FEATURES 2022-10-05 14:36:00 +03:00
ramips ramips: fix WAN mac address allocation for Unielec 01 and 06 models 2022-10-23 01:45:52 +02:00
realtek realtek: resurrect timer driver 2022-10-23 22:33:08 +02:00
rockchip kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
sunxi kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config 2022-10-21 13:47:01 +02:00
tegra kernel: Move some IOMMU options to generic 2022-09-24 13:49:47 +02:00
uml kernel: bump 5.10 to 5.10.146 2022-10-02 20:21:55 +02:00
x86 x86: switch to 5.15 as default kernel 2022-10-19 21:40:23 +02:00
zynq kernel: remove target specific CONFIG_IKCONFIG lines 2022-10-14 13:15:47 +02:00
Makefile build: fix issues with targets installed via feeds 2022-09-27 13:41:12 +02:00