mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-06 03:06:50 +07:00
90d0ae8e95
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>
24 lines
408 B
C
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
|