projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: Drop linux/delay.h from common header
[platform/kernel/u-boot.git]
/
drivers
/
rtc
/
imxdi.c
diff --git
a/drivers/rtc/imxdi.c
b/drivers/rtc/imxdi.c
index
0d7d736
..
e3a1393
100644
(file)
--- a/
drivers/rtc/imxdi.c
+++ b/
drivers/rtc/imxdi.c
@@
-1,3
+1,4
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2009-2012 ADVANSEE
* Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
/*
* (C) Copyright 2009-2012 ADVANSEE
* Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
@@
-5,8
+6,6
@@
* Based on the Linux rtc-imxdi.c driver, which is:
* Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
* Copyright 2010 Orex Computed Radiography
* Based on the Linux rtc-imxdi.c driver, which is:
* Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
* Copyright 2010 Orex Computed Radiography
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
*/
/*
@@
-17,8
+16,7
@@
#include <command.h>
#include <linux/compat.h>
#include <rtc.h>
#include <command.h>
#include <linux/compat.h>
#include <rtc.h>
-
-#if defined(CONFIG_CMD_DATE)
+#include <linux/delay.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
@@
-192,7
+190,7
@@
int rtc_get(struct rtc_time *tmp)
}
now = __raw_readl(&data.regs->dtcmr);
}
now = __raw_readl(&data.regs->dtcmr);
- to_tm(now, tmp);
+
rtc_
to_tm(now, tmp);
err:
return rc;
err:
return rc;
@@
-209,8
+207,7
@@
int rtc_set(struct rtc_time *tmp)
goto err;
}
goto err;
}
- now = mktime(tmp->tm_year, tmp->tm_mon, tmp->tm_mday,
- tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
+ now = rtc_mktime(tmp);
/* zero the fractional part first */
rc = DI_WRITE_WAIT(0, dtclr);
if (rc == 0)
/* zero the fractional part first */
rc = DI_WRITE_WAIT(0, dtclr);
if (rc == 0)
@@
-224,5
+221,3
@@
void rtc_reset(void)
{
di_init();
}
{
di_init();
}
-
-#endif