From: Johan Hovold Date: Wed, 10 Dec 2014 23:53:10 +0000 (-0800) Subject: rtc: omap: add helper to read 32-bit registers X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=c253a8965cdf54806f74c4f46cb2f50b95a65b83;p=openwrt%2Fstaging%2Fblogic.git rtc: omap: add helper to read 32-bit registers Add helper to read full register width. Signed-off-by: Johan Hovold Cc: Alessandro Zummo Cc: Tony Lindgren Cc: Benot Cousson Cc: Lokesh Vutla Cc: Guenter Roeck Cc: Sekhar Nori Cc: Tero Kristo Cc: Keerthy J Tested-by: Felipe Balbi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c index bcdf3c596214..c508e45ca3ce 100644 --- a/drivers/rtc/rtc-omap.c +++ b/drivers/rtc/rtc-omap.c @@ -123,6 +123,11 @@ static inline u8 rtc_read(struct omap_rtc *rtc, unsigned int reg) return readb(rtc->base + reg); } +static inline u32 rtc_readl(struct omap_rtc *rtc, unsigned int reg) +{ + return readl(rtc->base + reg); +} + static inline void rtc_write(struct omap_rtc *rtc, unsigned int reg, u8 val) { writeb(val, rtc->base + reg);