All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support
@ 2017-11-21 15:13 ` Jean-Jacques Hiblot
  2017-11-21 15:13   ` [U-Boot] [PATCH 1/5] dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width Jean-Jacques Hiblot
                     ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Jean-Jacques Hiblot @ 2017-11-21 15:13 UTC (permalink / raw)
  To: u-boot

This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200
and UHS modes"

It fixes a bug with old SD and MMC cards that support only the legacy mode.
It also addresses the comments made on the mailing list:
* dump card and host capabilities in debug mode
* use 1-bit if the DTS property 'bus-width' is not present.
* recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties

Tested on DRA7, DRA72 and AM335x

Jean-Jacques Hiblot (5):
  dm: mmc: updated mmc_of_parse() to not fail because of an invalid
    bus-width
  mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean
    properties
  mmc: dump card and host capabilities if debug is enabled
  mmc: Fixed a problem with old sd or mmc that do not support High speed
  mmc: all hosts support 1-bit bus width and legacy timings

 drivers/mmc/mmc-uclass.c | 11 ++++++++---
 drivers/mmc/mmc.c        | 24 +++++++++++++++++++-----
 2 files changed, 27 insertions(+), 8 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 1/5] dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width
  2017-11-21 15:13 ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jean-Jacques Hiblot
@ 2017-11-21 15:13   ` Jean-Jacques Hiblot
  2017-11-22  9:07     ` Lukasz Majewski
  2017-11-24 22:36     ` Simon Glass
  2017-11-21 15:13   ` [U-Boot] [PATCH 2/5] mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties Jean-Jacques Hiblot
                     ` (4 subsequent siblings)
  5 siblings, 2 replies; 23+ messages in thread
From: Jean-Jacques Hiblot @ 2017-11-21 15:13 UTC (permalink / raw)
  To: u-boot

Instead of failing, the driver uses the default: 1-bit bus width.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---
 drivers/mmc/mmc-uclass.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index e30cde7..48fafce 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -137,9 +137,10 @@ int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg)
 		cfg->host_caps |= MMC_MODE_1BIT;
 		break;
 	default:
-		printf("error: %s invalid bus-width property %d\n",
-		       fdt_get_name(fdt, node, NULL), val);
-		return -ENOENT;
+		debug("warning: %s invalid bus-width property. using 1-bit\n",
+		      fdt_get_name(fdt, node, NULL));
+		cfg->host_caps |= MMC_MODE_1BIT;
+		break;
 	}
 
 	cfg->f_max = fdtdec_get_int(fdt, node, "max-frequency", 52000000);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 2/5] mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties
  2017-11-21 15:13 ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jean-Jacques Hiblot
  2017-11-21 15:13   ` [U-Boot] [PATCH 1/5] dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width Jean-Jacques Hiblot
@ 2017-11-21 15:13   ` Jean-Jacques Hiblot
  2017-11-22  9:08     ` Lukasz Majewski
  2017-11-24 22:36     ` Simon Glass
  2017-11-21 15:13   ` [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled Jean-Jacques Hiblot
                     ` (3 subsequent siblings)
  5 siblings, 2 replies; 23+ messages in thread
From: Jean-Jacques Hiblot @ 2017-11-21 15:13 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---
 drivers/mmc/mmc-uclass.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index 48fafce..9723129 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -161,8 +161,12 @@ int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg)
 		cfg->host_caps |= MMC_CAP(UHS_DDR50);
 	if (fdtdec_get_bool(fdt, node, "mmc-ddr-1_8v"))
 		cfg->host_caps |= MMC_CAP(MMC_DDR_52);
+	if (fdtdec_get_bool(fdt, node, "mmc-ddr-1_2v"))
+		cfg->host_caps |= MMC_CAP(MMC_DDR_52);
 	if (fdtdec_get_bool(fdt, node, "mmc-hs200-1_8v"))
 		cfg->host_caps |= MMC_CAP(MMC_HS_200);
+	if (fdtdec_get_bool(fdt, node, "mmc-hs200-1_2v"))
+		cfg->host_caps |= MMC_CAP(MMC_HS_200);
 
 	return 0;
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled
  2017-11-21 15:13 ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jean-Jacques Hiblot
  2017-11-21 15:13   ` [U-Boot] [PATCH 1/5] dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width Jean-Jacques Hiblot
  2017-11-21 15:13   ` [U-Boot] [PATCH 2/5] mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties Jean-Jacques Hiblot
@ 2017-11-21 15:13   ` Jean-Jacques Hiblot
  2017-11-22  9:08     ` Lukasz Majewski
  2017-11-24 22:36     ` Simon Glass
  2017-11-21 15:13   ` [U-Boot] [PATCH 4/5] mmc: Fixed a problem with old sd or mmc that do not support High speed Jean-Jacques Hiblot
                     ` (2 subsequent siblings)
  5 siblings, 2 replies; 23+ messages in thread
From: Jean-Jacques Hiblot @ 2017-11-21 15:13 UTC (permalink / raw)
  To: u-boot

This is a useful information while debugging the initialization process or
performance issues.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---
 drivers/mmc/mmc.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index a5a521e..a30b6a2 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1502,6 +1502,10 @@ void mmc_dump_capabilities(const char *text, uint caps)
 			printf("%s, ", mmc_mode_name(mode));
 	printf("\b\b]\n");
 }
+#else
+void mmc_dump_capabilities(const char *text, uint caps)
+{
+}
 #endif
 
 struct mode_width_tuning {
@@ -1582,6 +1586,8 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
 	bool uhs_en = (mmc->ocr & OCR_S18R) ? true : false;
 	uint caps;
 
+	mmc_dump_capabilities("sd card", card_caps);
+	mmc_dump_capabilities("host", mmc->host_caps | MMC_MODE_1BIT);
 
 	/* Restrict card's capabilities by what the host can do */
 	caps = card_caps & (mmc->host_caps | MMC_MODE_1BIT);
@@ -1764,6 +1770,9 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)
 	const struct mode_width_tuning *mwt;
 	const struct ext_csd_bus_width *ecbw;
 
+	mmc_dump_capabilities("mmc", card_caps);
+	mmc_dump_capabilities("host", mmc->host_caps | MMC_MODE_1BIT);
+
 	/* Restrict card's capabilities by what the host can do */
 	card_caps &= (mmc->host_caps | MMC_MODE_1BIT);
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 4/5] mmc: Fixed a problem with old sd or mmc that do not support High speed
  2017-11-21 15:13 ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jean-Jacques Hiblot
                     ` (2 preceding siblings ...)
  2017-11-21 15:13   ` [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled Jean-Jacques Hiblot
@ 2017-11-21 15:13   ` Jean-Jacques Hiblot
  2017-11-22  9:09     ` Lukasz Majewski
  2017-11-24 22:36     ` Simon Glass
  2017-11-21 15:13   ` [U-Boot] [PATCH 5/5] mmc: all hosts support 1-bit bus width and legacy timings Jean-Jacques Hiblot
  2017-11-22 12:09   ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jaehoon Chung
  5 siblings, 2 replies; 23+ messages in thread
From: Jean-Jacques Hiblot @ 2017-11-21 15:13 UTC (permalink / raw)
  To: u-boot

As the legacy modes were not added to the list of supported modes, old
cards that do not support other modes could not be used.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---
 drivers/mmc/mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index a30b6a2..67f21ff 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -818,7 +818,7 @@ static int mmc_get_capabilities(struct mmc *mmc)
 	u8 *ext_csd = mmc->ext_csd;
 	char cardtype;
 
-	mmc->card_caps = MMC_MODE_1BIT;
+	mmc->card_caps = MMC_MODE_1BIT | MMC_CAP(MMC_LEGACY);
 
 	if (mmc_host_is_spi(mmc))
 		return 0;
@@ -1171,7 +1171,7 @@ static int sd_get_capabilities(struct mmc *mmc)
 	int timeout;
 	u32 sd3_bus_mode;
 
-	mmc->card_caps = MMC_MODE_1BIT;
+	mmc->card_caps = MMC_MODE_1BIT | MMC_CAP(SD_LEGACY);
 
 	if (mmc_host_is_spi(mmc))
 		return 0;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 5/5] mmc: all hosts support 1-bit bus width and legacy timings
  2017-11-21 15:13 ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jean-Jacques Hiblot
                     ` (3 preceding siblings ...)
  2017-11-21 15:13   ` [U-Boot] [PATCH 4/5] mmc: Fixed a problem with old sd or mmc that do not support High speed Jean-Jacques Hiblot
@ 2017-11-21 15:13   ` Jean-Jacques Hiblot
  2017-11-22  9:09     ` Lukasz Majewski
  2017-11-24 22:36     ` Simon Glass
  2017-11-22 12:09   ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jaehoon Chung
  5 siblings, 2 replies; 23+ messages in thread
From: Jean-Jacques Hiblot @ 2017-11-21 15:13 UTC (permalink / raw)
  To: u-boot

Make sure that those basic capabilities are advertised by the host.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---
 drivers/mmc/mmc.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 67f21ff..ec1dc49 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1587,10 +1587,10 @@ static int sd_select_mode_and_width(struct mmc *mmc, uint card_caps)
 	uint caps;
 
 	mmc_dump_capabilities("sd card", card_caps);
-	mmc_dump_capabilities("host", mmc->host_caps | MMC_MODE_1BIT);
+	mmc_dump_capabilities("host", mmc->host_caps);
 
 	/* Restrict card's capabilities by what the host can do */
-	caps = card_caps & (mmc->host_caps | MMC_MODE_1BIT);
+	caps = card_caps & mmc->host_caps;
 
 	if (!uhs_en)
 		caps &= ~UHS_CAPS;
@@ -1771,10 +1771,10 @@ static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)
 	const struct ext_csd_bus_width *ecbw;
 
 	mmc_dump_capabilities("mmc", card_caps);
-	mmc_dump_capabilities("host", mmc->host_caps | MMC_MODE_1BIT);
+	mmc_dump_capabilities("host", mmc->host_caps);
 
 	/* Restrict card's capabilities by what the host can do */
-	card_caps &= (mmc->host_caps | MMC_MODE_1BIT);
+	card_caps &= mmc->host_caps;
 
 	/* Only version 4 of MMC supports wider bus widths */
 	if (mmc->version < MMC_VERSION_4)
@@ -2389,7 +2389,12 @@ int mmc_start_init(struct mmc *mmc)
 	bool uhs_en = supports_uhs(mmc->cfg->host_caps);
 	int err;
 
-	mmc->host_caps = mmc->cfg->host_caps;
+	/*
+	 * all hosts are capable of 1 bit bus-width and able to use the legacy
+	 * timings.
+	 */
+	mmc->host_caps = mmc->cfg->host_caps | MMC_CAP(SD_LEGACY) |
+			 MMC_CAP(MMC_LEGACY) | MMC_MODE_1BIT;
 
 	/* we pretend there's no card when init is NULL */
 	no_card = mmc_getcd(mmc) == 0;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 1/5] dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width
  2017-11-21 15:13   ` [U-Boot] [PATCH 1/5] dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width Jean-Jacques Hiblot
@ 2017-11-22  9:07     ` Lukasz Majewski
  2017-11-24 22:36     ` Simon Glass
  1 sibling, 0 replies; 23+ messages in thread
From: Lukasz Majewski @ 2017-11-22  9:07 UTC (permalink / raw)
  To: u-boot

On Tue, 21 Nov 2017 16:13:04 +0100
Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:

> Instead of failing, the driver uses the default: 1-bit bus width.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc-uclass.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
> index e30cde7..48fafce 100644
> --- a/drivers/mmc/mmc-uclass.c
> +++ b/drivers/mmc/mmc-uclass.c
> @@ -137,9 +137,10 @@ int mmc_of_parse(const void *fdt, int node,
> struct mmc_config *cfg) cfg->host_caps |= MMC_MODE_1BIT;
>  		break;
>  	default:
> -		printf("error: %s invalid bus-width property %d\n",
> -		       fdt_get_name(fdt, node, NULL), val);
> -		return -ENOENT;
> +		debug("warning: %s invalid bus-width property. using
> 1-bit\n",
> +		      fdt_get_name(fdt, node, NULL));
> +		cfg->host_caps |= MMC_MODE_1BIT;
> +		break;
>  	}
>  
>  	cfg->f_max = fdtdec_get_int(fdt, node, "max-frequency",
> 52000000);

Reviewed-by: Lukasz Majewski <lukma@denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/9913faba/attachment.sig>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 2/5] mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties
  2017-11-21 15:13   ` [U-Boot] [PATCH 2/5] mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties Jean-Jacques Hiblot
@ 2017-11-22  9:08     ` Lukasz Majewski
  2017-11-24 22:36     ` Simon Glass
  1 sibling, 0 replies; 23+ messages in thread
From: Lukasz Majewski @ 2017-11-22  9:08 UTC (permalink / raw)
  To: u-boot

On Tue, 21 Nov 2017 16:13:05 +0100
Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:

> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc-uclass.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
> index 48fafce..9723129 100644
> --- a/drivers/mmc/mmc-uclass.c
> +++ b/drivers/mmc/mmc-uclass.c
> @@ -161,8 +161,12 @@ int mmc_of_parse(const void *fdt, int node,
> struct mmc_config *cfg) cfg->host_caps |= MMC_CAP(UHS_DDR50);
>  	if (fdtdec_get_bool(fdt, node, "mmc-ddr-1_8v"))
>  		cfg->host_caps |= MMC_CAP(MMC_DDR_52);
> +	if (fdtdec_get_bool(fdt, node, "mmc-ddr-1_2v"))
> +		cfg->host_caps |= MMC_CAP(MMC_DDR_52);
>  	if (fdtdec_get_bool(fdt, node, "mmc-hs200-1_8v"))
>  		cfg->host_caps |= MMC_CAP(MMC_HS_200);
> +	if (fdtdec_get_bool(fdt, node, "mmc-hs200-1_2v"))
> +		cfg->host_caps |= MMC_CAP(MMC_HS_200);
>  
>  	return 0;
>  }

Reviewed-by: Lukasz Majewski <lukma@denx.de>

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/a752232a/attachment.sig>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled
  2017-11-21 15:13   ` [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled Jean-Jacques Hiblot
@ 2017-11-22  9:08     ` Lukasz Majewski
  2017-11-24 22:36     ` Simon Glass
  1 sibling, 0 replies; 23+ messages in thread
From: Lukasz Majewski @ 2017-11-22  9:08 UTC (permalink / raw)
  To: u-boot

On Tue, 21 Nov 2017 16:13:06 +0100
Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:

> This is a useful information while debugging the initialization
> process or performance issues.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index a5a521e..a30b6a2 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -1502,6 +1502,10 @@ void mmc_dump_capabilities(const char *text,
> uint caps) printf("%s, ", mmc_mode_name(mode));
>  	printf("\b\b]\n");
>  }
> +#else
> +void mmc_dump_capabilities(const char *text, uint caps)
> +{
> +}
>  #endif
>  
>  struct mode_width_tuning {
> @@ -1582,6 +1586,8 @@ static int sd_select_mode_and_width(struct mmc
> *mmc, uint card_caps) bool uhs_en = (mmc->ocr & OCR_S18R) ? true :
> false; uint caps;
>  
> +	mmc_dump_capabilities("sd card", card_caps);
> +	mmc_dump_capabilities("host", mmc->host_caps |
> MMC_MODE_1BIT); 
>  	/* Restrict card's capabilities by what the host can do */
>  	caps = card_caps & (mmc->host_caps | MMC_MODE_1BIT);
> @@ -1764,6 +1770,9 @@ static int mmc_select_mode_and_width(struct mmc
> *mmc, uint card_caps) const struct mode_width_tuning *mwt;
>  	const struct ext_csd_bus_width *ecbw;
>  
> +	mmc_dump_capabilities("mmc", card_caps);
> +	mmc_dump_capabilities("host", mmc->host_caps |
> MMC_MODE_1BIT); +
>  	/* Restrict card's capabilities by what the host can do */
>  	card_caps &= (mmc->host_caps | MMC_MODE_1BIT);
>  

Reviewed-by: Lukasz Majewski <lukma@denx.de>

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/8278f9c4/attachment.sig>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 4/5] mmc: Fixed a problem with old sd or mmc that do not support High speed
  2017-11-21 15:13   ` [U-Boot] [PATCH 4/5] mmc: Fixed a problem with old sd or mmc that do not support High speed Jean-Jacques Hiblot
@ 2017-11-22  9:09     ` Lukasz Majewski
  2017-11-24 22:36     ` Simon Glass
  1 sibling, 0 replies; 23+ messages in thread
From: Lukasz Majewski @ 2017-11-22  9:09 UTC (permalink / raw)
  To: u-boot

On Tue, 21 Nov 2017 16:13:07 +0100
Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:

> As the legacy modes were not added to the list of supported modes, old
> cards that do not support other modes could not be used.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index a30b6a2..67f21ff 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -818,7 +818,7 @@ static int mmc_get_capabilities(struct mmc *mmc)
>  	u8 *ext_csd = mmc->ext_csd;
>  	char cardtype;
>  
> -	mmc->card_caps = MMC_MODE_1BIT;
> +	mmc->card_caps = MMC_MODE_1BIT | MMC_CAP(MMC_LEGACY);
>  
>  	if (mmc_host_is_spi(mmc))
>  		return 0;
> @@ -1171,7 +1171,7 @@ static int sd_get_capabilities(struct mmc *mmc)
>  	int timeout;
>  	u32 sd3_bus_mode;
>  
> -	mmc->card_caps = MMC_MODE_1BIT;
> +	mmc->card_caps = MMC_MODE_1BIT | MMC_CAP(SD_LEGACY);
>  
>  	if (mmc_host_is_spi(mmc))
>  		return 0;

Reviewed-by: Lukasz Majewski <lukma@denx.de>

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/09429154/attachment.sig>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 5/5] mmc: all hosts support 1-bit bus width and legacy timings
  2017-11-21 15:13   ` [U-Boot] [PATCH 5/5] mmc: all hosts support 1-bit bus width and legacy timings Jean-Jacques Hiblot
@ 2017-11-22  9:09     ` Lukasz Majewski
  2017-11-24 22:36     ` Simon Glass
  1 sibling, 0 replies; 23+ messages in thread
From: Lukasz Majewski @ 2017-11-22  9:09 UTC (permalink / raw)
  To: u-boot

On Tue, 21 Nov 2017 16:13:08 +0100
Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:

> Make sure that those basic capabilities are advertised by the host.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc.c | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 67f21ff..ec1dc49 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -1587,10 +1587,10 @@ static int sd_select_mode_and_width(struct
> mmc *mmc, uint card_caps) uint caps;
>  
>  	mmc_dump_capabilities("sd card", card_caps);
> -	mmc_dump_capabilities("host", mmc->host_caps |
> MMC_MODE_1BIT);
> +	mmc_dump_capabilities("host", mmc->host_caps);
>  
>  	/* Restrict card's capabilities by what the host can do */
> -	caps = card_caps & (mmc->host_caps | MMC_MODE_1BIT);
> +	caps = card_caps & mmc->host_caps;
>  
>  	if (!uhs_en)
>  		caps &= ~UHS_CAPS;
> @@ -1771,10 +1771,10 @@ static int mmc_select_mode_and_width(struct
> mmc *mmc, uint card_caps) const struct ext_csd_bus_width *ecbw;
>  
>  	mmc_dump_capabilities("mmc", card_caps);
> -	mmc_dump_capabilities("host", mmc->host_caps |
> MMC_MODE_1BIT);
> +	mmc_dump_capabilities("host", mmc->host_caps);
>  
>  	/* Restrict card's capabilities by what the host can do */
> -	card_caps &= (mmc->host_caps | MMC_MODE_1BIT);
> +	card_caps &= mmc->host_caps;
>  
>  	/* Only version 4 of MMC supports wider bus widths */
>  	if (mmc->version < MMC_VERSION_4)
> @@ -2389,7 +2389,12 @@ int mmc_start_init(struct mmc *mmc)
>  	bool uhs_en = supports_uhs(mmc->cfg->host_caps);
>  	int err;
>  
> -	mmc->host_caps = mmc->cfg->host_caps;
> +	/*
> +	 * all hosts are capable of 1 bit bus-width and able to use
> the legacy
> +	 * timings.
> +	 */
> +	mmc->host_caps = mmc->cfg->host_caps | MMC_CAP(SD_LEGACY) |
> +			 MMC_CAP(MMC_LEGACY) | MMC_MODE_1BIT;
>  
>  	/* we pretend there's no card when init is NULL */
>  	no_card = mmc_getcd(mmc) == 0;

Reviewed-by: Lukasz Majewski <lukma@denx.de>

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/9fea8748/attachment.sig>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support
  2017-11-21 15:13 ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jean-Jacques Hiblot
                     ` (4 preceding siblings ...)
  2017-11-21 15:13   ` [U-Boot] [PATCH 5/5] mmc: all hosts support 1-bit bus width and legacy timings Jean-Jacques Hiblot
@ 2017-11-22 12:09   ` Jaehoon Chung
  2017-11-22 14:00     ` Marek Vasut
  5 siblings, 1 reply; 23+ messages in thread
From: Jaehoon Chung @ 2017-11-22 12:09 UTC (permalink / raw)
  To: u-boot

On 11/22/2017 12:13 AM, Jean-Jacques Hiblot wrote:
> This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200
> and UHS modes"
> 
> It fixes a bug with old SD and MMC cards that support only the legacy mode.
> It also addresses the comments made on the mailing list:
> * dump card and host capabilities in debug mode
> * use 1-bit if the DTS property 'bus-width' is not present.
> * recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties
> 
> Tested on DRA7, DRA72 and AM335x

Thanks for sending patches. After testing with my boards, will update.
For your patches, i made the testing-uhs-supporting branch on u-boot-mmc.

At least, i will share the result about testing with my boards.

Best Regards,
Jaehoon Chung

> 
> Jean-Jacques Hiblot (5):
>   dm: mmc: updated mmc_of_parse() to not fail because of an invalid
>     bus-width
>   mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean
>     properties
>   mmc: dump card and host capabilities if debug is enabled
>   mmc: Fixed a problem with old sd or mmc that do not support High speed
>   mmc: all hosts support 1-bit bus width and legacy timings
> 
>  drivers/mmc/mmc-uclass.c | 11 ++++++++---
>  drivers/mmc/mmc.c        | 24 +++++++++++++++++++-----
>  2 files changed, 27 insertions(+), 8 deletions(-)
> 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support
  2017-11-22 12:09   ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jaehoon Chung
@ 2017-11-22 14:00     ` Marek Vasut
  2017-11-23 14:52       ` Jean-Jacques Hiblot
  0 siblings, 1 reply; 23+ messages in thread
From: Marek Vasut @ 2017-11-22 14:00 UTC (permalink / raw)
  To: u-boot

On 11/22/2017 01:09 PM, Jaehoon Chung wrote:
> On 11/22/2017 12:13 AM, Jean-Jacques Hiblot wrote:
>> This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200
>> and UHS modes"
>>
>> It fixes a bug with old SD and MMC cards that support only the legacy mode.
>> It also addresses the comments made on the mailing list:
>> * dump card and host capabilities in debug mode
>> * use 1-bit if the DTS property 'bus-width' is not present.
>> * recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties
>>
>> Tested on DRA7, DRA72 and AM335x
> 
> Thanks for sending patches. After testing with my boards, will update.
> For your patches, i made the testing-uhs-supporting branch on u-boot-mmc.
> 
> At least, i will share the result about testing with my boards.
Any chance this UHS support will make it into this release finally ?
It's been dragging on for like half a year already ...

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support
  2017-11-22 14:00     ` Marek Vasut
@ 2017-11-23 14:52       ` Jean-Jacques Hiblot
  2017-11-23 14:55         ` Marek Vasut
  2017-11-27  9:45         ` Jaehoon Chung
  0 siblings, 2 replies; 23+ messages in thread
From: Jean-Jacques Hiblot @ 2017-11-23 14:52 UTC (permalink / raw)
  To: u-boot



On 22/11/2017 15:00, Marek Vasut wrote:
> On 11/22/2017 01:09 PM, Jaehoon Chung wrote:
>> On 11/22/2017 12:13 AM, Jean-Jacques Hiblot wrote:
>>> This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200
>>> and UHS modes"
>>>
>>> It fixes a bug with old SD and MMC cards that support only the legacy mode.
>>> It also addresses the comments made on the mailing list:
>>> * dump card and host capabilities in debug mode
>>> * use 1-bit if the DTS property 'bus-width' is not present.
>>> * recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties
>>>
>>> Tested on DRA7, DRA72 and AM335x
>> Thanks for sending patches. After testing with my boards, will update.
>> For your patches, i made the testing-uhs-supporting branch on u-boot-mmc.
>>
>> At least, i will share the result about testing with my boards.
> Any chance this UHS support will make it into this release finally ?
I hope so too. Jaehoon, do you need some help with the testing? what 
would you need?
> It's been dragging on for like half a year already ...
>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support
  2017-11-23 14:52       ` Jean-Jacques Hiblot
@ 2017-11-23 14:55         ` Marek Vasut
  2017-11-24  6:01           ` Jaehoon Chung
  2017-11-27  9:45         ` Jaehoon Chung
  1 sibling, 1 reply; 23+ messages in thread
From: Marek Vasut @ 2017-11-23 14:55 UTC (permalink / raw)
  To: u-boot

On 11/23/2017 03:52 PM, Jean-Jacques Hiblot wrote:
> 
> 
> On 22/11/2017 15:00, Marek Vasut wrote:
>> On 11/22/2017 01:09 PM, Jaehoon Chung wrote:
>>> On 11/22/2017 12:13 AM, Jean-Jacques Hiblot wrote:
>>>> This series applies on top of "[PATCH v2 00/26] mmc: Add support for
>>>> HS200
>>>> and UHS modes"
>>>>
>>>> It fixes a bug with old SD and MMC cards that support only the
>>>> legacy mode.
>>>> It also addresses the comments made on the mailing list:
>>>> * dump card and host capabilities in debug mode
>>>> * use 1-bit if the DTS property 'bus-width' is not present.
>>>> * recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties
>>>>
>>>> Tested on DRA7, DRA72 and AM335x
>>> Thanks for sending patches. After testing with my boards, will update.
>>> For your patches, i made the testing-uhs-supporting branch on
>>> u-boot-mmc.
>>>
>>> At least, i will share the result about testing with my boards.
>> Any chance this UHS support will make it into this release finally ?
> I hope so too. Jaehoon, do you need some help with the testing? what
> would you need?

It's been tested on 3 different HW platforms and controllers already, so
I really fail to see much of a reason to drag this on. If something is
botched on samsung controller, that can always be fixed later.

>> It's been dragging on for like half a year already ...
>>
> 
> 


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support
  2017-11-23 14:55         ` Marek Vasut
@ 2017-11-24  6:01           ` Jaehoon Chung
  0 siblings, 0 replies; 23+ messages in thread
From: Jaehoon Chung @ 2017-11-24  6:01 UTC (permalink / raw)
  To: u-boot

On 11/23/2017 11:55 PM, Marek Vasut wrote:
> On 11/23/2017 03:52 PM, Jean-Jacques Hiblot wrote:
>>
>>
>> On 22/11/2017 15:00, Marek Vasut wrote:
>>> On 11/22/2017 01:09 PM, Jaehoon Chung wrote:
>>>> On 11/22/2017 12:13 AM, Jean-Jacques Hiblot wrote:
>>>>> This series applies on top of "[PATCH v2 00/26] mmc: Add support for
>>>>> HS200
>>>>> and UHS modes"
>>>>>
>>>>> It fixes a bug with old SD and MMC cards that support only the
>>>>> legacy mode.
>>>>> It also addresses the comments made on the mailing list:
>>>>> * dump card and host capabilities in debug mode
>>>>> * use 1-bit if the DTS property 'bus-width' is not present.
>>>>> * recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties
>>>>>
>>>>> Tested on DRA7, DRA72 and AM335x
>>>> Thanks for sending patches. After testing with my boards, will update.
>>>> For your patches, i made the testing-uhs-supporting branch on
>>>> u-boot-mmc.
>>>>
>>>> At least, i will share the result about testing with my boards.
>>> Any chance this UHS support will make it into this release finally ?
>> I hope so too. Jaehoon, do you need some help with the testing? what
>> would you need?
> 
> It's been tested on 3 different HW platforms and controllers already, so
> I really fail to see much of a reason to drag this on. If something is
> botched on samsung controller, that can always be fixed later.
Ok. I will do. Sorry.

Thanks!


> 
>>> It's been dragging on for like half a year already ...
>>>
>>
>>
> 
> 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 1/5] dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width
  2017-11-21 15:13   ` [U-Boot] [PATCH 1/5] dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width Jean-Jacques Hiblot
  2017-11-22  9:07     ` Lukasz Majewski
@ 2017-11-24 22:36     ` Simon Glass
  1 sibling, 0 replies; 23+ messages in thread
From: Simon Glass @ 2017-11-24 22:36 UTC (permalink / raw)
  To: u-boot

Hi Jean-Jacques,


On 21 November 2017 at 08:13, Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
> Instead of failing, the driver uses the default: 1-bit bus width.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc-uclass.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
> index e30cde7..48fafce 100644
> --- a/drivers/mmc/mmc-uclass.c
> +++ b/drivers/mmc/mmc-uclass.c
> @@ -137,9 +137,10 @@ int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg)

Can you please add a function comment for this function in the header?

Also if you have time, this function should be converted to use live
tree - dev_read...() etc.

>                 cfg->host_caps |= MMC_MODE_1BIT;
>                 break;
>         default:
> -               printf("error: %s invalid bus-width property %d\n",
> -                      fdt_get_name(fdt, node, NULL), val);
> -               return -ENOENT;
> +               debug("warning: %s invalid bus-width property. using 1-bit\n",
> +                     fdt_get_name(fdt, node, NULL));
> +               cfg->host_caps |= MMC_MODE_1BIT;
> +               break;
>         }
>
>         cfg->f_max = fdtdec_get_int(fdt, node, "max-frequency", 52000000);
> --
> 1.9.1
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 2/5] mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties
  2017-11-21 15:13   ` [U-Boot] [PATCH 2/5] mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties Jean-Jacques Hiblot
  2017-11-22  9:08     ` Lukasz Majewski
@ 2017-11-24 22:36     ` Simon Glass
  1 sibling, 0 replies; 23+ messages in thread
From: Simon Glass @ 2017-11-24 22:36 UTC (permalink / raw)
  To: u-boot

Hi Jean-Jacques,

On 21 November 2017 at 08:13, Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc-uclass.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
> index 48fafce..9723129 100644
> --- a/drivers/mmc/mmc-uclass.c
> +++ b/drivers/mmc/mmc-uclass.c
> @@ -161,8 +161,12 @@ int mmc_of_parse(const void *fdt, int node, struct mmc_config *cfg)
>                 cfg->host_caps |= MMC_CAP(UHS_DDR50);
>         if (fdtdec_get_bool(fdt, node, "mmc-ddr-1_8v"))
>                 cfg->host_caps |= MMC_CAP(MMC_DDR_52);
> +       if (fdtdec_get_bool(fdt, node, "mmc-ddr-1_2v"))
> +               cfg->host_caps |= MMC_CAP(MMC_DDR_52);
>         if (fdtdec_get_bool(fdt, node, "mmc-hs200-1_8v"))
>                 cfg->host_caps |= MMC_CAP(MMC_HS_200);
> +       if (fdtdec_get_bool(fdt, node, "mmc-hs200-1_2v"))
> +               cfg->host_caps |= MMC_CAP(MMC_HS_200);

Hmm, please convert to livetree first - e.g. ofnode_read_bool()

>
>         return 0;
>  }
> --
> 1.9.1
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled
  2017-11-21 15:13   ` [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled Jean-Jacques Hiblot
  2017-11-22  9:08     ` Lukasz Majewski
@ 2017-11-24 22:36     ` Simon Glass
  1 sibling, 0 replies; 23+ messages in thread
From: Simon Glass @ 2017-11-24 22:36 UTC (permalink / raw)
  To: u-boot

On 21 November 2017 at 08:13, Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
> This is a useful information while debugging the initialization process or
> performance issues.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 4/5] mmc: Fixed a problem with old sd or mmc that do not support High speed
  2017-11-21 15:13   ` [U-Boot] [PATCH 4/5] mmc: Fixed a problem with old sd or mmc that do not support High speed Jean-Jacques Hiblot
  2017-11-22  9:09     ` Lukasz Majewski
@ 2017-11-24 22:36     ` Simon Glass
  1 sibling, 0 replies; 23+ messages in thread
From: Simon Glass @ 2017-11-24 22:36 UTC (permalink / raw)
  To: u-boot

On 21 November 2017 at 08:13, Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:

nit: It is common to use the imperative tense in patches rather than
past tesse, e.g. 'Fix a problem with...'

> As the legacy modes were not added to the list of supported modes, old
> cards that do not support other modes could not be used.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 5/5] mmc: all hosts support 1-bit bus width and legacy timings
  2017-11-21 15:13   ` [U-Boot] [PATCH 5/5] mmc: all hosts support 1-bit bus width and legacy timings Jean-Jacques Hiblot
  2017-11-22  9:09     ` Lukasz Majewski
@ 2017-11-24 22:36     ` Simon Glass
  2017-11-27  8:47       ` Jean-Jacques Hiblot
  1 sibling, 1 reply; 23+ messages in thread
From: Simon Glass @ 2017-11-24 22:36 UTC (permalink / raw)
  To: u-boot

Hi Jean-Jacques,

On 21 November 2017 at 08:13, Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
> Make sure that those basic capabilities are advertised by the host.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>  drivers/mmc/mmc.c | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
>

Your patch seems to suggest that the hardware is advertising the wrong
thing. Is that right?

Regards,
Simon

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 5/5] mmc: all hosts support 1-bit bus width and legacy timings
  2017-11-24 22:36     ` Simon Glass
@ 2017-11-27  8:47       ` Jean-Jacques Hiblot
  0 siblings, 0 replies; 23+ messages in thread
From: Jean-Jacques Hiblot @ 2017-11-27  8:47 UTC (permalink / raw)
  To: u-boot



On 24/11/2017 23:36, Simon Glass wrote:
> Hi Jean-Jacques,
>
> On 21 November 2017 at 08:13, Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
>> Make sure that those basic capabilities are advertised by the host.
>>
>> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
>> ---
>>   drivers/mmc/mmc.c | 15 ++++++++++-----
>>   1 file changed, 10 insertions(+), 5 deletions(-)
>>
> Your patch seems to suggest that the hardware is advertising the wrong
> thing. Is that right?
Yes and no....
1-bit, MMC legacy and SD legacy are capabilities that I introduced for 
consistency. IMO It makes the code easier. But they are not optional 
capabilities, all host can handle them.
Instead of converting all existing driver to explicitly advertise them, 
it's easier ans safer to just add those basic capabilities in the core.
JJ

>
> Regards,
> Simon
>

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support
  2017-11-23 14:52       ` Jean-Jacques Hiblot
  2017-11-23 14:55         ` Marek Vasut
@ 2017-11-27  9:45         ` Jaehoon Chung
  1 sibling, 0 replies; 23+ messages in thread
From: Jaehoon Chung @ 2017-11-27  9:45 UTC (permalink / raw)
  To: u-boot

Hi JJ,

On 11/23/2017 11:52 PM, Jean-Jacques Hiblot wrote:
> 
> 
> On 22/11/2017 15:00, Marek Vasut wrote:
>> On 11/22/2017 01:09 PM, Jaehoon Chung wrote:
>>> On 11/22/2017 12:13 AM, Jean-Jacques Hiblot wrote:
>>>> This series applies on top of "[PATCH v2 00/26] mmc: Add support for HS200
>>>> and UHS modes"
>>>>
>>>> It fixes a bug with old SD and MMC cards that support only the legacy mode.
>>>> It also addresses the comments made on the mailing list:
>>>> * dump card and host capabilities in debug mode
>>>> * use 1-bit if the DTS property 'bus-width' is not present.
>>>> * recognize the "mmc-ddr-1_2v" and "mmc-hs200-1_2v" DTS properties
>>>>
>>>> Tested on DRA7, DRA72 and AM335x
>>> Thanks for sending patches. After testing with my boards, will update.
>>> For your patches, i made the testing-uhs-supporting branch on u-boot-mmc.
>>>
>>> At least, i will share the result about testing with my boards.
>> Any chance this UHS support will make it into this release finally ?
> I hope so too. Jaehoon, do you need some help with the testing? what would you need?

I will send the PR with previous your patches, there is a issue about "mmc rescan" and "mmc_init".
So i want to fix it after merging to u-boot/master.

And these patches will be applied after reviewing..Sorry for late.

One more...After this patches, it seems that displayed the some dump message.
Could you fix it? otherwise i will send the patch about it.

Best Regards,
Jaehoon Chung


>> It's been dragging on for like half a year already ...
>>
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-11-27  9:45 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20171121151316epcas1p2f87ac6bca7b8cbd31b9270775443241d@epcas1p2.samsung.com>
2017-11-21 15:13 ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jean-Jacques Hiblot
2017-11-21 15:13   ` [U-Boot] [PATCH 1/5] dm: mmc: updated mmc_of_parse() to not fail because of an invalid bus-width Jean-Jacques Hiblot
2017-11-22  9:07     ` Lukasz Majewski
2017-11-24 22:36     ` Simon Glass
2017-11-21 15:13   ` [U-Boot] [PATCH 2/5] mmc: dm: support "mmc-ddr-1_2v" and "mmc-hs200-1_2v" boolean properties Jean-Jacques Hiblot
2017-11-22  9:08     ` Lukasz Majewski
2017-11-24 22:36     ` Simon Glass
2017-11-21 15:13   ` [U-Boot] [PATCH 3/5] mmc: dump card and host capabilities if debug is enabled Jean-Jacques Hiblot
2017-11-22  9:08     ` Lukasz Majewski
2017-11-24 22:36     ` Simon Glass
2017-11-21 15:13   ` [U-Boot] [PATCH 4/5] mmc: Fixed a problem with old sd or mmc that do not support High speed Jean-Jacques Hiblot
2017-11-22  9:09     ` Lukasz Majewski
2017-11-24 22:36     ` Simon Glass
2017-11-21 15:13   ` [U-Boot] [PATCH 5/5] mmc: all hosts support 1-bit bus width and legacy timings Jean-Jacques Hiblot
2017-11-22  9:09     ` Lukasz Majewski
2017-11-24 22:36     ` Simon Glass
2017-11-27  8:47       ` Jean-Jacques Hiblot
2017-11-22 12:09   ` [U-Boot] [PATCH 0/5] mmc: fixes for HS200/UHS core support Jaehoon Chung
2017-11-22 14:00     ` Marek Vasut
2017-11-23 14:52       ` Jean-Jacques Hiblot
2017-11-23 14:55         ` Marek Vasut
2017-11-24  6:01           ` Jaehoon Chung
2017-11-27  9:45         ` Jaehoon Chung

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.