Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: pca2xx-pci: Allow MSI

Now that the core is ready for edge-triggered interrupts, we can safely
allow the PCI versions that provide this to enable the feature and,
thus, have less shared interrupts.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jan Kiszka and committed by
Mark Brown
64e02cb0 e51e9b93

+7 -1
+7 -1
drivers/spi/spi-pxa2xx-pci.c
··· 227 227 ssp = &spi_pdata.ssp; 228 228 ssp->phys_base = pci_resource_start(dev, 0); 229 229 ssp->mmio_base = pcim_iomap_table(dev)[0]; 230 - ssp->irq = dev->irq; 231 230 ssp->port_id = (c->port_id >= 0) ? c->port_id : dev->devfn; 232 231 ssp->type = c->type; 232 + 233 + pci_set_master(dev); 234 + 235 + ret = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_ALL_TYPES); 236 + if (ret < 0) 237 + return ret; 238 + ssp->irq = pci_irq_vector(dev, 0); 233 239 234 240 snprintf(buf, sizeof(buf), "pxa2xx-spi.%d", ssp->port_id); 235 241 ssp->clk = clk_register_fixed_rate(&dev->dev, buf , NULL, 0,