RE: [PATCH]omap hsmmc: fix incorrect capability reporting

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

 




> -----Original Message-----
> From: svenkatr@xxxxxxxxx [mailto:svenkatr@xxxxxxxxx] On Behalf Of
> Venkatraman S
> Sent: Tuesday, March 30, 2010 9:37 AM
> To: linux-mmc@xxxxxxxxxxxxxxx; linux-omap@xxxxxxxxxxxxxxx;
> kishore.kadiyala@xxxxxx
> Cc: Madhusudhan Chikkature
> Subject: [PATCH]omap hsmmc: fix incorrect capability reporting
> 
> MMC slots that support 8 bit mode also support 4 bit mode.
> The capability flag has to reflect this, otherwise SDHC cards operate
> in 1 bit mode.
> 
> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@xxxxxx>
> Signed-off-by: Venkatraman S <svenkatr@xxxxxx>
> ---
>  drivers/mmc/host/omap_hsmmc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 83f0aff..dbf83a6 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2093,7 +2093,7 @@ static int __init omap_hsmmc_probe(struct
> platform_device *pdev)
> 
>  	if (mmc_slot(host).wires >= 8)
>  		mmc->caps |= MMC_CAP_8_BIT_DATA;
> -	else if (mmc_slot(host).wires >= 4)
> +	if (mmc_slot(host).wires >= 4)
>  		mmc->caps |= MMC_CAP_4_BIT_DATA;
> 

Since 8-bit is the max how about:

  	if (mmc_slot(host).wires == 8)
  		mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA;
	if (mmc_slot(host).wires == 4)
  		mmc->caps |= MMC_CAP_4_BIT_DATA;

This would be little easy to read the code.

Regards,
Madhu

>  	if (mmc_slot(host).nonremovable)
> --
> 1.6.3.3

--
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