Skip to content

Commit 1b733a9

Browse files
AaronDotalexandrebelloni
authored andcommitted
rtc: Add rtc driver for the Loongson family chips
The Loongson family chips use an on-chip counter 0 (Time Of Year counter) as the RTC. We will refer to them as rtc-loongson. Cc: Keguang Zhang <[email protected]> Cc: Yang Ling <[email protected]> Cc: Jiaxun Yang <[email protected]> Signed-off-by: Binbin Zhou <[email protected]> Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: WANG Xuerui <[email protected]> Reviewed-by: Keguang Zhang <[email protected]> Tested-by: Keguang Zhang <[email protected]> Reviewed-by: Jiaxun Yang <[email protected]> Tested-by: Jiaxun Yang <[email protected]> # LS7A Link: https://lore.kernel.org/r/0c5171156390f614d72f36ceb04a20f432ca639e.1685693501.git.zhoubinbin@loongson.cn Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 9fb2309 commit 1b733a9

File tree

3 files changed

+411
-0
lines changed

3 files changed

+411
-0
lines changed

drivers/rtc/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,6 +1687,19 @@ config RTC_DRV_JZ4740
16871687
This driver can also be built as a module. If so, the module
16881688
will be called rtc-jz4740.
16891689

1690+
config RTC_DRV_LOONGSON
1691+
tristate "Loongson On-chip RTC"
1692+
depends on MACH_LOONGSON32 || MACH_LOONGSON64 || COMPILE_TEST
1693+
select REGMAP_MMIO
1694+
help
1695+
This is a driver for the Loongson on-chip Counter0 (Time-Of-Year
1696+
counter) to be used as a RTC.
1697+
It can be found on Loongson-1 series cpu, Loongson-2K series cpu
1698+
and Loongson LS7A bridge chips.
1699+
1700+
This driver can also be built as a module. If so, the module
1701+
will be called rtc-loongson.
1702+
16901703
config RTC_DRV_LPC24XX
16911704
tristate "NXP RTC for LPC178x/18xx/408x/43xx"
16921705
depends on ARCH_LPC18XX || COMPILE_TEST

drivers/rtc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ obj-$(CONFIG_RTC_DRV_ISL12022) += rtc-isl12022.o
7878
obj-$(CONFIG_RTC_DRV_ISL12026) += rtc-isl12026.o
7979
obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o
8080
obj-$(CONFIG_RTC_DRV_JZ4740) += rtc-jz4740.o
81+
obj-$(CONFIG_RTC_DRV_LOONGSON) += rtc-loongson.o
8182
obj-$(CONFIG_RTC_DRV_LP8788) += rtc-lp8788.o
8283
obj-$(CONFIG_RTC_DRV_LPC24XX) += rtc-lpc24xx.o
8384
obj-$(CONFIG_RTC_DRV_LPC32XX) += rtc-lpc32xx.o

0 commit comments

Comments
 (0)