diff options
author | 2016-04-11 10:41:07 +0300 | |
---|---|---|
committer | 2016-04-13 08:17:18 +0300 | |
commit | e09b41010ba33a20a87472ee821fa407a5b8da36 (patch) | |
tree | d10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/rtc/rtc-mv.c | |
parent | f93b97fd65072de626c074dbe099a1fff05ce060 (diff) |
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page.
During the rebasing, the following patch collided:
Force tick interrupt and get rid of softirq magic(I70131fb85).
Collisions have been removed because its logic was found on the
source already.
Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769
Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/drivers/rtc/rtc-mv.c')
-rw-r--r-- | kernel/drivers/rtc/rtc-mv.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/drivers/rtc/rtc-mv.c b/kernel/drivers/rtc/rtc-mv.c index 423762241..79bb28617 100644 --- a/kernel/drivers/rtc/rtc-mv.c +++ b/kernel/drivers/rtc/rtc-mv.c @@ -10,6 +10,7 @@ #include <linux/kernel.h> #include <linux/rtc.h> #include <linux/bcd.h> +#include <linux/bitops.h> #include <linux/io.h> #include <linux/platform_device.h> #include <linux/of.h> @@ -24,7 +25,7 @@ #define RTC_MINUTES_OFFS 8 #define RTC_HOURS_OFFS 16 #define RTC_WDAY_OFFS 24 -#define RTC_HOURS_12H_MODE (1 << 22) /* 12 hours mode */ +#define RTC_HOURS_12H_MODE BIT(22) /* 12 hour mode */ #define RTC_DATE_REG_OFFS 4 #define RTC_MDAY_OFFS 0 @@ -33,7 +34,7 @@ #define RTC_ALARM_TIME_REG_OFFS 8 #define RTC_ALARM_DATE_REG_OFFS 0xc -#define RTC_ALARM_VALID (1 << 7) +#define RTC_ALARM_VALID BIT(7) #define RTC_ALARM_INTERRUPT_MASK_REG_OFFS 0x10 #define RTC_ALARM_INTERRUPT_CASUE_REG_OFFS 0x14 @@ -77,7 +78,7 @@ static int mv_rtc_read_time(struct device *dev, struct rtc_time *tm) second = rtc_time & 0x7f; minute = (rtc_time >> RTC_MINUTES_OFFS) & 0x7f; - hour = (rtc_time >> RTC_HOURS_OFFS) & 0x3f; /* assume 24 hours mode */ + hour = (rtc_time >> RTC_HOURS_OFFS) & 0x3f; /* assume 24 hour mode */ wday = (rtc_time >> RTC_WDAY_OFFS) & 0x7; day = rtc_date & 0x3f; @@ -108,7 +109,7 @@ static int mv_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) second = rtc_time & 0x7f; minute = (rtc_time >> RTC_MINUTES_OFFS) & 0x7f; - hour = (rtc_time >> RTC_HOURS_OFFS) & 0x3f; /* assume 24 hours mode */ + hour = (rtc_time >> RTC_HOURS_OFFS) & 0x3f; /* assume 24 hour mode */ wday = (rtc_time >> RTC_WDAY_OFFS) & 0x7; day = rtc_date & 0x3f; @@ -239,10 +240,10 @@ static int __init mv_rtc_probe(struct platform_device *pdev) if (!IS_ERR(pdata->clk)) clk_prepare_enable(pdata->clk); - /* make sure the 24 hours mode is enabled */ + /* make sure the 24 hour mode is enabled */ rtc_time = readl(pdata->ioaddr + RTC_TIME_REG_OFFS); if (rtc_time & RTC_HOURS_12H_MODE) { - dev_err(&pdev->dev, "24 Hours mode not supported.\n"); + dev_err(&pdev->dev, "12 Hour mode is enabled but not supported.\n"); ret = -EINVAL; goto out; } @@ -323,6 +324,7 @@ static const struct of_device_id rtc_mv_of_match_table[] = { { .compatible = "marvell,orion-rtc", }, {} }; +MODULE_DEVICE_TABLE(of, rtc_mv_of_match_table); #endif static struct platform_driver mv_rtc_driver = { |