public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robherring2@gmail.com>
To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Cc: Mike Turquette <mturquette@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>
Subject: [PATCH 7/7] clk: highbank: add DT match for calxeda,ecx-3000-sregs
Date: Wed,  4 Dec 2013 17:35:27 -0600	[thread overview]
Message-ID: <1386200127-23143-8-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1386200127-23143-1-git-send-email-robherring2@gmail.com>

From: Rob Herring <rob.herring@calxeda.com>

The system registers are a bit different overall and need a different
compatible string, but the clock registers are similar. So for the clock
code, we just need to match with the new compatible string.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Mike Turquette <mturquette@linaro.org>
---
 drivers/clk/clk-highbank.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c
index 89efcbc..8023146 100644
--- a/drivers/clk/clk-highbank.c
+++ b/drivers/clk/clk-highbank.c
@@ -278,6 +278,12 @@ static const struct clk_ops periclk_ops = {
 	.set_rate = clk_periclk_set_rate,
 };
 
+static struct of_device_id sregs_match[] = {
+	{ .compatible = "calxeda,ecx-3000-sregs" },
+	{ .compatible = "calxeda,hb-sregs" },
+	{}
+};
+
 static __init struct clk *hb_clk_init(struct device_node *node, const struct clk_ops *ops)
 {
 	u32 reg;
@@ -298,7 +304,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
 		return NULL;
 
 	/* Map system registers */
-	srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
+	srnp = of_find_matching_node(NULL, sregs_match);
 	hb_clk->reg = of_iomap(srnp, 0);
 	BUG_ON(!hb_clk->reg);
 	hb_clk->reg += reg;
-- 
1.8.3.2


      parent reply	other threads:[~2013-12-04 23:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04 23:35 [PATCH 0/7] Calxeda arm64 clock updates Rob Herring
2013-12-04 23:35 ` [PATCH 1/7] dt-bindings: add Calxeda ECX-3000 clock binding Rob Herring
2013-12-04 23:35 ` [PATCH 2/7] dt-bindings: Add property calxeda,pll-max-hz for Calxeda clocks Rob Herring
2013-12-04 23:35 ` [PATCH 3/7] dt-bindings: Add Calxeda system registers binding Rob Herring
2013-12-04 23:35 ` [PATCH 4/7] clk: highbank: prevent glitching when going into bypass mode Rob Herring
2013-12-04 23:35 ` [PATCH 5/7] clk: highbank: allow for different PLL frequency range Rob Herring
2013-12-04 23:35 ` [PATCH 6/7] clk: highbank: allow enabling by user Rob Herring
2013-12-04 23:35 ` Rob Herring [this message]

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=1386200127-23143-8-git-send-email-robherring2@gmail.com \
    --to=robherring2@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=rob.herring@calxeda.com \
    /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