/* A dryice write error is similar to a bus fault and should not occur in normal operation. Clearing the flag requires another write, so the root cause of the problem may need to be fixed before the flag can be cleared.  */
static void clear_write_error(void)
/* A dryice write error is similar to a bus fault and should not occur in normal operation. Clearing the flag requires another write, so the root cause of the problem may need to be fixed before the flag can be cleared.  */
static void clear_write_error(void)
{
	int cnt;
	puts("### Warning: RTC - Register write error!\n");
	__raw_writel(DSR_WEF, &data.regs->dsr);
	for (cnt = 0; cnt < 1000; cnt++) {
		if ((__raw_readl(&data.regs->dsr) & DSR_WEF) == 0)
			return;
		udelay(10);
	}
	puts("### Error: RTC - Cannot clear write-error flag!\n");
}