[PATCH 1/2] clocksource: mvebu: don't request the used iomem resource

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Mar 30 11:46:35 PDT 2017


The register ranges of the device nodes timer at 20300 and watchdog at 20300
overlap, so it is impossible that both devices properly use
request_iomem_region (e.g. by using dev_request_mem_resource). In Linux
only the watchdog driver is registered in /proc/iomem, do the same for
barebox.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
 drivers/clocksource/mvebu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/mvebu.c b/drivers/clocksource/mvebu.c
index cf80571263d9..59bbc4be22a4 100644
--- a/drivers/clocksource/mvebu.c
+++ b/drivers/clocksource/mvebu.c
@@ -60,7 +60,7 @@ static int mvebu_timer_probe(struct device_d *dev)
 	struct clk *clk;
 	u32 rate, div, val;
 
-	iores = dev_request_mem_resource(dev, 0);
+	iores = dev_get_resource(dev, IORESOURCE_MEM, 0);
 	if (IS_ERR(iores))
 		return PTR_ERR(iores);
 	timer_base = IOMEM(iores->start);
-- 
2.11.0




More information about the barebox mailing list