summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorAlexander Shiyan <eagle.alexander923@gmail.com>2022-05-24 09:04:11 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2022-06-10 09:31:26 +0200
commitc7d771e1ab9bb8d5f27823b39e9392a79066ce6e (patch)
treeeda40bc76160a881035f5617fd8e651a9254f073 /drivers/clocksource
parentaff82bcd06add43c74836354ca79d57b8ceb4293 (diff)
downloadbarebox-c7d771e1ab9bb8d5f27823b39e9392a79066ce6e.tar.gz
barebox-c7d771e1ab9bb8d5f27823b39e9392a79066ce6e.tar.xz
ARM: clps711x: Switch to devicetree usage
This is a complex patch that switches the ARM CLPS711X architecture to work with the device tree. Includes changes to board initialization and any architecture drivers used. Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com> Link: https://lore.barebox.org/20220524060411.7754-1-eagle.alexander923@gmail.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/clps711x.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/clocksource/clps711x.c b/drivers/clocksource/clps711x.c
index 1fe7f6c891..d6ab695afa 100644
--- a/drivers/clocksource/clps711x.c
+++ b/drivers/clocksource/clps711x.c
@@ -27,6 +27,11 @@ static int clps711x_cs_probe(struct device_d *dev)
struct resource *iores;
u32 rate;
struct clk *timer_clk;
+ int id;
+
+ id = of_alias_get_id(dev->device_node, "timer");
+ if (id != 1)
+ return 0;
timer_clk = clk_get(dev, NULL);
if (IS_ERR(timer_clk))
@@ -46,7 +51,7 @@ static int clps711x_cs_probe(struct device_d *dev)
return init_clock(&clps711x_cs);
}
-static __maybe_unused struct of_device_id clps711x_timer_dt_ids[] = {
+static const struct of_device_id __maybe_unused clps711x_timer_dt_ids[] = {
{ .compatible = "cirrus,ep7209-timer", },
{ }
};