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) ...@@ -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) ...@@ -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);
......
...@@ -147,8 +147,6 @@ struct rspi_data { ...@@ -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) ...@@ -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, ...@@ -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) ...@@ -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) {
......
...@@ -3,8 +3,6 @@ ...@@ -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
......
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