diff options
| -rw-r--r-- | arch/powerpc/platforms/512x/clock.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/512x/clock.c b/arch/powerpc/platforms/512x/clock.c index 9f771e05457c..d0095c8ee579 100644 --- a/arch/powerpc/platforms/512x/clock.c +++ b/arch/powerpc/platforms/512x/clock.c | |||
| @@ -680,13 +680,12 @@ static void psc_calc_rate(struct clk *clk, int pscnum, struct device_node *np) | |||
| 680 | static void psc_clks_init(void) | 680 | static void psc_clks_init(void) |
| 681 | { | 681 | { |
| 682 | struct device_node *np; | 682 | struct device_node *np; |
| 683 | const u32 *cell_index; | ||
| 684 | struct platform_device *ofdev; | 683 | struct platform_device *ofdev; |
| 684 | u32 reg; | ||
| 685 | 685 | ||
| 686 | for_each_compatible_node(np, NULL, "fsl,mpc5121-psc") { | 686 | for_each_compatible_node(np, NULL, "fsl,mpc5121-psc") { |
| 687 | cell_index = of_get_property(np, "cell-index", NULL); | 687 | if (!of_property_read_u32(np, "reg", ®)) { |
| 688 | if (cell_index) { | 688 | int pscnum = (reg & 0xf00) >> 8; |
| 689 | int pscnum = *cell_index; | ||
| 690 | struct clk *clk = psc_dev_clk(pscnum); | 689 | struct clk *clk = psc_dev_clk(pscnum); |
| 691 | 690 | ||
| 692 | clk->flags = CLK_HAS_RATE | CLK_HAS_CTRL; | 691 | clk->flags = CLK_HAS_RATE | CLK_HAS_CTRL; |
