Merge branch 'spi-5.5' into spi-linus
[linux-2.6-microblaze.git] / drivers / spi / spi-pxa2xx.c
index 0408782..4c7a71f 100644 (file)
@@ -1472,6 +1472,10 @@ static const struct pci_device_id pxa2xx_spi_pci_compound_match[] = {
        { PCI_VDEVICE(INTEL, 0x02aa), LPSS_CNL_SSP },
        { PCI_VDEVICE(INTEL, 0x02ab), LPSS_CNL_SSP },
        { PCI_VDEVICE(INTEL, 0x02fb), LPSS_CNL_SSP },
+       /* CML-H */
+       { PCI_VDEVICE(INTEL, 0x06aa), LPSS_CNL_SSP },
+       { PCI_VDEVICE(INTEL, 0x06ab), LPSS_CNL_SSP },
+       { PCI_VDEVICE(INTEL, 0x06fb), LPSS_CNL_SSP },
        /* TGL-LP */
        { PCI_VDEVICE(INTEL, 0xa0aa), LPSS_CNL_SSP },
        { PCI_VDEVICE(INTEL, 0xa0ab), LPSS_CNL_SSP },
@@ -1550,17 +1554,15 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
        if (!pdata)
                return NULL;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res)
-               return NULL;
-
        ssp = &pdata->ssp;
 
-       ssp->phys_base = res->start;
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        ssp->mmio_base = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(ssp->mmio_base))
                return NULL;
 
+       ssp->phys_base = res->start;
+
 #ifdef CONFIG_PCI
        if (pcidev_id) {
                pdata->tx_param = parent;
@@ -1613,6 +1615,11 @@ static int pxa2xx_spi_fw_translate_cs(struct spi_controller *controller,
        return cs;
 }
 
+static size_t pxa2xx_spi_max_dma_transfer_size(struct spi_device *spi)
+{
+       return MAX_DMA_LEN;
+}
+
 static int pxa2xx_spi_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
@@ -1718,6 +1725,8 @@ static int pxa2xx_spi_probe(struct platform_device *pdev)
                } else {
                        controller->can_dma = pxa2xx_spi_can_dma;
                        controller->max_dma_len = MAX_DMA_LEN;
+                       controller->max_transfer_size =
+                               pxa2xx_spi_max_dma_transfer_size;
                }
        }