From 90d0ae8e9583355725583e9d1ff0ebdc97936f39 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 3 Feb 2015 14:44:51 -0600 Subject: rtc: sa1100/pxa: convert to run-time register mapping SA1100 and PXA differ only in register offsets which are currently hardcoded in a machine specific header. Some arm64 platforms (PXA1928) have this RTC block as well (and not the PXA270 variant). Convert the driver to use ioremap and set the register offsets dynamically. Since we are touching all the register accesses, convert them all to readl_relaxed/writel_relaxed. Signed-off-by: Rob Herring Acked-by: Robert Jarzmik Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: rtc-linux@googlegroups.com Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-sa1100.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/rtc/rtc-sa1100.h') diff --git a/drivers/rtc/rtc-sa1100.h b/drivers/rtc/rtc-sa1100.h index 665d054740a1..2c79c0c57822 100644 --- a/drivers/rtc/rtc-sa1100.h +++ b/drivers/rtc/rtc-sa1100.h @@ -8,6 +8,10 @@ struct platform_device; struct sa1100_rtc { spinlock_t lock; + void __iomem *rcnr; + void __iomem *rtar; + void __iomem *rtsr; + void __iomem *rttr; int irq_1hz; int irq_alarm; struct rtc_device *rtc; -- cgit v1.2.3-59-g8ed1b