[V2,2/4] mtd: gpmi: use DMA channel 0 for all the nand chips

Submitted by Huang Shijie on Aug. 27, 2013, 9:29 a.m.

Details

Message ID 1377595747-21033-3-git-send-email-b32955@freescale.com
State New, archived
Headers show

Commit Message

Huang Shijie Aug. 27, 2013, 9:29 a.m.
We only have one DMA channel : the channel 0.
Use DMA channel 0 to access all the nand chips.

Signed-off-by: Huang Shijie <b32955@freescale.com>
---
 drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Comments

Vikram Narayanan Aug. 27, 2013, 5:05 p.m.
On 27/Aug/2013 2:59 PM, Huang Shijie wrote:
> We only have one DMA channel : the channel 0.
> Use DMA channel 0 to access all the nand chips.

IIRC, We have 4 DMA channels. Don't we?

> Signed-off-by: Huang Shijie <b32955@freescale.com>
> ---
>   drivers/mtd/nand/gpmi-nand/gpmi-nand.c |    5 ++---
>   1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> index 8d8a814..24ee8d7 100644
> --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
> @@ -357,9 +357,8 @@ int common_nfc_set_geometry(struct gpmi_nand_data *this)
>
>   struct dma_chan *get_dma_chan(struct gpmi_nand_data *this)
>   {
> -	int chipnr = this->current_chip;
> -
> -	return this->dma_chans[chipnr];
> +	/* We use the DMA channel 0 to access all the nand chips. */
> +	return this->dma_chans[0];
>   }
>
>   /* Can we use the upper's buffer directly for DMA? */
>
Huang Shijie Aug. 28, 2013, 2:19 a.m.
于 2013年08月28日 01:05, Vikram Narayanan 写道:
> IIRC, We have 4 DMA channels. Don't we? 
yes, we have. But we only have one gpmi.

I ever tried to use different dma channels for different chip selects.
But after discussed with our IC guy, it is proved to be meaningless.
We only have one gpmi, and so we only have one data bus. Even we have 4 
dma channels
, we have to do the DMA operations one by one.



thanks
Huang Shijie

Patch hide | download patch | download mbox

diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
index 8d8a814..24ee8d7 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
@@ -357,9 +357,8 @@  int common_nfc_set_geometry(struct gpmi_nand_data *this)
 
 struct dma_chan *get_dma_chan(struct gpmi_nand_data *this)
 {
-	int chipnr = this->current_chip;
-
-	return this->dma_chans[chipnr];
+	/* We use the DMA channel 0 to access all the nand chips. */
+	return this->dma_chans[0];
 }
 
 /* Can we use the upper's buffer directly for DMA? */