diff options
author | Anatolij Gustschin <agust@denx.de> | 2012-12-21 15:53:38 +0400 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2013-01-15 23:11:23 +0400 |
commit | fa6d459d64a60db41c476c16063670ca4297e1d1 (patch) | |
tree | 9526fcf1d4b1d8ace6366f00dc3d879f5a4ecbd1 /arch/powerpc | |
parent | 73e31235ca7874701718b562ac19161516e46c13 (diff) | |
download | linux-fa6d459d64a60db41c476c16063670ca4297e1d1.tar.xz |
mpc5121: remove obsolete cell-index property from PSC clock code
Don't use cell-index from device tree, obtain the PSC number
from PSCx register offset.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'arch/powerpc')
-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) static void psc_clks_init(void) { struct device_node *np; - const u32 *cell_index; struct platform_device *ofdev; + u32 reg; for_each_compatible_node(np, NULL, "fsl,mpc5121-psc") { - cell_index = of_get_property(np, "cell-index", NULL); - if (cell_index) { - int pscnum = *cell_index; + if (!of_property_read_u32(np, "reg", ®)) { + int pscnum = (reg & 0xf00) >> 8; struct clk *clk = psc_dev_clk(pscnum); clk->flags = CLK_HAS_RATE | CLK_HAS_CTRL; |