summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/patches/barebox-2017.08.0/0004-clocksource-sp804-silently-ignore-secondary-instaces.patch
blob: e61865e946a7cebf4d6b1c6b0678e4b2255a6fbd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Lucas Stach <l.stach@pengutronix.de>
Date: Fri, 1 Sep 2017 18:54:54 +0200
Subject: [PATCH] clocksource: sp804: silently ignore secondary instaces

When probing from an upstream DT, we don't always have influence on
how many timer instances are enabled. Just use the first one and
silently skip the other instances.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/clocksource/amba-sp804.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/amba-sp804.c b/drivers/clocksource/amba-sp804.c
index c5ad9947cd96..66e3988b4cf8 100644
--- a/drivers/clocksource/amba-sp804.c
+++ b/drivers/clocksource/amba-sp804.c
@@ -35,8 +35,8 @@ static int sp804_probe(struct amba_device *dev, const struct amba_id *id)
 	int ret;
 
 	if (sp804_base) {
-		dev_err(&dev->dev, "single instance driver\n");
-		return -EBUSY;
+		dev_dbg(&dev->dev, "skipping secondary instance\n");
+		return 0;
 	}
 
 	sp804_clk = clk_get(&dev->dev, NULL);