[PATCHv2] pinctrl: baytrail: Clear DIRECT_IRQ bit

From: Loic Poulain
Date: Wed Sep 17 2014 - 09:58:04 EST


Direct Irq En bit can be initialized to a bad value.
This bit has to be cleared for io access mode.

Signed-off-by: Loic Poulain <loic.poulain@xxxxxxxxx>
---
v2: Apply over ff998356b644ebe723127bd9eec6040b59a4a4f6 + add Warning

drivers/pinctrl/pinctrl-baytrail.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-baytrail.c b/drivers/pinctrl/pinctrl-baytrail.c
index 701a646..77db3db 100644
--- a/drivers/pinctrl/pinctrl-baytrail.c
+++ b/drivers/pinctrl/pinctrl-baytrail.c
@@ -230,10 +230,13 @@ static int byt_irq_type(struct irq_data *d, unsigned type)
spin_lock_irqsave(&vg->lock, flags);
value = readl(reg);

+ WARN(value & BYT_DIRECT_IRQ_EN, "Clearing direct_irq_en bit");
+
/* For level trigges the BYT_TRIG_POS and BYT_TRIG_NEG bits
* are used to indicate high and low level triggering
*/
- value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);
+ value &= ~(BYT_DIRECT_IRQ_EN | BYT_TRIG_POS | BYT_TRIG_NEG |
+ BYT_TRIG_LVL);

switch (type) {
case IRQ_TYPE_LEVEL_HIGH:
--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/