Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146821
b: refs/heads/master
c: f5c84cf
h: refs/heads/master
i:
  146819: e0a10b5
v: v3
  • Loading branch information
Paul Mundt committed May 11, 2009
1 parent ab59db3 commit f8bc016
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 80 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: aa87aa343f2cd236b5eccd643abd4df918ed5c4f
refs/heads/master: f5c84cf50812c80133e64683d0500b2416d55cb3
19 changes: 4 additions & 15 deletions trunk/arch/sh/kernel/cpu/sh4/clock-sh4-202.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static int shoc_clk_set_rate(struct clk *clk, unsigned long rate, int algo_id)
frqcr3 |= tmp << 6;
ctrl_outl(frqcr3, CPG2_FRQCR3);

return clk->parent->rate / frqcr3_divisors[tmp];
clk->rate = clk->parent->rate / frqcr3_divisors[tmp];

return 0;
}
Expand All @@ -153,28 +153,17 @@ static struct clk *sh4202_onchip_clocks[] = {
static int __init sh4202_clk_init(void)
{
struct clk *clk = clk_get(NULL, "master_clk");
int i;
int i, ret = 0;

for (i = 0; i < ARRAY_SIZE(sh4202_onchip_clocks); i++) {
struct clk *clkp = sh4202_onchip_clocks[i];

clkp->parent = clk;
clk_register(clkp);
clk_enable(clkp);
ret |= clk_register(clkp);
}

/*
* Now that we have the rest of the clocks registered, we need to
* force the parent clock to propagate so that these clocks will
* automatically figure out their rate. We cheat by handing the
* parent clock its current rate and forcing child propagation.
*/
clk_set_rate(clk, clk_get_rate(clk));

clk_put(clk);

return 0;
return ret;
}

arch_initcall(sh4202_clk_init);

17 changes: 3 additions & 14 deletions trunk/arch/sh/kernel/cpu/sh4a/clock-sh7763.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,28 +93,17 @@ static struct clk *sh7763_onchip_clocks[] = {
static int __init sh7763_clk_init(void)
{
struct clk *clk = clk_get(NULL, "master_clk");
int i;
int i, ret = 0;

for (i = 0; i < ARRAY_SIZE(sh7763_onchip_clocks); i++) {
struct clk *clkp = sh7763_onchip_clocks[i];

clkp->parent = clk;
clk_register(clkp);
clk_enable(clkp);
ret |= clk_register(clkp);
}

/*
* Now that we have the rest of the clocks registered, we need to
* force the parent clock to propagate so that these clocks will
* automatically figure out their rate. We cheat by handing the
* parent clock its current rate and forcing child propagation.
*/
clk_set_rate(clk, clk_get_rate(clk));

clk_put(clk);

return 0;
return ret;
}

arch_initcall(sh7763_clk_init);

17 changes: 3 additions & 14 deletions trunk/arch/sh/kernel/cpu/sh4a/clock-sh7780.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,28 +99,17 @@ static struct clk *sh7780_onchip_clocks[] = {
static int __init sh7780_clk_init(void)
{
struct clk *clk = clk_get(NULL, "master_clk");
int i;
int i, ret = 0;

for (i = 0; i < ARRAY_SIZE(sh7780_onchip_clocks); i++) {
struct clk *clkp = sh7780_onchip_clocks[i];

clkp->parent = clk;
clk_register(clkp);
clk_enable(clkp);
ret |= clk_register(clkp);
}

/*
* Now that we have the rest of the clocks registered, we need to
* force the parent clock to propagate so that these clocks will
* automatically figure out their rate. We cheat by handing the
* parent clock its current rate and forcing child propagation.
*/
clk_set_rate(clk, clk_get_rate(clk));

clk_put(clk);

return 0;
return ret;
}

arch_initcall(sh7780_clk_init);

15 changes: 3 additions & 12 deletions trunk/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,26 +137,17 @@ static struct clk *sh7785_onchip_clocks[] = {
static int __init sh7785_clk_init(void)
{
struct clk *clk = clk_get(NULL, "master_clk");
int i;
int i, ret = 0;

for (i = 0; i < ARRAY_SIZE(sh7785_onchip_clocks); i++) {
struct clk *clkp = sh7785_onchip_clocks[i];

clkp->parent = clk;
clk_register(clkp);
clk_enable(clkp);
ret |= clk_register(clkp);
}

/*
* Now that we have the rest of the clocks registered, we need to
* force the parent clock to propagate so that these clocks will
* automatically figure out their rate. We cheat by handing the
* parent clock its current rate and forcing child propagation.
*/
clk_set_rate(clk, clk_get_rate(clk));

clk_put(clk);

return 0;
return ret;
}
arch_initcall(sh7785_clk_init);
15 changes: 3 additions & 12 deletions trunk/arch/sh/kernel/cpu/sh4a/clock-sh7786.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,17 @@ static struct clk *sh7786_onchip_clocks[] = {
static int __init sh7786_clk_init(void)
{
struct clk *clk = clk_get(NULL, "master_clk");
int i;
int i, ret = 0;

for (i = 0; i < ARRAY_SIZE(sh7786_onchip_clocks); i++) {
struct clk *clkp = sh7786_onchip_clocks[i];

clkp->parent = clk;
clk_register(clkp);
clk_enable(clkp);
ret |= clk_register(clkp);
}

/*
* Now that we have the rest of the clocks registered, we need to
* force the parent clock to propagate so that these clocks will
* automatically figure out their rate. We cheat by handing the
* parent clock its current rate and forcing child propagation.
*/
clk_set_rate(clk, clk_get_rate(clk));

clk_put(clk);

return 0;
return ret;
}
arch_initcall(sh7786_clk_init);
15 changes: 3 additions & 12 deletions trunk/arch/sh/kernel/cpu/sh4a/clock-shx3.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,26 +110,17 @@ static struct clk *shx3_onchip_clocks[] = {
static int __init shx3_clk_init(void)
{
struct clk *clk = clk_get(NULL, "master_clk");
int i;
int i, ret = 0;

for (i = 0; i < ARRAY_SIZE(shx3_onchip_clocks); i++) {
struct clk *clkp = shx3_onchip_clocks[i];

clkp->parent = clk;
clk_register(clkp);
clk_enable(clkp);
ret |= clk_register(clkp);
}

/*
* Now that we have the rest of the clocks registered, we need to
* force the parent clock to propagate so that these clocks will
* automatically figure out their rate. We cheat by handing the
* parent clock its current rate and forcing child propagation.
*/
clk_set_rate(clk, clk_get_rate(clk));

clk_put(clk);

return 0;
return ret;
}
arch_initcall(shx3_clk_init);

0 comments on commit f8bc016

Please sign in to comment.