diff options
Diffstat (limited to 'drivers/spi/spi-mxs.c')
-rw-r--r-- | drivers/spi/spi-mxs.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 86dd04d6bc87..22a0af0147fb 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -241,6 +241,7 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int cs, INIT_COMPLETION(spi->c); ctrl0 = readl(ssp->base + HW_SSP_CTRL0); + ctrl0 &= ~BM_SSP_CTRL0_XFER_COUNT; ctrl0 |= BM_SSP_CTRL0_DATA_XFER | mxs_spi_cs_to_reg(cs); if (*first) @@ -256,8 +257,10 @@ static int mxs_spi_txrx_dma(struct mxs_spi *spi, int cs, if ((sg_count + 1 == sgs) && *last) ctrl0 |= BM_SSP_CTRL0_IGNORE_CRC; - if (ssp->devid == IMX23_SSP) + if (ssp->devid == IMX23_SSP) { + ctrl0 &= ~BM_SSP_CTRL0_XFER_COUNT; ctrl0 |= min; + } dma_xfer[sg_count].pio[0] = ctrl0; dma_xfer[sg_count].pio[3] = min; @@ -509,7 +512,7 @@ static const struct of_device_id mxs_spi_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, mxs_spi_dt_ids); -static int __devinit mxs_spi_probe(struct platform_device *pdev) +static int mxs_spi_probe(struct platform_device *pdev) { const struct of_device_id *of_id = of_match_device(mxs_spi_dt_ids, &pdev->dev); @@ -538,9 +541,9 @@ static int __devinit mxs_spi_probe(struct platform_device *pdev) if (!iores || irq_err < 0 || irq_dma < 0) return -EINVAL; - base = devm_request_and_ioremap(&pdev->dev, iores); - if (!base) - return -EADDRNOTAVAIL; + base = devm_ioremap_resource(&pdev->dev, iores); + if (IS_ERR(base)) + return PTR_ERR(base); pinctrl = devm_pinctrl_get_select_default(&pdev->dev); if (IS_ERR(pinctrl)) @@ -636,7 +639,7 @@ out_master_free: return ret; } -static int __devexit mxs_spi_remove(struct platform_device *pdev) +static int mxs_spi_remove(struct platform_device *pdev) { struct spi_master *master; struct mxs_spi *spi; @@ -659,7 +662,7 @@ static int __devexit mxs_spi_remove(struct platform_device *pdev) static struct platform_driver mxs_spi_driver = { .probe = mxs_spi_probe, - .remove = __devexit_p(mxs_spi_remove), + .remove = mxs_spi_remove, .driver = { .name = DRIVER_NAME, .owner = THIS_MODULE, |