]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/spi/spi-omap2-mcspi.c
Merge branch 'karo-tx6-mainline' into stable
[karo-tx-linux.git] / drivers / spi / spi-omap2-mcspi.c
index ed8283e7397aecd884616ec828fe2846b15c10df..9ccd5a5c8b65c633809b67eb7a14b80de79116ab 100644 (file)
@@ -439,10 +439,9 @@ static void omap2_mcspi_tx_dma(struct spi_device *spi,
                } else {
                        /* FIXME: fall back to PIO? */
                }
+               dma_async_issue_pending(mcspi_dma->dma_tx);
        }
-       dma_async_issue_pending(mcspi_dma->dma_tx);
        omap2_mcspi_set_dma_req(spi, 0, 1);
-
 }
 
 static unsigned
@@ -567,10 +566,10 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
        const u8                *tx;
        struct dma_slave_config cfg;
        enum dma_slave_buswidth width;
-       unsigned es;
+       unsigned                es;
        u32                     burst;
        void __iomem            *chstat_reg;
-       void __iomem            *irqstat_reg;
+       void __iomem            *irqstat_reg;
        int                     wait_res;
 
        mcspi = spi_master_get_devdata(spi->master);
@@ -1345,7 +1344,7 @@ static const struct of_device_id omap_mcspi_of_match[] = {
                .compatible = "ti,omap4-mcspi",
                .data = &omap4_pdata,
        },
-       { },
+       { }
 };
 MODULE_DEVICE_TABLE(of, omap_mcspi_of_match);
 
@@ -1356,7 +1355,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
        struct omap2_mcspi      *mcspi;
        struct resource         *r;
        int                     status = 0, i;
-       u32                     regs_offset = 0;
+       u32                     regs_offset;
        static int              bus_num = 1;
        struct device_node      *node = pdev->dev.of_node;
        const struct of_device_id *match;
@@ -1410,15 +1409,13 @@ static int omap2_mcspi_probe(struct platform_device *pdev)
                goto free_master;
        }
 
-       r->start += regs_offset;
-       r->end += regs_offset;
-       mcspi->phys = r->start;
-
        mcspi->base = devm_ioremap_resource(&pdev->dev, r);
        if (IS_ERR(mcspi->base)) {
                status = PTR_ERR(mcspi->base);
                goto free_master;
        }
+       mcspi->phys = r->start + regs_offset;
+       mcspi->base += regs_offset;
 
        mcspi->dev = &pdev->dev;