Drop all duplicate newlines. No functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
}
#endif
-
tmp->tm_sec = bcd2bin (sec & 0x7F);
tmp->tm_min = bcd2bin (min & 0x7F);
tmp->tm_hour = bcd2bin (hour & 0x3F);
return rel;
}
-
/*
* Set the RTC
*/
return 0;
}
-
/*
* Reset the RTC. We setting the date back to 1970-01-01.
* We also enable the oscillator output on the SQW/OUT pin and program
rtc_write (RTC_CTL_REG_ADDR, RTC_CTL_BIT_SQWE | RTC_CTL_BIT_RS1 | RTC_CTL_BIT_RS0);
}
-
/*
* Helper functions
*/
return (i2c_reg_read (CFG_SYS_I2C_RTC_ADDR, reg));
}
-
static void rtc_write (uchar reg, uchar val)
{
i2c_reg_write (CFG_SYS_I2C_RTC_ADDR, reg, val);
#define RTC_STAT_BIT_A2F 0x2 /* Alarm 2 flag */
#define RTC_STAT_BIT_OSF 0x80 /* Oscillator stop flag */
-
#if !CONFIG_IS_ENABLED(DM_RTC)
static uchar rtc_read (uchar reg);
static void rtc_write (uchar reg, uchar val);
return rel;
}
-
/*
* Set the RTC
*/
return 0;
}
-
/*
* Reset the RTC. We also enable the oscillator output on the
* SQW/INTB* pin and program it for 32,768 Hz output. Note that
#endif
}
-
/*
* Helper functions
*/
return (i2c_reg_read (CFG_SYS_I2C_RTC_ADDR, reg));
}
-
static void rtc_write (uchar reg, uchar val)
{
i2c_reg_write (CFG_SYS_I2C_RTC_ADDR, reg, val);
#define RTC_CTL_REG_ADDR 0x0e
#define RTC_STAT_REG_ADDR 0x0f
-
/*
* RTC control register bits
*/
#define RTC_STAT_BIT_BB32KHZ 0x40 /* Battery backed 32KHz Output */
#define RTC_STAT_BIT_EN32KHZ 0x8 /* Enable 32KHz Output */
-
#if !CONFIG_IS_ENABLED(DM_RTC)
static uchar rtc_read (uchar reg);
static void rtc_write (uchar reg, uchar val);
-
/*
* Get the current time from the RTC
*/
return rel;
}
-
/*
* Set the RTC
*/
return 0;
}
-
/*
* Reset the RTC. We also enable the oscillator output on the
* SQW/INTB* pin and program it for 32,768 Hz output. Note that
return (i2c_reg_read (CFG_SYS_I2C_RTC_ADDR, reg));
}
-
static void rtc_write (uchar reg, uchar val)
{
i2c_reg_write (CFG_SYS_I2C_RTC_ADDR, reg, val);
* TsiChung Liew (Tsi-Chung.Liew@freescale.com)
*/
-
#include <command.h>
#include <rtc.h>
#include <asm/immap.h>
RV3029_TRICKLE_80K)
#define RV3029_TRICKLE_SHIFT 4
-
static int rv3029_rtc_get(struct udevice *dev, struct rtc_time *tm)
{
u8 regs[RTC_RV3029_PAGE_LEN];
__func__, tm->tm_year, tm->tm_mon, tm->tm_mday,
tm->tm_wday, tm->tm_hour, tm->tm_min, tm->tm_sec);
-
if (tm->tm_year < 2000) {
printf("%s: year %d (before 2000) not supported\n",
__func__, tm->tm_year);