spi: Fixes for v3.7

A bunch of fixes here, mostly minor except for the pl022 which has just
 been a bit of a shambles all round, the recent runtime PM changes have
 as far as I can tell never worked so they're just getting thrown out.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQhpP3AAoJELSic+t+oim9y5sP/2HlUw8SrFWVZNGkyZ/834KV
 3DuTZUEG0NAg39gMmnUiXH3ntfvNQBfWmqz9vJ/6Ec4gfCaXREwRNc4ZtkJuWzs+
 zvVoLJLgJ0FxxVP9Ul6K5lb4iPfAupu4up2TjlMWctRFJ0Og+Q68wqK/I58r9YGQ
 XhhCYy44MioBC/MyMToQ6iTnFjJ6ivj/RtHlZ72tLeDcF6/XRdCeLD/0Gd7pR1Ib
 jCnb6dzji+ztIATdz0zJ5dATz5UHKQ+sPKCOR/Aeb8w+XWwcllP7oCFJKYdpzzJj
 63y2wbRIrmF4wk9ZfCwD3LEFdeWL5MHKGUn47afqODnoYcKPOp7w5hlM5YH+ZNun
 3Elln9JPeg996GsN3HQNGM+Ip+g1mi3yCF1hDWIukPPewKI8zqSarlo5B4d0f73i
 wjNbgvEKXiRR3sD8osH9gz4rqubY9pNy3YRCBXYWsP+4jPyOmOjMDhOoc/MmVLc7
 0B0l6waynsZXelSXRDGDINGDrr5Kct4ZmAczWS8W0+wXw7ER7VHj7dbbMBEcDgny
 k80Zfo+VXPIj1+9pvy75JZJ91AWtnHz10hug5iuJNADt0F1rfpdeZZ1+F4U0S/4p
 KcT8IS39V813DfE8UITlg9TEdsV1z72DXiFRDpV/UOQY3oRH9tMn4SrX7crugWEF
 Y3XXO8xlXFdz+bj0rAoV
 =9XvI
 -----END PGP SIGNATURE-----

Merge tag 'spi-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc

Pull spi fixes from Mark Brown:
 "A bunch of fixes here, mostly minor except for the pl022 which has
  just been a bit of a shambles all round, the recent runtime PM changes
  have as far as I can tell never worked so they're just getting thrown
  out."

* tag 'spi-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc:
  spi/pl022: Revert recent runtime PM changes
  spi: tsc2005: delete soon-obsolete e-mail address
  spi: spi-rspi: fix build error for the latest shdma driver
This commit is contained in:
Linus Torvalds 2012-10-24 18:00:17 -07:00
commit 4864ccbb5a
3 changed files with 34 additions and 27 deletions

View file

@ -2186,8 +2186,6 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n", printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n",
adev->res.start, pl022->virtbase); adev->res.start, pl022->virtbase);
pm_runtime_resume(dev);
pl022->clk = devm_clk_get(&adev->dev, NULL); pl022->clk = devm_clk_get(&adev->dev, NULL);
if (IS_ERR(pl022->clk)) { if (IS_ERR(pl022->clk)) {
status = PTR_ERR(pl022->clk); status = PTR_ERR(pl022->clk);
@ -2292,7 +2290,6 @@ pl022_remove(struct amba_device *adev)
clk_disable(pl022->clk); clk_disable(pl022->clk);
clk_unprepare(pl022->clk); clk_unprepare(pl022->clk);
pm_runtime_disable(&adev->dev);
amba_release_regions(adev); amba_release_regions(adev);
tasklet_disable(&pl022->pump_transfers); tasklet_disable(&pl022->pump_transfers);
spi_unregister_master(pl022->master); spi_unregister_master(pl022->master);

View file

@ -147,8 +147,6 @@ struct rspi_data {
unsigned char spsr; unsigned char spsr;
/* for dmaengine */ /* for dmaengine */
struct sh_dmae_slave dma_tx;
struct sh_dmae_slave dma_rx;
struct dma_chan *chan_tx; struct dma_chan *chan_tx;
struct dma_chan *chan_rx; struct dma_chan *chan_rx;
int irq; int irq;
@ -663,20 +661,16 @@ static irqreturn_t rspi_irq(int irq, void *_sr)
return ret; return ret;
} }
static bool rspi_filter(struct dma_chan *chan, void *filter_param) static int __devinit rspi_request_dma(struct rspi_data *rspi,
{ struct platform_device *pdev)
chan->private = filter_param;
return true;
}
static void __devinit rspi_request_dma(struct rspi_data *rspi,
struct platform_device *pdev)
{ {
struct rspi_plat_data *rspi_pd = pdev->dev.platform_data; struct rspi_plat_data *rspi_pd = pdev->dev.platform_data;
dma_cap_mask_t mask; dma_cap_mask_t mask;
struct dma_slave_config cfg;
int ret;
if (!rspi_pd) if (!rspi_pd)
return; return 0; /* The driver assumes no error. */
rspi->dma_width_16bit = rspi_pd->dma_width_16bit; rspi->dma_width_16bit = rspi_pd->dma_width_16bit;
@ -684,21 +678,35 @@ static void __devinit rspi_request_dma(struct rspi_data *rspi,
if (rspi_pd->dma_rx_id && rspi_pd->dma_tx_id) { if (rspi_pd->dma_rx_id && rspi_pd->dma_tx_id) {
dma_cap_zero(mask); dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask); dma_cap_set(DMA_SLAVE, mask);
rspi->dma_rx.slave_id = rspi_pd->dma_rx_id; rspi->chan_rx = dma_request_channel(mask, shdma_chan_filter,
rspi->chan_rx = dma_request_channel(mask, rspi_filter, (void *)rspi_pd->dma_rx_id);
&rspi->dma_rx); if (rspi->chan_rx) {
if (rspi->chan_rx) cfg.slave_id = rspi_pd->dma_rx_id;
dev_info(&pdev->dev, "Use DMA when rx.\n"); cfg.direction = DMA_DEV_TO_MEM;
ret = dmaengine_slave_config(rspi->chan_rx, &cfg);
if (!ret)
dev_info(&pdev->dev, "Use DMA when rx.\n");
else
return ret;
}
} }
if (rspi_pd->dma_tx_id) { if (rspi_pd->dma_tx_id) {
dma_cap_zero(mask); dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask); dma_cap_set(DMA_SLAVE, mask);
rspi->dma_tx.slave_id = rspi_pd->dma_tx_id; rspi->chan_tx = dma_request_channel(mask, shdma_chan_filter,
rspi->chan_tx = dma_request_channel(mask, rspi_filter, (void *)rspi_pd->dma_tx_id);
&rspi->dma_tx); if (rspi->chan_tx) {
if (rspi->chan_tx) cfg.slave_id = rspi_pd->dma_tx_id;
dev_info(&pdev->dev, "Use DMA when tx\n"); cfg.direction = DMA_MEM_TO_DEV;
ret = dmaengine_slave_config(rspi->chan_tx, &cfg);
if (!ret)
dev_info(&pdev->dev, "Use DMA when tx\n");
else
return ret;
}
} }
return 0;
} }
static void __devexit rspi_release_dma(struct rspi_data *rspi) static void __devexit rspi_release_dma(struct rspi_data *rspi)
@ -788,7 +796,11 @@ static int __devinit rspi_probe(struct platform_device *pdev)
} }
rspi->irq = irq; rspi->irq = irq;
rspi_request_dma(rspi, pdev); ret = rspi_request_dma(rspi, pdev);
if (ret < 0) {
dev_err(&pdev->dev, "rspi_request_dma failed.\n");
goto error4;
}
ret = spi_register_master(master); ret = spi_register_master(master);
if (ret < 0) { if (ret < 0) {

View file

@ -3,8 +3,6 @@
* *
* Copyright (C) 2009-2010 Nokia Corporation * Copyright (C) 2009-2010 Nokia Corporation
* *
* Contact: Aaro Koskinen <aaro.koskinen@nokia.com>
*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or