aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/patches-5.4/302-clocksource-add-rtl9300-driver.patch
diff options
context:
space:
mode:
authorBirger Koblitz <git@birger-koblitz.de>2021-01-21 21:38:27 +0100
committerPetr Štetiar <ynezz@true.cz>2021-01-26 15:06:50 +0100
commit8faffa00cb6b7121fbdac3d5cff8bab9a253ae93 (patch)
treecd6346cf84692d523aaf082af5b427c74abd79fe /target/linux/realtek/patches-5.4/302-clocksource-add-rtl9300-driver.patch
parent03c79ca269e612faa55e3decd034c44f9b77c05c (diff)
downloadupstream-8faffa00cb6b7121fbdac3d5cff8bab9a253ae93.tar.gz
upstream-8faffa00cb6b7121fbdac3d5cff8bab9a253ae93.tar.bz2
upstream-8faffa00cb6b7121fbdac3d5cff8bab9a253ae93.zip
realtek: add support for the RTL9300 timer
this adds support for the SoC timer of the RTL9300 chips, it provides 6 independent timer/counters, of which the first one is used as a clocksource and the second one as event timer. Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Diffstat (limited to 'target/linux/realtek/patches-5.4/302-clocksource-add-rtl9300-driver.patch')
-rw-r--r--target/linux/realtek/patches-5.4/302-clocksource-add-rtl9300-driver.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/realtek/patches-5.4/302-clocksource-add-rtl9300-driver.patch b/target/linux/realtek/patches-5.4/302-clocksource-add-rtl9300-driver.patch
new file mode 100644
index 0000000000..763f6adc58
--- /dev/null
+++ b/target/linux/realtek/patches-5.4/302-clocksource-add-rtl9300-driver.patch
@@ -0,0 +1,34 @@
+--- a/drivers/clocksource/Kconfig
++++ b/drivers/clocksource/Kconfig
+@@ -126,6 +126,15 @@
+ help
+ Enables the support for the RDA Micro timer driver.
+
++config RTL9300_TIMER
++ bool "Clocksource/timer for the Realtek RTL9300 family of SoCs"
++ depends on MIPS
++ select COMMON_CLK
++ select TIMER_OF
++ select CLKSRC_MMIO
++ help
++ Enables support for the Realtek RTL9300 timer driver.
++
+ config SUN4I_TIMER
+ bool "Sun4i timer driver" if COMPILE_TEST
+ depends on HAS_IOMEM
+@@ -695,5 +704,4 @@
+ select IRQ_DOMAIN
+ help
+ Support for the timer/counter unit of the Ingenic JZ SoCs.
+-
+ endmenu
+--- a/drivers/clocksource/Makefile
++++ b/drivers/clocksource/Makefile
+@@ -61,6 +61,7 @@
+ obj-$(CONFIG_SPRD_TIMER) += timer-sprd.o
+ obj-$(CONFIG_NPCM7XX_TIMER) += timer-npcm7xx.o
+ obj-$(CONFIG_RDA_TIMER) += timer-rda.o
++obj-$(CONFIG_RTL9300_TIMER) += timer-rtl9300.o
+
+ obj-$(CONFIG_ARC_TIMERS) += arc_timer.o
+ obj-$(CONFIG_ARM_ARCH_TIMER) += arm_arch_timer.o