diff options
Diffstat (limited to 'arch/powerpc/platforms/512x/clock.c')
-rw-r--r-- | arch/powerpc/platforms/512x/clock.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c index 4c42246b86a7..e1c5cd6650b1 100644 --- a/arch/powerpc/platforms/512x/clock.c +++ b/arch/powerpc/platforms/512x/clock.c | |||
@@ -292,6 +292,15 @@ static void diu_clk_calc(struct clk *clk) | |||
292 | clk->rate = rate; | 292 | clk->rate = rate; |
293 | } | 293 | } |
294 | 294 | ||
295 | static void viu_clk_calc(struct clk *clk) | ||
296 | { | ||
297 | unsigned long rate; | ||
298 | |||
299 | rate = sys_clk.rate; | ||
300 | rate /= 2; | ||
301 | clk->rate = rate; | ||
302 | } | ||
303 | |||
295 | static void half_clk_calc(struct clk *clk) | 304 | static void half_clk_calc(struct clk *clk) |
296 | { | 305 | { |
297 | clk->rate = clk->parent->rate / 2; | 306 | clk->rate = clk->parent->rate / 2; |
@@ -412,6 +421,14 @@ static struct clk diu_clk = { | |||
412 | .calc = diu_clk_calc, | 421 | .calc = diu_clk_calc, |
413 | }; | 422 | }; |
414 | 423 | ||
424 | static struct clk viu_clk = { | ||
425 | .name = "viu_clk", | ||
426 | .flags = CLK_HAS_CTRL, | ||
427 | .reg = 1, | ||
428 | .bit = 18, | ||
429 | .calc = viu_clk_calc, | ||
430 | }; | ||
431 | |||
415 | static struct clk axe_clk = { | 432 | static struct clk axe_clk = { |
416 | .name = "axe_clk", | 433 | .name = "axe_clk", |
417 | .flags = CLK_HAS_CTRL, | 434 | .flags = CLK_HAS_CTRL, |
@@ -535,6 +552,7 @@ struct clk *rate_clks[] = { | |||
535 | &ref_clk, | 552 | &ref_clk, |
536 | &sys_clk, | 553 | &sys_clk, |
537 | &diu_clk, | 554 | &diu_clk, |
555 | &viu_clk, | ||
538 | &csb_clk, | 556 | &csb_clk, |
539 | &e300_clk, | 557 | &e300_clk, |
540 | &ips_clk, | 558 | &ips_clk, |