]> Git Repo - J-u-boot.git/commitdiff
board: ge: common: rename ge_common.c to ge_rtc.c
authorSebastian Reichel <[email protected]>
Wed, 2 Sep 2020 17:31:43 +0000 (19:31 +0200)
committerStefano Babic <[email protected]>
Sun, 1 Nov 2020 14:58:47 +0000 (15:58 +0100)
The file only contains RTC related code, so let's name
it accordingly.

Signed-off-by: Sebastian Reichel <[email protected]>
board/ge/bx50v3/bx50v3.c
board/ge/common/Makefile
board/ge/common/ge_common.c [deleted file]
board/ge/common/ge_common.h [deleted file]
board/ge/common/ge_rtc.c [new file with mode: 0644]
board/ge/common/ge_rtc.h [new file with mode: 0644]
board/ge/mx53ppd/mx53ppd.c

index cf76cf7a3387b78fbc3955a5ad4ffc07b30f26d7..c6b0af8c776abba4841dd2c37396bc922890e3c6 100644 (file)
@@ -35,7 +35,7 @@
 #include <version.h>
 #include <stdlib.h>
 #include <dm/root.h>
-#include "../common/ge_common.h"
+#include "../common/ge_rtc.h"
 #include "../common/vpd_reader.h"
 #include "../../../drivers/net/e1000.h"
 #include <pci.h>
index 8a21dcb8b5333b63eff1be1b6f20dc1fe78f4587..36bedb198077c740daca8690ddb0111dab494c97 100644 (file)
@@ -2,4 +2,4 @@
 #
 # Copyright 2017 General Electric Company
 
-obj-y  := vpd_reader.o ge_common.o
+obj-y  := vpd_reader.o ge_rtc.o
diff --git a/board/ge/common/ge_common.c b/board/ge/common/ge_common.c
deleted file mode 100644 (file)
index 48c3778..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * Copyright 2017 General Electric Company
- */
-
-#include <common.h>
-#include <env.h>
-#include <dm/uclass.h>
-#include <rtc.h>
-
-void check_time(void)
-{
-       struct udevice *dev;
-       int ret, i;
-       struct rtc_time tm;
-       u8 retry = 3;
-
-       ret = uclass_get_device(UCLASS_RTC, 0, &dev);
-       if (ret) {
-               env_set("rtc_status", "FAIL");
-               return;
-       }
-
-       for (i = 0; i < retry; i++) {
-               ret = dm_rtc_get(dev, &tm);
-               if (!ret || ret == -EINVAL)
-                       break;
-       }
-
-       if (!ret && tm.tm_year > 2037) {
-               tm.tm_sec  = 0;
-               tm.tm_min  = 0;
-               tm.tm_hour = 0;
-               tm.tm_mday = 1;
-               tm.tm_wday = 2;
-               tm.tm_mon  = 1;
-               tm.tm_year = 2036;
-
-               for (i = 0; i < retry; i++) {
-                       ret = dm_rtc_set(dev, &tm);
-                       if (!ret)
-                               break;
-               }
-
-               if (ret >= 0)
-                       ret = 2038;
-       }
-
-       if (ret < 0)
-               env_set("rtc_status", "FAIL");
-       else if (ret == 2038)
-               env_set("rtc_status", "2038");
-       else
-               env_set("rtc_status", "OK");
-}
-
diff --git a/board/ge/common/ge_common.h b/board/ge/common/ge_common.h
deleted file mode 100644 (file)
index d33486d..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright 2017 General Electric Company
- */
-
-void check_time(void);
diff --git a/board/ge/common/ge_rtc.c b/board/ge/common/ge_rtc.c
new file mode 100644 (file)
index 0000000..48c3778
--- /dev/null
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2017 General Electric Company
+ */
+
+#include <common.h>
+#include <env.h>
+#include <dm/uclass.h>
+#include <rtc.h>
+
+void check_time(void)
+{
+       struct udevice *dev;
+       int ret, i;
+       struct rtc_time tm;
+       u8 retry = 3;
+
+       ret = uclass_get_device(UCLASS_RTC, 0, &dev);
+       if (ret) {
+               env_set("rtc_status", "FAIL");
+               return;
+       }
+
+       for (i = 0; i < retry; i++) {
+               ret = dm_rtc_get(dev, &tm);
+               if (!ret || ret == -EINVAL)
+                       break;
+       }
+
+       if (!ret && tm.tm_year > 2037) {
+               tm.tm_sec  = 0;
+               tm.tm_min  = 0;
+               tm.tm_hour = 0;
+               tm.tm_mday = 1;
+               tm.tm_wday = 2;
+               tm.tm_mon  = 1;
+               tm.tm_year = 2036;
+
+               for (i = 0; i < retry; i++) {
+                       ret = dm_rtc_set(dev, &tm);
+                       if (!ret)
+                               break;
+               }
+
+               if (ret >= 0)
+                       ret = 2038;
+       }
+
+       if (ret < 0)
+               env_set("rtc_status", "FAIL");
+       else if (ret == 2038)
+               env_set("rtc_status", "2038");
+       else
+               env_set("rtc_status", "OK");
+}
+
diff --git a/board/ge/common/ge_rtc.h b/board/ge/common/ge_rtc.h
new file mode 100644 (file)
index 0000000..d33486d
--- /dev/null
@@ -0,0 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2017 General Electric Company
+ */
+
+void check_time(void);
index 7627e9c370fb205363d8d6126d5ce88fec0c0bf6..2e9d389850a2b692f226b2fe48b82ae5ca81496b 100644 (file)
@@ -36,7 +36,7 @@
 #include <watchdog.h>
 #include "ppd_gpio.h"
 #include <stdlib.h>
-#include "../../ge/common/ge_common.h"
+#include "../../ge/common/ge_rtc.h"
 #include "../../ge/common/vpd_reader.h"
 
 DECLARE_GLOBAL_DATA_PTR;
This page took 0.044773 seconds and 4 git commands to generate.