summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-highbank.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-10-28 10:11:42 -0700
committerOlof Johansson <olof@lixom.net>2013-10-28 10:11:42 -0700
commit0fc869e8f22bc74a9971f9025f8608d6587c4fb7 (patch)
tree7c0d565e13309f1c3e9931265e8f44b50b53d8a7 /drivers/clk/clk-highbank.c
parent4dcf03346af269579fdfdadb662d22035c9fceb6 (diff)
parent64cc69abbb32e17aa44d2c696eca65cb6f9364ca (diff)
downloadop-kernel-dev-0fc869e8f22bc74a9971f9025f8608d6587c4fb7.zip
op-kernel-dev-0fc869e8f22bc74a9971f9025f8608d6587c4fb7.tar.gz
Merge branch 'cleanup/dt-clock' into next/soc
Merging in dt clock cleanup as a pre-req with some of the later SoC branches. There are a handful of conflicts here -- some of the already merged SoC branches should have been based on the cleanup but weren't. In particular, a remove/add of include on highbank and two remove/remove conflicts on kirkwood were fixed up. * cleanup/dt-clock: (28 commits) ARM: vt8500: remove custom .init_time hook ARM: vexpress: remove custom .init_time hook ARM: tegra: remove custom .init_time hook ARM: sunxi: remove custom .init_time hook ARM: sti: remove custom .init_time hook ARM: socfpga: remove custom .init_time hook ARM: rockchip: remove custom .init_time hook ARM: prima2: remove custom .init_time hook ARM: nspire: remove custom .init_time hook ARM: nomadik: remove custom .init_time hook ARM: mxs: remove custom .init_time hook ARM: kirkwood: remove custom .init_time hook ARM: imx: remove custom .init_time hook ARM: highbank: remove custom .init_time hook ARM: exynos: remove custom .init_time hook ARM: dove: remove custom .init_time hook ARM: bcm2835: remove custom .init_time hook ARM: bcm: provide common arch init for DT clocks ARM: call of_clk_init from default time_init handler ARM: vt8500: prepare for arch-wide .init_time callback ... Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/clk/clk-highbank.c')
-rw-r--r--drivers/clk/clk-highbank.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c
index 2e08cb0..2e7e9d9 100644
--- a/drivers/clk/clk-highbank.c
+++ b/drivers/clk/clk-highbank.c
@@ -20,8 +20,7 @@
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/of.h>
-
-extern void __iomem *sregs_base;
+#include <linux/of_address.h>
#define HB_PLL_LOCK_500 0x20000000
#define HB_PLL_LOCK 0x10000000
@@ -280,6 +279,7 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
const char *clk_name = node->name;
const char *parent_name;
struct clk_init_data init;
+ struct device_node *srnp;
int rc;
rc = of_property_read_u32(node, "reg", &reg);
@@ -290,7 +290,11 @@ static __init struct clk *hb_clk_init(struct device_node *node, const struct clk
if (WARN_ON(!hb_clk))
return NULL;
- hb_clk->reg = sregs_base + reg;
+ /* Map system registers */
+ srnp = of_find_compatible_node(NULL, NULL, "calxeda,hb-sregs");
+ hb_clk->reg = of_iomap(srnp, 0);
+ BUG_ON(!hb_clk->reg);
+ hb_clk->reg += reg;
of_property_read_string(node, "clock-output-names", &clk_name);
OpenPOWER on IntegriCloud