linux/drivers/rtc/rtc-sa1100.h
Rob Herring 90d0ae8e95 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>
2015-09-05 19:37:16 +02:00

24 lines
408 B
C

#ifndef __RTC_SA1100_H__
#define __RTC_SA1100_H__
#include <linux/kernel.h>
struct clk;
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;
struct clk *clk;
};
int sa1100_rtc_init(struct platform_device *pdev, struct sa1100_rtc *info);
#endif