Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274097
b: refs/heads/master
c: d9a3bfb
h: refs/heads/master
i:
  274095: 29010bf
v: v3
  • Loading branch information
Heiko Stuebner authored and Kukjin Kim committed Oct 14, 2011
1 parent 699575a commit 3c72a63
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0d23d059da0f7a2ce4744b2212d64a17057d8424
refs/heads/master: d9a3bfbd7e80ecf24d2322659d5c0542f9d95e78
4 changes: 3 additions & 1 deletion trunk/arch/arm/mach-s3c2416/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ void __init s3c2416_init_clocks(int xtal)

clk_epll.parent = &clk_epllref.clk;

s3c2443_common_init_clocks(xtal, s3c2416_get_pll, s3c2416_fclk_div);
s3c2443_common_init_clocks(xtal, s3c2416_get_pll, s3c2416_fclk_div,
armdiv, ARRAY_SIZE(armdiv),
S3C2416_CLKDIV0_ARMDIV_MASK);

for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
s3c_register_clksrc(clksrcs[ptr], 1);
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/arm/mach-s3c2443/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ void __init s3c2443_init_clocks(int xtal)
clk_epll.rate = s3c2443_get_epll(epllcon, xtal);
clk_epll.parent = &clk_epllref.clk;

s3c2443_common_init_clocks(xtal, s3c2443_get_mpll, s3c2443_fclk_div);
s3c2443_common_init_clocks(xtal, s3c2443_get_mpll, s3c2443_fclk_div,
armdiv, ARRAY_SIZE(armdiv),
S3C2443_CLKDIV0_ARMDIV_MASK);

s3c2443_setup_clocks();

Expand Down
12 changes: 11 additions & 1 deletion trunk/arch/arm/plat-s3c24xx/s3c2443-clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ static struct clk clk_prediv = {
},
};

static unsigned int *armdiv;
static int nr_armdiv;
static int armdivmask;

/* usbhost
*
* usb host bus-clock, usually 48MHz to provide USB bus clock timing
Expand Down Expand Up @@ -470,10 +474,16 @@ static struct clksrc_clk *clksrcs[] __initdata = {
};

void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll,
fdiv_fn get_fdiv)
fdiv_fn get_fdiv,
unsigned int *divs, int nr_divs,
int divmask)
{
int ptr;

armdiv = divs;
nr_armdiv = nr_divs;
armdivmask = divmask;

/* s3c2443 parents h and p clocks from prediv */
clk_h.parent = &clk_prediv;
clk_p.parent = &clk_prediv;
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/arm/plat-samsung/include/plat/s3c2443.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ typedef unsigned int (*pll_fn)(unsigned int reg, unsigned int base);
typedef unsigned int (*fdiv_fn)(unsigned long clkcon0);

extern void s3c2443_common_setup_clocks(pll_fn get_mpll, fdiv_fn fdiv);
extern void s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, fdiv_fn fdiv);
extern void s3c2443_common_init_clocks(int xtal, pll_fn get_mpll, fdiv_fn fdiv,
unsigned int *divs, int nr_divs,
int divmask);

extern int s3c2443_clkcon_enable_h(struct clk *clk, int enable);
extern int s3c2443_clkcon_enable_p(struct clk *clk, int enable);
Expand Down

0 comments on commit 3c72a63

Please sign in to comment.