mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
	Chen-Yu Tsai <wens@csie.org>,
	linux-sunxi@googlegroups.com
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Emilio López" <emilio@elopez.com.ar>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@codeaurora.org>,
	linux-clk@vger.kernel.org
Subject: [PATCH v3 00/10] arm64: Introduce Allwinner A64 and Pine64 support
Date: Mon, 22 Feb 2016 18:20:46 +0000	[thread overview]
Message-ID: <1456165255-31013-2-git-send-email-andre.przywara@arm.com> (raw)
In-Reply-To: <1456165255-31013-1-git-send-email-andre.przywara@arm.com>

Subject: [PATCH v3 01/10] clk: sunxi: allow PLL6 clock to be reused

Currently we hard-code the base name for the PLL6 clock for both the
sun4i and sun6i variants in the driver (pll6 and pll6x2, respectively).
This unfortunately denies reusing this clock for the H3 and A64 PLL8
clock, which is the same otherwise.
Remove the hard-coded name in the source code and replace it with an
appropriate index into the clock-output-names array in the DT.
This is compatible with all current device trees, since they all carry
the hard-coded base name in there.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 drivers/clk/sunxi/clk-factors.c | 3 ++-
 drivers/clk/sunxi/clk-factors.h | 1 +
 drivers/clk/sunxi/clk-sunxi.c   | 4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c
index ddefe96..7daf01d 100644
--- a/drivers/clk/sunxi/clk-factors.c
+++ b/drivers/clk/sunxi/clk-factors.c
@@ -202,7 +202,8 @@ struct clk *sunxi_factors_register(struct device_node *node,
 	if (data->name)
 		clk_name = data->name;
 	else
-		of_property_read_string(node, "clock-output-names", &clk_name);
+		of_property_read_string_index(node, "clock-output-names",
+					      data->name_idx, &clk_name);
 
 	factors = kzalloc(sizeof(struct clk_factors), GFP_KERNEL);
 	if (!factors)
diff --git a/drivers/clk/sunxi/clk-factors.h b/drivers/clk/sunxi/clk-factors.h
index 1e63c5b..3a7da86 100644
--- a/drivers/clk/sunxi/clk-factors.h
+++ b/drivers/clk/sunxi/clk-factors.h
@@ -36,6 +36,7 @@ struct factors_data {
 	void (*getter)(struct factors_request *req);
 	void (*recalc)(struct factors_request *req);
 	const char *name;
+	int name_idx;
 };
 
 struct clk_factors {
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 99f60ef..53f5927 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -530,14 +530,14 @@ static const struct factors_data sun4i_pll6_data __initconst = {
 	.enable = 31,
 	.table = &sun4i_pll5_config,
 	.getter = sun4i_get_pll5_factors,
-	.name = "pll6",
+	.name_idx = 2,
 };
 
 static const struct factors_data sun6i_a31_pll6_data __initconst = {
 	.enable = 31,
 	.table = &sun6i_a31_pll6_config,
 	.getter = sun6i_a31_get_pll6_factors,
-	.name = "pll6x2",
+	.name_idx = 1,
 };
 
 static const struct factors_data sun5i_a13_ahb_data __initconst = {
-- 
2.6.4

  reply	other threads:[~2016-02-22 18:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 18:20 Andre Przywara
2016-02-22 18:20 ` Andre Przywara [this message]
2016-02-22 18:20 ` [PATCH v3 02/10] ARM: dts: sunxi: make PLL8 in the H3 a proper clock Andre Przywara
2016-02-22 18:20 ` [PATCH v3 03/10] arm64: Introduce Allwinner SoC config option Andre Przywara
2016-02-22 18:20 ` [PATCH v3 04/10] drivers: pinctrl: add driver for Allwinner A64 SoC Andre Przywara
2016-02-25 18:49   ` Maxime Ripard
2016-03-07  3:33   ` Linus Walleij
2016-02-22 18:20 ` [PATCH v3 05/10] DT: clk: sunxi: add binding doc for the multi-bus-gates clock Andre Przywara
2016-02-22 18:20 ` [PATCH v3 06/10] clk: sunxi: add generic multi-parent bus clock gates driver Andre Przywara
2016-02-22 18:20 ` [PATCH v3 07/10] arm64: dts: add Allwinner A64 SoC .dtsi Andre Przywara
2016-02-22 18:20 ` [PATCH v3 08/10] of: add vendor prefix for Pine64 Andre Przywara
2016-02-22 18:20 ` [PATCH v3 09/10] arm64: dts: add Pine64 support Andre Przywara
2016-02-22 18:20 ` [PATCH v3 10/10] arm64: add defconfig options for Allwinner SoCs Andre Przywara
2016-02-25 18:52   ` Maxime Ripard
2016-02-25 10:04 ` [PATCH v3 00/10] arm64: Introduce Allwinner A64 and Pine64 support Andre Przywara
2016-02-25 19:25   ` Maxime Ripard

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=1456165255-31013-2-git-send-email-andre.przywara@arm.com \
    --to=andre.przywara@arm.com \
    --cc=arnd@arndb.de \
    --cc=emilio@elopez.com.ar \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=wens@csie.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

Powered by JetHome