summaryrefslogtreecommitdiff
path: root/arch/arm/common
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2014-05-30 01:01:34 +0400
committerRob Herring <robh@kernel.org>2014-06-24 23:16:03 +0400
commit1bde9906414b46b6922464e7c91dd815e5f217b3 (patch)
tree944e7d854bda6a6b4380e9dff681ead543cef67a /arch/arm/common
parentf27e861f7bb79501cedf486af9347052f9bcfc70 (diff)
downloadlinux-1bde9906414b46b6922464e7c91dd815e5f217b3.tar.xz
ARM: timer-sp: allow getting timer1 clock from DT to fallback to legacy clock
The sp804 clocks may be specified in DT, but the kernel may still be using legacy clocks. This is handled if a single clock for sp804 is present, but not when 3 clocks are present. This prevents Versatile platforms from breaking when the DT has clocks added. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Russell King <linux@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/timer-sp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index fd6bff0c5b96..19211324772f 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -233,13 +233,13 @@ static void __init sp804_of_init(struct device_node *np)
if (IS_ERR(clk1))
clk1 = NULL;
- /* Get the 2nd clock if the timer has 2 timer clocks */
+ /* Get the 2nd clock if the timer has 3 timer clocks */
if (of_count_phandle_with_args(np, "clocks", "#clock-cells") == 3) {
clk2 = of_clk_get(np, 1);
if (IS_ERR(clk2)) {
pr_err("sp804: %s clock not found: %d\n", np->name,
(int)PTR_ERR(clk2));
- goto err;
+ clk2 = NULL;
}
} else
clk2 = clk1;