Re: [PATCH] mmc: dw_mmc: modified the DMA threshold for SD card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/22/2011 11:01 AM, Jaehoon Chung wrote:
> This patch modified the DMA threshold.
> 
> I didn't know exactly why need this threshold.
> But if this value is 16, we didn't read SCR register for SD card.
> Because in mmc_app_send_scr this values are used data.blocks=1 and data.blksz=8.
> (data.blocks * data.blksz = 8...so return -EINVAL)

The idea is that for a small transaction the time to set up the DMA is
probably not worth the effort, therefore it does it using PIO mode (see
dw_mci_submit_data, if dw_mci_submit_data_dma fails, it sets itself up
for pio mode instead).

So if it's using PIO mode and the SCR cannot be read, then PIO mode is
broken. What's the value of the register HCON? dw_mci_probe reads it and
decides which pio push and pull function to use based on the host data
width. I've only tested one of them as we only have one configuration of
hardware available, but you may have a different one.

Cheers
James

> 
> We didn't read the SCR register, then maybe should be set with wrong configuration.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@xxxxxxxxxxx>
> Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
> ---
>  drivers/mmc/host/dw_mmc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 0ed1d28..64e08e2 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -47,7 +47,7 @@
>  				 DW_MCI_CMD_ERROR_FLAGS  | SDMMC_INT_HLE)
>  #define DW_MCI_SEND_STATUS	1
>  #define DW_MCI_RECV_STATUS	2
> -#define DW_MCI_DMA_THRESHOLD	16
> +#define DW_MCI_DMA_THRESHOLD	8
>  
>  #ifdef CONFIG_MMC_DW_IDMAC
>  struct idmac_desc {

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux