diff options
author | wigyori <wigyori@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2014-02-05 08:42:28 +0000 |
---|---|---|
committer | wigyori <wigyori@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2014-02-05 08:42:28 +0000 |
commit | 4aa960c36d61a91c8e1835673040e7512503e58c (patch) | |
tree | 3ec56a328c48048eb595e971cf2f7f51e73404ed /target/linux/sunxi/patches-3.13/121-clk-sunxi-better-factor-dt-nodes.patch | |
parent | ecc3338fe1f1f21b238664f7562a7c22340f7064 (diff) |
sunxi: initial 3.13 support
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39471 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/sunxi/patches-3.13/121-clk-sunxi-better-factor-dt-nodes.patch')
-rw-r--r-- | target/linux/sunxi/patches-3.13/121-clk-sunxi-better-factor-dt-nodes.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/target/linux/sunxi/patches-3.13/121-clk-sunxi-better-factor-dt-nodes.patch b/target/linux/sunxi/patches-3.13/121-clk-sunxi-better-factor-dt-nodes.patch new file mode 100644 index 0000000000..175f115cea --- /dev/null +++ b/target/linux/sunxi/patches-3.13/121-clk-sunxi-better-factor-dt-nodes.patch @@ -0,0 +1,52 @@ +From 7d47b009bf287bf5e0817f47c40e32b7ec0e8151 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Emilio=20L=C3=B3pez?= <emilio@elopez.com.ar> +Date: Mon, 23 Dec 2013 00:32:40 -0300 +Subject: [PATCH] clk: sunxi: support better factor DT nodes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The DT nodes should look like + + abc_clk: clk@deadbeef { + ... + clock-output-names = "abc"; + } + +But our old DT nodes look like + + abc: abc@deadbeef { + ... + } + +So, let's support both formats, until we can transition everything +to the new, correct one. + +Signed-off-by: Emilio López <emilio@elopez.com.ar> +--- + drivers/clk/sunxi/clk-sunxi.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c +index af99b57..81d4c72 100644 +--- a/drivers/clk/sunxi/clk-sunxi.c ++++ b/drivers/clk/sunxi/clk-sunxi.c +@@ -441,6 +441,15 @@ static struct clk * __init sunxi_factors_clk_setup(struct device_node *node, + (parents[i] = of_clk_get_parent_name(node, i)) != NULL) + i++; + ++ /* Nodes should be providing the name via clock-output-names ++ * but originally our dts didn't, and so we used node->name. ++ * The new, better nodes look like clk@deadbeef, so we pull the ++ * name just in this case */ ++ if (!strcmp("clk", clk_name)) { ++ of_property_read_string_index(node, "clock-output-names", ++ 0, &clk_name); ++ } ++ + factors = kzalloc(sizeof(struct clk_factors), GFP_KERNEL); + if (!factors) + return NULL; +-- +1.8.5.1 + |