Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343614
b: refs/heads/master
c: 61d1596
h: refs/heads/master
v: v3
  • Loading branch information
Florian Fainelli authored and Mark Brown committed Oct 17, 2012
1 parent 2128449 commit 858a21f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 39 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5015a2e1679f9f56b574f3aab7006517106da83c
refs/heads/master: 61d15963176d44ba898913389b65588e717b7c59
5 changes: 2 additions & 3 deletions trunk/drivers/spi/spi-bcm63xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <bcm63xx_dev_spi.h>

#define PFX KBUILD_MODNAME
#define DRV_VER "0.1.2"

struct bcm63xx_spi {
struct completion done;
Expand Down Expand Up @@ -441,8 +440,8 @@ static int __devinit bcm63xx_spi_probe(struct platform_device *pdev)
goto out_clk_disable;
}

dev_info(dev, "at 0x%08x (irq %d, FIFOs size %d) v%s\n",
r->start, irq, bs->fifo_size, DRV_VER);
dev_info(dev, "at 0x%08x (irq %d, FIFOs size %d)\n",
r->start, irq, bs->fifo_size);

return 0;

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/spi/spi-pl022.c
Original file line number Diff line number Diff line change
Expand Up @@ -2186,7 +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_enable(dev);
pm_runtime_resume(dev);

pl022->clk = devm_clk_get(&adev->dev, NULL);
Expand Down
56 changes: 22 additions & 34 deletions trunk/drivers/spi/spi-rspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ 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;
Expand Down Expand Up @@ -661,52 +663,42 @@ static irqreturn_t rspi_irq(int irq, void *_sr)
return ret;
}

static int __devinit rspi_request_dma(struct rspi_data *rspi,
struct platform_device *pdev)
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)
{
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 0; /* The driver assumes no error. */
return;

rspi->dma_width_16bit = rspi_pd->dma_width_16bit;

/* If the module receives data by DMAC, it also needs TX DMAC */
if (rspi_pd->dma_rx_id && rspi_pd->dma_tx_id) {
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
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;
}
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");
}
if (rspi_pd->dma_tx_id) {
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
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;
}
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");
}

return 0;
}

static void __devexit rspi_release_dma(struct rspi_data *rspi)
Expand Down Expand Up @@ -796,11 +788,7 @@ static int __devinit rspi_probe(struct platform_device *pdev)
}

rspi->irq = irq;
ret = rspi_request_dma(rspi, pdev);
if (ret < 0) {
dev_err(&pdev->dev, "rspi_request_dma failed.\n");
goto error4;
}
rspi_request_dma(rspi, pdev);

ret = spi_register_master(master);
if (ret < 0) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/spi/tsc2005.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
*
* 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
Expand Down

0 comments on commit 858a21f

Please sign in to comment.