aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-s3c2416/clock.c4
-rw-r--r--arch/arm/mach-s3c2443/clock.c4
-rw-r--r--arch/arm/plat-s3c24xx/s3c2443-clock.c12
-rw-r--r--arch/arm/plat-samsung/include/plat/s3c2443.h4
4 files changed, 20 insertions, 4 deletions
diff --git a/arch/arm/mach-s3c2416/clock.c b/arch/arm/mach-s3c2416/clock.c
index 5569def1a107..3060796b0e7d 100644
--- a/arch/arm/mach-s3c2416/clock.c
+++ b/arch/arm/mach-s3c2416/clock.c
@@ -158,7 +158,9 @@ void __init s3c2416_init_clocks(int xtal)
158 158
159 clk_epll.parent = &clk_epllref.clk; 159 clk_epll.parent = &clk_epllref.clk;
160 160
161 s3c2443_common_init_clocks(xtal, s3c2416_get_pll, s3c2416_fclk_div); 161 s3c2443_common_init_clocks(xtal, s3c2416_get_pll, s3c2416_fclk_div,
162 armdiv, ARRAY_SIZE(armdiv),
163 S3C2416_CLKDIV0_ARMDIV_MASK);
162 164
163 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) 165 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
164 s3c_register_clksrc(clksrcs[ptr], 1); 166 s3c_register_clksrc(clksrcs[ptr], 1);
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c
index cd51d04e1de7..88edc55838a1 100644
--- a/arch/arm/mach-s3c2443/clock.c
+++ b/arch/arm/mach-s3c2443/clock.c
@@ -283,7 +283,9 @@ void __init s3c2443_init_clocks(int xtal)
283 clk_epll.rate = s3c2443_get_epll(epllcon, xtal); 283 clk_epll.rate = s3c2443_get_epll(epllcon, xtal);
284 clk_epll.parent = &clk_epllref.clk; 284 clk_epll.parent = &clk_epllref.clk;
285 285
286 s3c2443_common_init_clocks(xtal, s3c2443_get_mpll, s3c2443_fclk_div); 286 s3c2443_common_init_clocks(xtal, s3c2443_get_mpll, s3c2443_fclk_div,
287 armdiv, ARRAY_SIZE(armdiv),
288 S3C2443_CLKDIV0_ARMDIV_MASK);
287 289
288 s3c2443_setup_clocks(); 290 s3c2443_setup_clocks();
289 291
diff --git a/arch/arm/plat-s3c24xx/s3c2443-clock.c b/arch/arm/plat-s3c24xx/s3c2443-clock.c
index 07a4c81587ac..3f2117b8c0d4 100644
--- a/arch/arm/plat-s3c24xx/s3c2443-clock.c
+++ b/arch/arm/plat-s3c24xx/s3c2443-clock.c
@@ -160,6 +160,10 @@ static struct clk clk_prediv = {
160 }, 160 },
161}; 161};
162 162
163static unsigned int *armdiv;
164static int nr_armdiv;
165static int armdivmask;
166
163/* usbhost 167/* usbhost
164 * 168 *
165 * usb host bus-clock, usually 48MHz to provide USB bus clock timing 169 * usb host bus-clock, usually 48MHz to provide USB bus clock timing
@@ -470,10 +474,16 @@ static struct clksrc_clk *clksrcs[] __initdata = {
470}; 474};
471 475
472void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, 476void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll,
473 fdiv_fn get_fdiv) 477 fdiv_fn get_fdiv,
478 unsigned int *divs, int nr_divs,
479 int divmask)
474{ 480{
475 int ptr; 481 int ptr;
476 482
483 armdiv = divs;
484 nr_armdiv = nr_divs;
485 armdivmask = divmask;
486
477 /* s3c2443 parents h and p clocks from prediv */ 487 /* s3c2443 parents h and p clocks from prediv */
478 clk_h.parent = &clk_prediv; 488 clk_h.parent = &clk_prediv;
479 clk_p.parent = &clk_prediv; 489 clk_p.parent = &clk_prediv;
diff --git a/arch/arm/plat-samsung/include/plat/s3c2443.h b/arch/arm/plat-samsung/include/plat/s3c2443.h
index 4b2ac9a272b2..5fc4ad0fd756 100644
--- a/arch/arm/plat-samsung/include/plat/s3c2443.h
+++ b/arch/arm/plat-samsung/include/plat/s3c2443.h
@@ -40,7 +40,9 @@ typedef unsigned int (*pll_fn)(unsigned int reg, unsigned int base);
40typedef unsigned int (*fdiv_fn)(unsigned long clkcon0); 40typedef unsigned int (*fdiv_fn)(unsigned long clkcon0);
41 41
42extern void s3c2443_common_setup_clocks(pll_fn get_mpll, fdiv_fn fdiv); 42extern void s3c2443_common_setup_clocks(pll_fn get_mpll, fdiv_fn fdiv);
43extern void s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, fdiv_fn fdiv); 43extern void s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, fdiv_fn fdiv,
44 unsigned int *divs, int nr_divs,
45 int divmask);
44 46
45extern int s3c2443_clkcon_enable_h(struct clk *clk, int enable); 47extern int s3c2443_clkcon_enable_h(struct clk *clk, int enable);
46extern int s3c2443_clkcon_enable_p(struct clk *clk, int enable); 48extern int s3c2443_clkcon_enable_p(struct clk *clk, int enable);