summaryrefslogtreecommitdiff
path: root/drivers/rtc/at91sam9_rtt.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-05-08 10:46:59 -0400
committerTom Rini <trini@konsulko.com>2015-05-08 10:46:59 -0400
commit02ffb580e6ab7aaa7f6703ed35f489e97439cb65 (patch)
tree77cea28c53d54583a3acfa5534a8aa10054eb29c /drivers/rtc/at91sam9_rtt.c
parent57cc4e64c13bc5f42cb5e8572d2c46e25cf7aea1 (diff)
parenta5e1bcdeebebabdc5d013fbd488f87a4e62ff411 (diff)
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'drivers/rtc/at91sam9_rtt.c')
-rw-r--r--drivers/rtc/at91sam9_rtt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/rtc/at91sam9_rtt.c b/drivers/rtc/at91sam9_rtt.c
index 714dd2a34f..a684ad6a6f 100644
--- a/drivers/rtc/at91sam9_rtt.c
+++ b/drivers/rtc/at91sam9_rtt.c
@@ -44,7 +44,7 @@ int rtc_get (struct rtc_time *tmp)
} while (tim!=tim2);
off = readl(&gpbr->reg[AT91_GPBR_INDEX_TIMEOFF]);
/* off==0 means time is invalid, but we ignore that */
- to_tm (tim+off, tmp);
+ rtc_to_tm(tim+off, tmp);
return 0;
}
@@ -54,8 +54,7 @@ int rtc_set (struct rtc_time *tmp)
at91_gpbr_t *gpbr = (at91_gpbr_t *) ATMEL_BASE_GPBR;
ulong tim;
- tim = mktime (tmp->tm_year, tmp->tm_mon, tmp->tm_mday,
- tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+ tim = rtc_mktime(tmp);
/* clear alarm, set prescaler to 32768, clear counter */
writel(32768+AT91_RTT_RTTRST, &rtt->mr);