From: Russell King Date: Sun, 17 Apr 2005 14:36:55 +0000 (+0100) Subject: [PATCH] ARM: footbridge rtc init X-Git-Tag: v2.6.12-rc3~27^2~14^2~4 X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=commitdiff_plain;h=336eb02b9171d132a9abe575317fee4cca965af4;hp=a757e64cfa400391041ed7953f0290c34a820c93 [PATCH] ARM: footbridge rtc init The footbridge ISA RTC was being initialised before we had setup the kernel timer. This caused a divide by zero error when the current time of day is set. Resolve this by initialising the RTC after the kernel timer has been initialised. Signed-off-by: Russell King --- diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c index 580e1d4bce08..da5b9b7623ca 100644 --- a/arch/arm/mach-footbridge/dc21285-timer.c +++ b/arch/arm/mach-footbridge/dc21285-timer.c @@ -51,8 +51,6 @@ static struct irqaction footbridge_timer_irq = { */ static void __init footbridge_timer_init(void) { - isa_rtc_init(); - timer1_latch = (mem_fclk_21285 + 8 * HZ) / (16 * HZ); *CSR_TIMER1_CLR = 0; @@ -60,6 +58,8 @@ static void __init footbridge_timer_init(void) *CSR_TIMER1_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_AUTORELOAD | TIMER_CNTL_DIV16; setup_irq(IRQ_TIMER1, &footbridge_timer_irq); + + isa_rtc_init(); } struct sys_timer footbridge_timer = {