irq: Kill pointless irqd_to_hw export
[linux-3.10.git] / arch / c6x / platforms / timer64.c
index 7834158..3c73d74 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/of_address.h>
 #include <asm/soc.h>
 #include <asm/dscr.h>
+#include <asm/special_insns.h>
 #include <asm/timer64.h>
 
 struct timer_regs {
@@ -215,9 +216,17 @@ void __init timer64_init(void)
 
        /* If there is a device state control, save the ID. */
        err = of_property_read_u32(np, "ti,dscr-dev-enable", &val);
-       if (!err)
+       if (!err) {
                timer64_devstate_id = val;
 
+               /*
+                * It is necessary to enable the timer block here because
+                * the TIMER_DIVISOR macro needs to read a timer register
+                * to get the divisor.
+                */
+               dscr_set_devstate(timer64_devstate_id, DSCR_DEVSTATE_ENABLED);
+       }
+
        pr_debug("%s: Timer irq=%d.\n", np->full_name, cd->irq);
 
        clockevents_calc_mult_shift(cd, c6x_core_freq / TIMER_DIVISOR, 5);