diff options
| author | 2020-05-12 10:58:36 +0200 | |
|---|---|---|
| committer | 2020-05-12 10:58:36 +0200 | |
| commit | ed43f2b4e78069ee02687e5a562e1ecd15cbef4f (patch) | |
| tree | 0f8f93d6d08f36193e93020606a8920035556a32 /drivers/gpio/gpio-merrifield.c | |
| parent | Merge tag 'gpio-updates-for-v5.8-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel (diff) | |
| parent | gpio: merrifield: Better show how GPIO and IRQ bases are derived from hardware (diff) | |
| download | wireguard-linux-ed43f2b4e78069ee02687e5a562e1ecd15cbef4f.tar.xz wireguard-linux-ed43f2b4e78069ee02687e5a562e1ecd15cbef4f.zip | |
Merge tag 'intel-gpio-v5.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel
intel-gpio for v5.8-1
* MSI support for Intel Merrifield
* Refactor gpio-pch to be up-to-date with recent kernel APIs
* Miscellaneous cleanups here and there
The following is an automated git shortlog grouped by driver:
ich:
- fix a typo
merrifield:
- Better show how GPIO and IRQ bases are derived from hardware
- Switch over to MSI interrupts
pch:
- Use in pch_irq_type() macros provided by IRQ core
- Refactor pch_irq_type() to avoid unnecessary locking
- Get rid of unneeded variable in IRQ handler
- Use BIT() and GENMASK() where it's appropriate
Diffstat (limited to 'drivers/gpio/gpio-merrifield.c')
| -rw-r--r-- | drivers/gpio/gpio-merrifield.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c index 48918a016cd8..706687fab634 100644 --- a/drivers/gpio/gpio-merrifield.c +++ b/drivers/gpio/gpio-merrifield.c @@ -443,8 +443,8 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id base = pcim_iomap_table(pdev)[1]; - irq_base = readl(base); - gpio_base = readl(sizeof(u32) + base); + irq_base = readl(base + 0 * sizeof(u32)); + gpio_base = readl(base + 1 * sizeof(u32)); /* Release the IO mapping, since we already get the info from BAR1 */ pcim_iounmap_regions(pdev, BIT(1)); @@ -473,6 +473,10 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id raw_spin_lock_init(&priv->lock); + retval = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES); + if (retval < 0) + return retval; + girq = &priv->chip.irq; girq->chip = &mrfld_irqchip; girq->init_hw = mrfld_irq_init_hw; @@ -482,7 +486,7 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id sizeof(*girq->parents), GFP_KERNEL); if (!girq->parents) return -ENOMEM; - girq->parents[0] = pdev->irq; + girq->parents[0] = pci_irq_vector(pdev, 0); girq->first = irq_base; girq->default_type = IRQ_TYPE_NONE; girq->handler = handle_bad_irq; |
