summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorr63889 <r63889@shlinux1.ap.freescale.net>2009-11-06 14:52:13 +0800
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-02-12 17:19:33 +0100
commit0f2bc62cb533f5e7f67e8e0100fa53b3a406e336 (patch)
tree53a4de9d342a8b8270cd1ebf0f127de4b2697ddb /drivers/rtc
parentf50dee220c487b485844912aa1902baa21098f34 (diff)
ENGR00113627 MX35 RTC: Make mxc_rtc independent of pmic_rtc
Remove get_ext_rtc_time/set_ext_rtc_time in rtc-mxc.c, making mxc_rtc totally independent of pmic_rtc. Signed-off-by: Lionel Xu <r63889@freescale.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-mxc.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
index b6b168d8ac6b..00e5158ab931 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -121,71 +121,11 @@ struct rtc_plat_data {
* @ingroup RTC
*/
-#if defined(CONFIG_MXC_PMIC_SC55112_RTC) || defined(CONFIG_MXC_MC13783_RTC) ||\
- defined(CONFIG_MXC_MC9SDZ60_RTC)
-#include <linux/pmic_rtc.h>
-#else
-#define pmic_rtc_get_time(args) MXC_EXTERNAL_RTC_NONE
-#define pmic_rtc_set_time(args) MXC_EXTERNAL_RTC_NONE
-#define pmic_rtc_loaded() 0
-#endif
-
#define RTC_VERSION "1.0"
#define MXC_EXTERNAL_RTC_OK 0
#define MXC_EXTERNAL_RTC_ERR -1
#define MXC_EXTERNAL_RTC_NONE -2
-/*!
- * This function reads the RTC value from some external source.
- *
- * @param second pointer to the returned value in second
- *
- * @return 0 if successful; non-zero otherwise
- */
-int get_ext_rtc_time(u32 * second)
-{
- int ret = 0;
- struct timeval tmp;
- if (!pmic_rtc_loaded()) {
- return MXC_EXTERNAL_RTC_NONE;
- }
-
- ret = pmic_rtc_get_time(&tmp);
-
- if (0 == ret)
- *second = tmp.tv_sec;
- else
- ret = MXC_EXTERNAL_RTC_ERR;
-
- return ret;
-}
-
-/*!
- * This function sets external RTC
- *
- * @param second value in second to be set to external RTC
- *
- * @return 0 if successful; non-zero otherwise
- */
-int set_ext_rtc_time(u32 second)
-{
- int ret = 0;
- struct timeval tmp;
-
- if (!pmic_rtc_loaded()) {
- return MXC_EXTERNAL_RTC_NONE;
- }
-
- tmp.tv_sec = second;
-
- ret = pmic_rtc_set_time(&tmp);
-
- if (0 != ret)
- ret = MXC_EXTERNAL_RTC_ERR;
-
- return ret;
-}
-
static u32 rtc_freq = 2; /* minimun value for PIE */
static unsigned long rtc_status;
@@ -500,16 +440,6 @@ static int mxc_rtc_set_time(struct device *dev, struct rtc_time *tm)
set_alarm_or_time(dev, MXC_RTC_TIME, time);
} while (time != get_alarm_or_time(dev, MXC_RTC_TIME));
- ret = set_ext_rtc_time(time);
-
- if (ret != MXC_EXTERNAL_RTC_OK) {
- if (ret == MXC_EXTERNAL_RTC_NONE) {
- pr_info("No external RTC\n");
- ret = 0;
- } else
- pr_info("Failed to set external RTC\n");
- }
-
return ret;
}