clocksource: ARM sp804: obtain sp804 timer rate via clks
[linux-2.6-microblaze.git] / arch / arm / mach-vexpress / v2m.c
index ba46e8e..77d5db3 100644 (file)
@@ -65,7 +65,7 @@ static void __init v2m_timer_init(void)
        writel(0, MMIO_P2V(V2M_TIMER0) + TIMER_CTRL);
        writel(0, MMIO_P2V(V2M_TIMER1) + TIMER_CTRL);
 
-       sp804_clocksource_init(MMIO_P2V(V2M_TIMER1));
+       sp804_clocksource_init(MMIO_P2V(V2M_TIMER1), "v2m-timer1");
        sp804_clockevents_init(MMIO_P2V(V2M_TIMER0), IRQ_V2M_TIMER0);
 }
 
@@ -333,6 +333,10 @@ static struct clk osc2_clk = {
        .rate   = 24000000,
 };
 
+static struct clk v2m_sp804_clk = {
+       .rate   = 1000000,
+};
+
 static struct clk dummy_apb_pclk;
 
 static struct clk_lookup v2m_lookups[] = {
@@ -363,6 +367,10 @@ static struct clk_lookup v2m_lookups[] = {
        }, {    /* CLCD */
                .dev_id         = "mb:clcd",
                .clk            = &osc1_clk,
+       }, {    /* SP804 timers */
+               .dev_id         = "sp804",
+               .con_id         = "v2m-timer1",
+               .clk            = &v2m_sp804_clk,
        },
 };