Skip to content

Commit 1173c3c

Browse files
committed
Revert "gpio: merrifield: Pass irqchip when adding gpiochip"
This reverts commit 8f86a5b. It has been established that this causes a boot regression on both Baytrail and Cherrytrail SoCs, and we can't have that in the final kernel release, so we need to revert it. Reported-by: Hans de Goede <[email protected]> Acked-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 52c75f5 commit 1173c3c

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

drivers/gpio/gpio-merrifield.c

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,6 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
397397
{
398398
const struct mrfld_gpio_pinrange *range;
399399
const char *pinctrl_dev_name;
400-
struct gpio_irq_chip *girq;
401400
struct mrfld_gpio *priv;
402401
u32 gpio_base, irq_base;
403402
void __iomem *base;
@@ -445,21 +444,6 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
445444

446445
raw_spin_lock_init(&priv->lock);
447446

448-
girq = &priv->chip.irq;
449-
girq->chip = &mrfld_irqchip;
450-
girq->parent_handler = mrfld_irq_handler;
451-
girq->num_parents = 1;
452-
girq->parents = devm_kcalloc(&pdev->dev, girq->num_parents,
453-
sizeof(*girq->parents),
454-
GFP_KERNEL);
455-
if (!girq->parents)
456-
return -ENOMEM;
457-
girq->parents[0] = pdev->irq;
458-
girq->default_type = IRQ_TYPE_NONE;
459-
girq->handler = handle_bad_irq;
460-
461-
mrfld_irq_init_hw(priv);
462-
463447
pci_set_drvdata(pdev, priv);
464448
retval = devm_gpiochip_add_data(&pdev->dev, &priv->chip, priv);
465449
if (retval) {
@@ -481,6 +465,18 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id
481465
}
482466
}
483467

468+
retval = gpiochip_irqchip_add(&priv->chip, &mrfld_irqchip, irq_base,
469+
handle_bad_irq, IRQ_TYPE_NONE);
470+
if (retval) {
471+
dev_err(&pdev->dev, "could not connect irqchip to gpiochip\n");
472+
return retval;
473+
}
474+
475+
mrfld_irq_init_hw(priv);
476+
477+
gpiochip_set_chained_irqchip(&priv->chip, &mrfld_irqchip, pdev->irq,
478+
mrfld_irq_handler);
479+
484480
return 0;
485481
}
486482

0 commit comments

Comments
 (0)