diff options
author | Rob Herring <robh@kernel.org> | 2015-02-03 14:44:51 -0600 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-09-05 19:37:16 +0200 |
commit | 90d0ae8e9583355725583e9d1ff0ebdc97936f39 (patch) | |
tree | a30d02f925242015987afc043f1cdecfb67cead0 /drivers/rtc/rtc-pxa.c | |
parent | 2c4fabec8790384b91473aa3d0d28d4407168ef9 (diff) | |
download | blackbird-obmc-linux-90d0ae8e9583355725583e9d1ff0ebdc97936f39.tar.gz blackbird-obmc-linux-90d0ae8e9583355725583e9d1ff0ebdc97936f39.zip |
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 <robh@kernel.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: rtc-linux@googlegroups.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc/rtc-pxa.c')
-rw-r--r-- | drivers/rtc/rtc-pxa.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c index fb9b3a7d2266..fe4985b54608 100644 --- a/drivers/rtc/rtc-pxa.c +++ b/drivers/rtc/rtc-pxa.c @@ -356,6 +356,10 @@ static int __init pxa_rtc_probe(struct platform_device *pdev) return -ENOMEM; } + sa1100_rtc->rcnr = pxa_rtc->base + 0x0; + sa1100_rtc->rtsr = pxa_rtc->base + 0x8; + sa1100_rtc->rtar = pxa_rtc->base + 0x4; + sa1100_rtc->rttr = pxa_rtc->base + 0xc; ret = sa1100_rtc_init(pdev, sa1100_rtc); if (!ret) { dev_err(dev, "Unable to init SA1100 RTC sub-device\n"); |