Merge tag 'spi-fix-v5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
[sfrench/cifs-2.6.git] / drivers / spi / spi-pxa2xx.c
index d58791d92c7336c46d85fee1fc298d3fbcf8b0d5..9071333ebdd86fe290f441c21b4a1a37c7e40ff5 100644 (file)
@@ -1463,6 +1463,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 },
@@ -1541,17 +1545,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;
@@ -1604,6 +1606,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;
@@ -1709,6 +1716,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;
                }
        }