aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2017-01-21 04:06:39 -0500
committerMark Brown <broonie@kernel.org>2017-01-23 13:09:37 -0500
commit64e02cb0bdfc7cef0a01e2ad4d567fdc0a74450e (patch)
tree41008222675a76a052a5374eb0ce7f994ff0b952
parente51e9b93049f624c179bab2c651995bca22b5bb7 (diff)
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>
-rw-r--r--drivers/spi/spi-pxa2xx-pci.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
index 868452d8e3e1..869f188b02eb 100644
--- a/drivers/spi/spi-pxa2xx-pci.c
+++ b/drivers/spi/spi-pxa2xx-pci.c
@@ -227,10 +227,16 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
227 ssp = &spi_pdata.ssp; 227 ssp = &spi_pdata.ssp;
228 ssp->phys_base = pci_resource_start(dev, 0); 228 ssp->phys_base = pci_resource_start(dev, 0);
229 ssp->mmio_base = pcim_iomap_table(dev)[0]; 229 ssp->mmio_base = pcim_iomap_table(dev)[0];
230 ssp->irq = dev->irq;
231 ssp->port_id = (c->port_id >= 0) ? c->port_id : dev->devfn; 230 ssp->port_id = (c->port_id >= 0) ? c->port_id : dev->devfn;
232 ssp->type = c->type; 231 ssp->type = c->type;
233 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);
239
234 snprintf(buf, sizeof(buf), "pxa2xx-spi.%d", ssp->port_id); 240 snprintf(buf, sizeof(buf), "pxa2xx-spi.%d", ssp->port_id);
235 ssp->clk = clk_register_fixed_rate(&dev->dev, buf , NULL, 0, 241 ssp->clk = clk_register_fixed_rate(&dev->dev, buf , NULL, 0,
236 c->max_clk_rate); 242 c->max_clk_rate);