[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 <rmk@arm.linux.org.uk>
This commit is contained in:
@@ -51,8 +51,6 @@ static struct irqaction footbridge_timer_irq = {
|
|||||||
*/
|
*/
|
||||||
static void __init footbridge_timer_init(void)
|
static void __init footbridge_timer_init(void)
|
||||||
{
|
{
|
||||||
isa_rtc_init();
|
|
||||||
|
|
||||||
timer1_latch = (mem_fclk_21285 + 8 * HZ) / (16 * HZ);
|
timer1_latch = (mem_fclk_21285 + 8 * HZ) / (16 * HZ);
|
||||||
|
|
||||||
*CSR_TIMER1_CLR = 0;
|
*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;
|
*CSR_TIMER1_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_AUTORELOAD | TIMER_CNTL_DIV16;
|
||||||
|
|
||||||
setup_irq(IRQ_TIMER1, &footbridge_timer_irq);
|
setup_irq(IRQ_TIMER1, &footbridge_timer_irq);
|
||||||
|
|
||||||
|
isa_rtc_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sys_timer footbridge_timer = {
|
struct sys_timer footbridge_timer = {
|
||||||
|
Reference in New Issue
Block a user