Skip to content

Commit 3a71c05

Browse files
Loic Poulainlinusw
authored andcommitted
pinctrl: baytrail: Clear DIRECT_IRQ bit
Direct irq en bit should be cleared for pads using io mode. If not, the io based irq will never be detected. However, this bit can sometimes be misconfigured (BIOS issue). Force clearing of this bit in io mode and trigger a WARN. Signed-off-by: Loic Poulain <[email protected]> Acked-by: Mika Westerberg <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent f114040 commit 3a71c05

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/pinctrl/pinctrl-baytrail.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,14 @@ static int byt_irq_type(struct irq_data *d, unsigned type)
227227
spin_lock_irqsave(&vg->lock, flags);
228228
value = readl(reg);
229229

230+
WARN(value & BYT_DIRECT_IRQ_EN,
231+
"Bad pad config for io mode, force direct_irq_en bit clearing");
232+
230233
/* For level trigges the BYT_TRIG_POS and BYT_TRIG_NEG bits
231234
* are used to indicate high and low level triggering
232235
*/
233-
value &= ~(BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL);
236+
value &= ~(BYT_DIRECT_IRQ_EN | BYT_TRIG_POS | BYT_TRIG_NEG |
237+
BYT_TRIG_LVL);
234238

235239
switch (type) {
236240
case IRQ_TYPE_LEVEL_HIGH:

0 commit comments

Comments
 (0)