summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/rtc/rtc-pl031.c
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-11 10:41:07 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-13 08:17:18 +0300
commite09b41010ba33a20a87472ee821fa407a5b8da36 (patch)
treed10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/rtc/rtc-pl031.c
parentf93b97fd65072de626c074dbe099a1fff05ce060 (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-pl031.c')
-rw-r--r--kernel/drivers/rtc/rtc-pl031.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/kernel/drivers/rtc/rtc-pl031.c b/kernel/drivers/rtc/rtc-pl031.c
index 99181fff8..e1687e19c 100644
--- a/kernel/drivers/rtc/rtc-pl031.c
+++ b/kernel/drivers/rtc/rtc-pl031.c
@@ -23,6 +23,7 @@
#include <linux/io.h>
#include <linux/bcd.h>
#include <linux/delay.h>
+#include <linux/pm_wakeirq.h>
#include <linux/slab.h>
/*
@@ -305,6 +306,8 @@ static int pl031_remove(struct amba_device *adev)
{
struct pl031_local *ldata = dev_get_drvdata(&adev->dev);
+ dev_pm_clear_wake_irq(&adev->dev);
+ device_init_wakeup(&adev->dev, false);
free_irq(adev->irq[0], ldata);
rtc_device_unregister(ldata->rtc);
iounmap(ldata->base);
@@ -370,7 +373,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
}
}
- device_init_wakeup(&adev->dev, 1);
+ device_init_wakeup(&adev->dev, true);
ldata->rtc = rtc_device_register("pl031", &adev->dev, ops,
THIS_MODULE);
if (IS_ERR(ldata->rtc)) {
@@ -383,7 +386,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
ret = -EIO;
goto out_no_irq;
}
-
+ dev_pm_set_wake_irq(&adev->dev, adev->irq[0]);
return 0;
out_no_irq:
@@ -408,7 +411,6 @@ static struct pl031_vendor_data arm_pl031 = {
.set_alarm = pl031_set_alarm,
.alarm_irq_enable = pl031_alarm_irq_enable,
},
- .irqflags = IRQF_NO_SUSPEND,
};
/* The First ST derivative */
@@ -422,7 +424,6 @@ static struct pl031_vendor_data stv1_pl031 = {
},
.clockwatch = true,
.st_weekday = true,
- .irqflags = IRQF_NO_SUSPEND,
};
/* And the second ST derivative */
@@ -439,8 +440,10 @@ static struct pl031_vendor_data stv2_pl031 = {
/*
* This variant shares the IRQ with another block and must not
* suspend that IRQ line.
+ * TODO check if it shares with IRQF_NO_SUSPEND user, else we can
+ * remove IRQF_COND_SUSPEND
*/
- .irqflags = IRQF_SHARED | IRQF_NO_SUSPEND,
+ .irqflags = IRQF_SHARED | IRQF_COND_SUSPEND,
};
static struct amba_id pl031_ids[] = {
@@ -476,6 +479,6 @@ static struct amba_driver pl031_driver = {
module_amba_driver(pl031_driver);
-MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net");
+MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>");
MODULE_DESCRIPTION("ARM AMBA PL031 RTC Driver");
MODULE_LICENSE("GPL");