Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204740
b: refs/heads/master
c: 9e2089c
h: refs/heads/master
v: v3
  • Loading branch information
Anatolij Gustschin authored and Grant Likely committed Aug 1, 2010
1 parent e87375b commit ca061e2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 12fb0eb4c963452f727752aae03bbef192abed40
refs/heads/master: 9e2089cbed7441a21d72a510897f0336afb06492
18 changes: 18 additions & 0 deletions trunk/arch/powerpc/platforms/512x/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ static void diu_clk_calc(struct clk *clk)
clk->rate = rate;
}

static void viu_clk_calc(struct clk *clk)
{
unsigned long rate;

rate = sys_clk.rate;
rate /= 2;
clk->rate = rate;
}

static void half_clk_calc(struct clk *clk)
{
clk->rate = clk->parent->rate / 2;
Expand Down Expand Up @@ -412,6 +421,14 @@ static struct clk diu_clk = {
.calc = diu_clk_calc,
};

static struct clk viu_clk = {
.name = "viu_clk",
.flags = CLK_HAS_CTRL,
.reg = 1,
.bit = 18,
.calc = viu_clk_calc,
};

static struct clk axe_clk = {
.name = "axe_clk",
.flags = CLK_HAS_CTRL,
Expand Down Expand Up @@ -535,6 +552,7 @@ struct clk *rate_clks[] = {
&ref_clk,
&sys_clk,
&diu_clk,
&viu_clk,
&csb_clk,
&e300_clk,
&ips_clk,
Expand Down

0 comments on commit ca061e2

Please sign in to comment.