summaryrefslogtreecommitdiff
path: root/include/os.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-04-20 12:37:22 -0600
committerSimon Glass <sjg@chromium.org>2015-05-05 20:58:20 -0600
commit94eefdee2f5db36d52e817a01b07c8255527e193 (patch)
treeadb1ffa3737bbc59a7b2eb0da93144f953865012 /include/os.h
parentaac5119822041febafdab3fc9ab6dbbe6ea96bff (diff)
downloadu-boot-imx-94eefdee2f5db36d52e817a01b07c8255527e193.zip
u-boot-imx-94eefdee2f5db36d52e817a01b07c8255527e193.tar.gz
u-boot-imx-94eefdee2f5db36d52e817a01b07c8255527e193.tar.bz2
dm: sandbox: Add os_localtime() to obtain the system time
Add a function to read the system time into U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/os.h')
-rw-r--r--include/os.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/os.h b/include/os.h
index a758f09..ffbdce8 100644
--- a/include/os.h
+++ b/include/os.h
@@ -13,6 +13,7 @@
#include <linux/types.h>
+struct rtc_time;
struct sandbox_state;
/**
@@ -277,4 +278,14 @@ int os_read_ram_buf(const char *fname);
*/
int os_jump_to_image(const void *dest, int size);
+/**
+ * Read the current system time
+ *
+ * This reads the current Local Time and places it into the provided
+ * structure.
+ *
+ * @param rt Place to put system time
+ */
+void os_localtime(struct rtc_time *rt);
+
#endif