diff options
author | RajithaY <rajithax.yerrumsetty@intel.com> | 2017-04-25 03:31:15 -0700 |
---|---|---|
committer | Rajitha Yerrumchetty <rajithax.yerrumsetty@intel.com> | 2017-05-22 06:48:08 +0000 |
commit | bb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch) | |
tree | ca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/roms/u-boot/drivers/rtc/mc13xxx-rtc.c | |
parent | a14b48d18a9ed03ec191cf16b162206998a895ce (diff) |
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to
kvmfornfv repo and make use of the updated latest qemu for the
execution of all testcase
Change-Id: I1280af507a857675c7f81d30c95255635667bdd7
Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/roms/u-boot/drivers/rtc/mc13xxx-rtc.c')
-rw-r--r-- | qemu/roms/u-boot/drivers/rtc/mc13xxx-rtc.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/qemu/roms/u-boot/drivers/rtc/mc13xxx-rtc.c b/qemu/roms/u-boot/drivers/rtc/mc13xxx-rtc.c deleted file mode 100644 index 528247ac8..000000000 --- a/qemu/roms/u-boot/drivers/rtc/mc13xxx-rtc.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2008, Guennadi Liakhovetski <lg@denx.de> - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include <common.h> -#include <rtc.h> -#include <spi.h> -#include <power/pmic.h> -#include <fsl_pmic.h> - -int rtc_get(struct rtc_time *rtc) -{ - u32 day1, day2, time; - int tim, i = 0; - struct pmic *p = pmic_get("FSL_PMIC"); - int ret; - - if (!p) - return -1; - do { - ret = pmic_reg_read(p, REG_RTC_DAY, &day1); - if (ret < 0) - return -1; - - ret = pmic_reg_read(p, REG_RTC_TIME, &time); - if (ret < 0) - return -1; - - ret = pmic_reg_read(p, REG_RTC_DAY, &day2); - if (ret < 0) - return -1; - - } while (day1 != day2 && i++ < 3); - - tim = day1 * 86400 + time; - - to_tm(tim, rtc); - - rtc->tm_yday = 0; - rtc->tm_isdst = 0; - - return 0; -} - -int rtc_set(struct rtc_time *rtc) -{ - u32 time, day; - struct pmic *p = pmic_get("FSL_PMIC"); - if (!p) - return -1; - - time = mktime(rtc->tm_year, rtc->tm_mon, rtc->tm_mday, - rtc->tm_hour, rtc->tm_min, rtc->tm_sec); - day = time / 86400; - time %= 86400; - - pmic_reg_write(p, REG_RTC_DAY, day); - pmic_reg_write(p, REG_RTC_TIME, time); - - return 0; -} - -void rtc_reset(void) -{ -} |