X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=arch%2Farm%2Fmach-s3c2410%2Ftime.c;h=47387c5b97233649cbe7f23451ecf389ecb53be4;hb=6ab3d5624e172c553004ecc862bfeac16d9d68b7;hp=c0acfb2ad790a711c877afda5195be642288f690;hpb=5d54e69c68c05b162a56f9914cae72afd7e6f40a;p=linux-2.6-microblaze.git diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c index c0acfb2ad790..47387c5b9723 100644 --- a/arch/arm/mach-s3c2410/time.c +++ b/arch/arm/mach-s3c2410/time.c @@ -18,12 +18,12 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include #include #include #include #include +#include #include #include @@ -35,9 +35,9 @@ #include #include #include -#include #include "clock.h" +#include "cpu.h" static unsigned long timer_startval; static unsigned long timer_usec_ticks; @@ -141,6 +141,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. * @@ -164,7 +170,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; @@ -190,7 +196,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);