spi-pl022-starfive.c: make spi work without dma
authorziv.xu <ziv.xu@starfive.com>
Tue, 1 Nov 2022 06:12:21 +0000 (14:12 +0800)
committerziv.xu <ziv.xu@starfive.com>
Tue, 1 Nov 2022 06:12:24 +0000 (14:12 +0800)
make spi work without dma

Signed-off-by: ziv.xu <ziv.xu@starfive.com>
drivers/spi/spi-pl022-starfive.c [changed mode: 0755->0644]
drivers/spi/spi-pl022.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 1e08aae..e7c96e5
@@ -2249,13 +2249,15 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id)
                goto err_no_irq;
        }
 
+       /* dma is not used unless configured in the device tree */
+       platform_info->enable_dma = 0;
+
        /* If that failed, use channels from platform_info */
        if (status == 0)
                platform_info->enable_dma = 1;
-       else if (platform_flag) {
+       else if (platform_flag)
                platform_info->enable_dma = 0;
-               dev_info(&adev->dev, "work without dma!\n");
-       } else if (platform_info->enable_dma) {
+       else if (platform_info->enable_dma) {
                status = pl022_dma_probe(pl022);
                if (status != 0)
                        platform_info->enable_dma = 0;
old mode 100755 (executable)
new mode 100644 (file)