Commit 4864ccbb authored by Linus Torvalds's avatar Linus Torvalds

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
parents 735f0a98 213d27a4
......@@ -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",
adev->res.start, pl022->virtbase);
pm_runtime_resume(dev);
pl022->clk = devm_clk_get(&adev->dev, NULL);
if (IS_ERR(pl022->clk)) {
status = PTR_ERR(pl022->clk);
......@@ -2292,7 +2290,6 @@ pl022_remove(struct amba_device *adev)
clk_disable(pl022->clk);
clk_unprepare(pl022->clk);
pm_runtime_disable(&adev->dev);
amba_release_regions(adev);
tasklet_disable(&pl022->pump_transfers);
spi_unregister_master(pl022->master);
......
......@@ -147,8 +147,6 @@ struct rspi_data {
unsigned char spsr;
/* for dmaengine */
struct sh_dmae_slave dma_tx;
struct sh_dmae_slave dma_rx;
struct dma_chan *chan_tx;
struct dma_chan *chan_rx;
int irq;
......@@ -663,20 +661,16 @@ static irqreturn_t rspi_irq(int irq, void *_sr)
return ret;
}
static bool rspi_filter(struct dma_chan *chan, void *filter_param)
{
chan->private = filter_param;
return true;
}
static void __devinit rspi_request_dma(struct rspi_data *rspi,
struct platform_device *pdev)
static int __devinit rspi_request_dma(struct rspi_data *rspi,
struct platform_device *pdev)
{
struct rspi_plat_data *rspi_pd = pdev->dev.platform_data;
dma_cap_mask_t mask;
struct dma_slave_config cfg;
int ret;
if (!rspi_pd)
return;
return 0; /* The driver assumes no error. */
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) {
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
rspi->dma_rx.slave_id = rspi_pd->dma_rx_id;
rspi->chan_rx = dma_request_channel(mask, rspi_filter,
&rspi->dma_rx);
if (rspi->chan_rx)
dev_info(&pdev->dev, "Use DMA when rx.\n");
rspi->chan_rx = dma_request_channel(mask, shdma_chan_filter,
(void *)rspi_pd->dma_rx_id);
if (rspi->chan_rx) {
cfg.slave_id = rspi_pd->dma_rx_id;
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) {
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
rspi->dma_tx.slave_id = rspi_pd->dma_tx_id;
rspi->chan_tx = dma_request_channel(mask, rspi_filter,
&rspi->dma_tx);
if (rspi->chan_tx)
dev_info(&pdev->dev, "Use DMA when tx\n");
rspi->chan_tx = dma_request_channel(mask, shdma_chan_filter,
(void *)rspi_pd->dma_tx_id);
if (rspi->chan_tx) {
cfg.slave_id = rspi_pd->dma_tx_id;
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)
......@@ -788,7 +796,11 @@ static int __devinit rspi_probe(struct platform_device *pdev)
}
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);
if (ret < 0) {
......
......@@ -3,8 +3,6 @@
*
* 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
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment