From 09e81263e5013ce5add177d50c0b1da0725ce266 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Wed, 24 Jan 2018 16:08:13 +0100 Subject: sh: sh03: rtc: push down rtc class ops into driver The SH RTC support has an extra level of indirection to provide either the old read_persistent_clock/update_persistent_clock interface or the rtc-generic device for hctosys/systohc. By removing the indirection and always using the RTC_CLASS interface, we can avoid the lossy double conversion between rtc_time and timespec, so we end up supporting the entire range of 'year' values, and clarifying the rtc_set_time callback. I did not change the behavior of sh03_rtc_settimeofday(), which keeps just updating the seconds/minutes by calling set_rtc_mmss(), this could be improved if anyone cares. Also, the file should ideally be moved into drivers/rtc and not use rtc-generic. Signed-off-by: Arnd Bergmann --- arch/sh/configs/sh03_defconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/sh/configs') diff --git a/arch/sh/configs/sh03_defconfig b/arch/sh/configs/sh03_defconfig index 2156223405a1..489ffdfb1517 100644 --- a/arch/sh/configs/sh03_defconfig +++ b/arch/sh/configs/sh03_defconfig @@ -130,3 +130,5 @@ CONFIG_CRYPTO_SHA1=y CONFIG_CRYPTO_DEFLATE=y # CONFIG_CRYPTO_ANSI_CPRNG is not set CONFIG_CRC_CCITT=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_GENERIC=y -- cgit v1.2.3-59-g8ed1b