diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-08-09 09:09:29 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-08-09 09:09:29 -0400 |
commit | 054d5c9238f3c577ad51195c3ee7803613f322cc (patch) | |
tree | ff7d9f5c0e0ddf14230ba28f28ef69a2c0a0debf /arch/powerpc/platforms/512x/clock.c | |
parent | 11e4afb49b7fa1fc8e1ffd850c1806dd86a08204 (diff) | |
parent | 2192482ee5ce5d5d4a6cec0c351b2d3a744606eb (diff) |
Merge branch 'devel-stable' into devel
Diffstat (limited to 'arch/powerpc/platforms/512x/clock.c')
-rw-r--r-- | arch/powerpc/platforms/512x/clock.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c index 4c42246b86a7..5b243bd3eb3b 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, |
@@ -660,7 +678,7 @@ static void psc_clks_init(void) | |||
660 | { | 678 | { |
661 | struct device_node *np; | 679 | struct device_node *np; |
662 | const u32 *cell_index; | 680 | const u32 *cell_index; |
663 | struct of_device *ofdev; | 681 | struct platform_device *ofdev; |
664 | 682 | ||
665 | for_each_compatible_node(np, NULL, "fsl,mpc5121-psc") { | 683 | for_each_compatible_node(np, NULL, "fsl,mpc5121-psc") { |
666 | cell_index = of_get_property(np, "cell-index", NULL); | 684 | cell_index = of_get_property(np, "cell-index", NULL); |