ARM: S3C24XX: convert s3c2410 to common clock framework
[jlayton/linux.git] / arch / arm / mach-s3c24xx / mach-bast.c
index e371ff53a40820d184c527dec5d7f7ccd19d3779..ea762f20099b1aae55f9ea6abbdd98156205a9d9 100644 (file)
@@ -51,7 +51,6 @@
 #include <mach/regs-lcd.h>
 #include <mach/gpio-samsung.h>
 
-#include <plat/clock.h>
 #include <plat/cpu.h>
 #include <plat/cpu-freq.h>
 #include <plat/devs.h>
@@ -523,6 +522,7 @@ static struct s3c_hwmon_pdata bast_hwmon_info = {
 // cat /sys/devices/platform/s3c24xx-adc/s3c-hwmon/in_0
 
 static struct platform_device *bast_devices[] __initdata = {
+       &s3c2410_device_dclk,
        &s3c_device_ohci,
        &s3c_device_lcd,
        &s3c_device_wdt,
@@ -537,6 +537,7 @@ static struct platform_device *bast_devices[] __initdata = {
        &bast_sio,
 };
 
+#ifdef CONFIG_SAMSUNG_CLK
 static struct clk *bast_clocks[] __initdata = {
        &s3c24xx_dclk0,
        &s3c24xx_dclk1,
@@ -544,6 +545,7 @@ static struct clk *bast_clocks[] __initdata = {
        &s3c24xx_clkout1,
        &s3c24xx_uclk,
 };
+#endif
 
 static struct s3c_cpufreq_board __initdata bast_cpufreq = {
        .refresh        = 7800, /* 7.8usec */
@@ -558,6 +560,7 @@ static struct s3c24xx_audio_simtec_pdata __initdata bast_audio = {
 
 static void __init bast_map_io(void)
 {
+#ifdef CONFIG_SAMSUNG_CLOCK
        /* initialise the clocks */
 
        s3c24xx_dclk0.parent = &clk_upll;
@@ -572,15 +575,21 @@ static void __init bast_map_io(void)
        s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
        s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks));
+#endif
 
        s3c_hwmon_set_platdata(&bast_hwmon_info);
 
        s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
-       s3c24xx_init_clocks(0);
        s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
        samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
 }
 
+static void __init bast_init_time(void)
+{
+       s3c2410_init_clocks(12000000);
+       samsung_timer_init();
+}
+
 static void __init bast_init(void)
 {
        register_syscore_ops(&bast_pm_syscore_ops);
@@ -608,6 +617,6 @@ MACHINE_START(BAST, "Simtec-BAST")
        .map_io         = bast_map_io,
        .init_irq       = s3c2410_init_irq,
        .init_machine   = bast_init,
-       .init_time      = samsung_timer_init,
+       .init_time      = bast_init_time,
        .restart        = s3c2410_restart,
 MACHINE_END