Skip to content

Commit

Permalink
rtc: pl031: fix up IRQ flags
Browse files Browse the repository at this point in the history
The pl031 interrupt is shared between the timer part and the clockwatch
part of the same HW block on the ux500, so mark it IRQF_SHARED on this
variant.

This patch also adds the IRQF_NO_SUSPEND flag to the rtc irq on all
variants as we don't want this pretty important IRQ to be disabled in
suspend.

Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Mattias Wallin authored and Linus Torvalds committed Jul 31, 2012
1 parent 1bb457f commit 559a6fc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/rtc/rtc-pl031.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@
* clockwatch function
* @st_weekday: if this is an ST Microelectronics silicon version that need
* the weekday fix
* @irqflags: special IRQ flags per variant
*/
struct pl031_vendor_data {
struct rtc_class_ops ops;
bool clockwatch;
bool st_weekday;
unsigned long irqflags;
};

struct pl031_local {
Expand Down Expand Up @@ -373,7 +375,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
}

if (request_irq(adev->irq[0], pl031_interrupt,
0, "rtc-pl031", ldata)) {
vendor->irqflags, "rtc-pl031", ldata)) {
ret = -EIO;
goto out_no_irq;
}
Expand Down Expand Up @@ -403,6 +405,7 @@ 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 */
Expand All @@ -416,6 +419,7 @@ static struct pl031_vendor_data stv1_pl031 = {
},
.clockwatch = true,
.st_weekday = true,
.irqflags = IRQF_NO_SUSPEND,
};

/* And the second ST derivative */
Expand All @@ -429,6 +433,11 @@ static struct pl031_vendor_data stv2_pl031 = {
},
.clockwatch = true,
.st_weekday = true,
/*
* This variant shares the IRQ with another block and must not
* suspend that IRQ line.
*/
.irqflags = IRQF_SHARED | IRQF_NO_SUSPEND,
};

static struct amba_id pl031_ids[] = {
Expand Down

0 comments on commit 559a6fc

Please sign in to comment.