From: Anatolij Gustschin <agust@denx.de>
To: linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 3/4] mpc5121: remove obsolete cell-index property from PSC clock code
Date: Mon, 14 Jan 2013 21:34:07 +0100 [thread overview]
Message-ID: <1358195648-18678-3-git-send-email-agust@denx.de> (raw)
In-Reply-To: <1358195648-18678-1-git-send-email-agust@denx.de>
Don't use cell-index from device tree, obtain the PSC number
from PSCx register offset.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
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 9f771e0..d0095c8 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;
--
1.7.5.4
next prev parent reply other threads:[~2013-01-14 20:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 20:34 [PATCH 1/4] powerpc/mpc5121: add common .dtsi and use it in mpc5121ads.dts Anatolij Gustschin
2013-01-14 20:34 ` [PATCH 2/4] powerpc/mpc5121: pdm360ng.dts: use common mpc5121.dtsi Anatolij Gustschin
2013-01-14 20:34 ` Anatolij Gustschin [this message]
2013-01-14 20:34 ` [PATCH 4/4] mpc5121: don't check PSC ac97 using node name Anatolij Gustschin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358195648-18678-3-git-send-email-agust@denx.de \
--to=agust@denx.de \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).