[U-Boot] [PATCH] Add support for DS1340 RTC

Implementation is the same as with a DS1337 but with different register addresses.
Signed-off-by: Darwin Dingel darwin.dingel@alliedtelesis.co.nz --- drivers/rtc/ds1337.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/rtc/ds1337.c b/drivers/rtc/ds1337.c index dae1b3c..0c1ba8c 100644 --- a/drivers/rtc/ds1337.c +++ b/drivers/rtc/ds1337.c @@ -43,6 +43,17 @@ #define RTC_CTL_REG_ADDR 0x0c #define RTC_STAT_REG_ADDR 0x0b #define RTC_TC_REG_ADDR 0x0a +#elif defined CONFIG_RTC_DS1340 +#define RTC_SEC_REG_ADDR 0x0 +#define RTC_MIN_REG_ADDR 0x1 +#define RTC_HR_REG_ADDR 0x2 +#define RTC_DAY_REG_ADDR 0x3 +#define RTC_DATE_REG_ADDR 0x4 +#define RTC_MON_REG_ADDR 0x5 +#define RTC_YR_REG_ADDR 0x6 +#define RTC_CTL_REG_ADDR 0x7 +#define RTC_TC_REG_ADDR 0x8 +#define RTC_STAT_REG_ADDR 0x9 #endif
/* @@ -164,7 +175,7 @@ void rtc_reset (void) { #ifdef CONFIG_SYS_RTC_DS1337 rtc_write (RTC_CTL_REG_ADDR, RTC_DS1337_RESET_VAL); -#elif defined CONFIG_SYS_RTC_DS1388 +#elif defined CONFIG_SYS_RTC_DS1388 || defined (CONFIG_RTC_DS1340) rtc_write(RTC_CTL_REG_ADDR, 0x0); /* hw default */ #endif #ifdef CONFIG_SYS_DS1339_TCR_VAL

On Mon, Jun 09, 2014 at 09:59:39AM +1200, Darwin Dingel wrote:
Implementation is the same as with a DS1337 but with different register addresses.
Signed-off-by: Darwin Dingel darwin.dingel@alliedtelesis.co.nz
Are you going to post patches for a board which sets CONFIG_RTC_DS1340 ?

Hi Tom,
Tom Rini wrote
On Mon, Jun 09, 2014 at 09:59:39AM +1200, Darwin Dingel wrote:
Implementation is the same as with a DS1337 but with different register addresses.
Signed-off-by: Darwin Dingel <
darwin.dingel@.co
>
Are you going to post patches for a board which sets CONFIG_RTC_DS1340 ?
No. Just the RTC support.
---
Darwin
-- View this message in context: http://u-boot.10912.n7.nabble.com/PATCH-Add-support-for-DS1340-RTC-tp181823p... Sent from the U-Boot mailing list archive at Nabble.com.
participants (3)
-
Darwin Dingel
-
darwind1
-
Tom Rini