common: Drop linux/delay.h from common header
[platform/kernel/u-boot.git] / drivers / rtc / imxdi.c
index e89034d..e3a1393 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (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
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
@@ -17,8 +16,7 @@
 #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>
@@ -209,8 +207,7 @@ int rtc_set(struct rtc_time *tmp)
                        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)
@@ -224,5 +221,3 @@ void rtc_reset(void)
 {
        di_init();
 }
-
-#endif