Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
[sfrench/cifs-2.6.git] / arch / arm / mach-s3c2410 / time.c
index 8a00e3c3cd089cf3bec4f192c72322cee95ebd93..9d7b799ea4a4c8b2df094c39487f688679a6e865 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/err.h>
+#include <linux/clk.h>
 
 #include <asm/system.h>
 #include <asm/leds.h>
@@ -35,7 +36,6 @@
 #include <asm/arch/regs-timer.h>
 #include <asm/arch/regs-irq.h>
 #include <asm/mach/time.h>
-#include <asm/hardware/clock.h>
 
 #include "clock.h"
 #include "cpu.h"
@@ -142,6 +142,12 @@ static struct irqaction s3c2410_timer_irq = {
        .handler        = s3c2410_timer_interrupt,
 };
 
+#define use_tclk1_12() ( \
+       machine_is_bast()       || \
+       machine_is_vr1000()     || \
+       machine_is_anubis()     || \
+       machine_is_osiris() )
+
 /*
  * Set up timer interrupt, and return the current time in seconds.
  *
@@ -165,7 +171,7 @@ static void s3c2410_timer_setup (void)
 
        /* configure the system for whichever machine is in use */
 
-       if (machine_is_bast() || machine_is_vr1000() || machine_is_anubis()) {
+       if (use_tclk1_12()) {
                /* timer is at 12MHz, scaler is 1 */
                timer_usec_ticks = timer_mask_usec_ticks(1, 12000000);
                tcnt = 12000000 / HZ;
@@ -191,7 +197,6 @@ static void s3c2410_timer_setup (void)
                if (IS_ERR(clk))
                        panic("failed to get clock for system timer");
 
-               clk_use(clk);
                clk_enable(clk);
 
                pclk = clk_get_rate(clk);