/* Initialize the RTC hardware @rtc RTC private data structure  */
static int kinetis_rtc_hw_init(struct kinetis_rtc *rtc)
/* Initialize the RTC hardware @rtc RTC private data structure  */
static int kinetis_rtc_hw_init(struct kinetis_rtc *rtc)
{
	int ret = 0;
	writel(0x0, &KINETIS_RTC(rtc)->rtc_ier);
	writel(0x0, &KINETIS_RTC(rtc)->rtc_tcr);
	if (readl(&KINETIS_RTC(rtc)->rtc_sr) & KINETIS_RTC_SR_TIF) {
		writel(0x0, &KINETIS_RTC(rtc)->rtc_sr);
		writel(0x1, &KINETIS_RTC(rtc)->rtc_tsr);
	}
	writel(KINETIS_RTC_SR_TCE, &KINETIS_RTC(rtc)->rtc_sr);
	d_printk(1, "cr=%x,sr=%x,ier=%x,ret=%d\n",
		readl(&KINETIS_RTC(rtc)->rtc_cr),
		readl(&KINETIS_RTC(rtc)->rtc_sr),
		readl(&KINETIS_RTC(rtc)->rtc_ier), ret);
	return ret;
}