[ARM] S3C2412: Correct parents for EREFCLK and UREFCLK
authorMatthieu Castet <matthieu.castet@parrot.com>
Thu, 3 Jul 2008 10:24:45 +0000 (11:24 +0100)
committerBen Dooks <ben-linux@fluff.org>
Thu, 3 Jul 2008 15:51:30 +0000 (16:51 +0100)
For s3c2412, set parent for clk_erefclk and clk_urefclk.
This allow for example to use xtal or extclk for i2s clock.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Matthieu Castet <matthieu.castet@parrot.com>
arch/arm/mach-s3c2412/clock.c
include/asm-arm/arch-s3c2410/regs-clock.h

index 2697a65ba7271bcb58d80aeb24e2550872350979..1157b5a16263318eee89098ddab3ea284ea7e3d9 100644 (file)
@@ -631,6 +631,17 @@ static struct clk_init clks_src[] __initdata = {
                .bit    = S3C2412_CLKSRC_USBCLK_HCLK,
                .src_0  = &clk_usysclk,
                .src_1  = &clk_h,
+       /* here we assume  OM[4] select xtal */
+       }, {
+               .clk    = &clk_erefclk,
+               .bit    = S3C2412_CLKSRC_EREFCLK_EXTCLK,
+               .src_0  = &clk_xtal,
+               .src_1  = &clk_ext,
+       }, {
+               .clk    = &clk_urefclk,
+               .bit    = S3C2412_CLKSRC_UREFCLK_EXTCLK,
+               .src_0  = &clk_xtal,
+               .src_1  = &clk_ext,
        },
 };
 
@@ -666,8 +677,6 @@ static void __init s3c2412_clk_initparents(void)
 static struct clk *clks[] __initdata = {
        &clk_ext,
        &clk_usb_bus,
-       &clk_erefclk,
-       &clk_urefclk,
        &clk_mrefclk,
        &clk_armclk,
 };
index ecae9e7f5e45a6aa34b78324e29ec9acab1a446c..37661358b42b006b92b79f0d098b2ec8c1270ec9 100644 (file)
@@ -189,6 +189,8 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk)
 #define S3C2412_CLKSRC_I2SCLK_MPLL             (1<<9)
 #define S3C2412_CLKSRC_USBCLK_HCLK             (1<<10)
 #define S3C2412_CLKSRC_CAMCLK_HCLK             (1<<11)
+#define S3C2412_CLKSRC_UREFCLK_EXTCLK  (1<<12)
+#define S3C2412_CLKSRC_EREFCLK_EXTCLK  (1<<14)
 
 #endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */