aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-07-03 13:49:22 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-07-03 17:09:44 +1000
commit642a2f8a27629ef0782b29d7a719cab0688456f8 (patch)
treefa37ea55b76dae1278ddd4f132f463366ea34286 /core
parentef50b5f5ad2834996eabc7e10885659a1ef65196 (diff)
downloadskiboot-642a2f8a27629ef0782b29d7a719cab0688456f8.zip
skiboot-642a2f8a27629ef0782b29d7a719cab0688456f8.tar.gz
skiboot-642a2f8a27629ef0782b29d7a719cab0688456f8.tar.bz2
plat/qemu: Add LPC based RTC support
This adds a driver for standard CMOS RTC chips and use it from the QEMU platform. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/time-utils.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/core/time-utils.c b/core/time-utils.c
index 10a4da4..573e7f1 100644
--- a/core/time-utils.c
+++ b/core/time-utils.c
@@ -16,23 +16,6 @@
#include <time-utils.h>
-/* MSB is byte 3, LSB is byte 0 */
-static unsigned int bcd_byte(uint32_t bcd, int byteno)
-{
- bcd >>= byteno * 8;
- return (bcd >> 4 & 0xf) * 10 + (bcd & 0xf);
-}
-
-static uint32_t int_to_bcd2(unsigned int x)
-{
- return (((x / 10) << 4) & 0xf0) | (x % 10);
-}
-
-static uint32_t int_to_bcd4(unsigned int x)
-{
- return int_to_bcd2(x / 100) << 8 | int_to_bcd2(x % 100);
-}
-
/*
* Converts an OPAL formated datetime into a struct tm. We ignore microseconds
* as Linux doesn't use them anyway.