Patchwork [U-Boot,1/3] fsl_esdhc: add MMC_MODE_HC host_caps

login
register
mail settings
Submitter Shawn Guo
Date Dec. 31, 2012, 12:14 a.m.
Message ID <1356912900-32228-2-git-send-email-shawn.guo@linaro.org>
Download mbox | patch
Permalink /patch/208816/
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Comments

Shawn Guo - Dec. 31, 2012, 12:14 a.m.
All esdhc variants we know should support high capacity MMC cards,
so let's add MMC_MODE_HC host_caps unconditionally to support those
MMC cards (capacity > 2 GB).

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
 drivers/mmc/fsl_esdhc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Shawn Guo - Dec. 31, 2012, 3:59 a.m.
On Mon, Dec 31, 2012 at 08:14:58AM +0800, Shawn Guo wrote:
> All esdhc variants we know should support high capacity MMC cards,
> so let's add MMC_MODE_HC host_caps unconditionally to support those
> MMC cards (capacity > 2 GB).
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/mmc/fsl_esdhc.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
> index e93e38a..29f3122 100644
> --- a/drivers/mmc/fsl_esdhc.c
> +++ b/drivers/mmc/fsl_esdhc.c
> @@ -262,6 +262,7 @@ static void check_and_invalidate_dcache_range
>  	unsigned end = start+size ;
>  	invalidate_dcache_range(start, end);
>  }
> +

This is an accident coding style cleanup which I forgot recovering.
Hope maintainer is fine with it, otherwise I can resend the patch to
keep it unchanged.

Shawn

>  /*
>   * Sends a command out on the bus.  Takes the mmc pointer,
>   * a command pointer, and an optional data pointer.
> @@ -577,7 +578,7 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
>  		return -1;
>  	}
>  
> -	mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT;
> +	mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT | MMC_MODE_HC;
>  
>  	if (caps & ESDHC_HOSTCAPBLT_HSS)
>  		mmc->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
> -- 
> 1.7.9.5
> 
>
Stefano Babic - Jan. 5, 2013, 4:59 p.m.
On 31/12/2012 01:14, Shawn Guo wrote:
> All esdhc variants we know should support high capacity MMC cards,
> so let's add MMC_MODE_HC host_caps unconditionally to support those
> MMC cards (capacity > 2 GB).
> 
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>  drivers/mmc/fsl_esdhc.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
> index e93e38a..29f3122 100644
> --- a/drivers/mmc/fsl_esdhc.c
> +++ b/drivers/mmc/fsl_esdhc.c
> @@ -262,6 +262,7 @@ static void check_and_invalidate_dcache_range
>  	unsigned end = start+size ;
>  	invalidate_dcache_range(start, end);
>  }
> +

I drop myself this from the commit.

>  /*
>   * Sends a command out on the bus.  Takes the mmc pointer,
>   * a command pointer, and an optional data pointer.
> @@ -577,7 +578,7 @@ int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
>  		return -1;
>  	}
>  
> -	mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT;
> +	mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT | MMC_MODE_HC;
>  
>  	if (caps & ESDHC_HOSTCAPBLT_HSS)
>  		mmc->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
> 

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

Patch

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index e93e38a..29f3122 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -262,6 +262,7 @@  static void check_and_invalidate_dcache_range
 	unsigned end = start+size ;
 	invalidate_dcache_range(start, end);
 }
+
 /*
  * Sends a command out on the bus.  Takes the mmc pointer,
  * a command pointer, and an optional data pointer.
@@ -577,7 +578,7 @@  int fsl_esdhc_initialize(bd_t *bis, struct fsl_esdhc_cfg *cfg)
 		return -1;
 	}
 
-	mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT;
+	mmc->host_caps = MMC_MODE_4BIT | MMC_MODE_8BIT | MMC_MODE_HC;
 
 	if (caps & ESDHC_HOSTCAPBLT_HSS)
 		mmc->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;