/* Also, since RTC_LR is transferred to RTC_CR on next rising edge of the 1Hz clock, we must write the time one second in advance.  */
static int pl030_set_time(struct device *dev, struct rtc_time *tm)
/* Also, since RTC_LR is transferred to RTC_CR on next rising edge of the 1Hz clock, we must write the time one second in advance.  */
static int pl030_set_time(struct device *dev, struct rtc_time *tm)
{
	struct pl030_rtc *rtc = dev_get_drvdata(dev);
	unsigned long time;
	int ret;
	ret = rtc_tm_to_time(tm, &time);
	if (ret == 0)
		writel(time + 1, rtc->base + RTC_LR);
	return ret;
}