All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: core: MMC_CAP2_HS200_1_8V_SDR with mmc-hs400-1_8v
@ 2020-11-27  4:40 Chris Ruehl
  2020-11-29 12:28 ` Avri Altman
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Ruehl @ 2020-11-27  4:40 UTC (permalink / raw)
  Cc: Chris Ruehl, Ulf Hansson, Michał Mirosław,
	Gustavo A. R. Silva, Yoshihiro Shimoda, Veerabhadrarao Badiganti,
	Matthias Schiffer, Chris Ball, Seungwon Jeon, linux-mmc,
	linux-kernel

This patch remove the MMC_CAP2_HS200_1_8V_SDR capacity from
host->cap2 when the dt property mmc-hs400-1v8 set. It cause
error and occasionally hang on boot and reboot.
Board with this issue: rk3399 with SanDisk DG4008 eMMC.

This patch did not change the mmc-hs400-1_2v host->cap2
added the MMC_CAP2_HS200_1_2V_SDR.

Log shows a boot process with a HS400 5.1 capable SanDisk 8G
with mmc-hs400-1_8v dt property and the MMC_CAP2_HS200_1_8V_SDR
append to the host->cap2.

[    1.775721] mmc1: CQHCI version 5.10
[    1.802342] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci] using ADMA
[    2.007581] mmc1: mmc_select_hs200 failed, error -110
[    2.007589] mmc1: error -110 whilst initialising MMC card
[    2.413559] mmc1: mmc_select_hs200 failed, error -110
[    2.413562] mmc1: error -110 whilst initialising MMC card
[    3.183343] mmc1: Command Queue Engine enabled
[    3.183355] mmc1: new HS400 MMC card at address 0001
[    3.197163] mmcblk1: mmc1:0001 DG4008 7.28 GiB
[    3.197256] mmcblk1boot0: mmc1:0001 DG4008 partition 1 4.00 MiB
[    3.197360] mmcblk1boot1: mmc1:0001 DG4008 partition 2 4.00 MiB
[    3.197479] mmcblk1rpmb: mmc1:0001 DG4008 partition 3 4.00 MiB, chardev (242:0)

after patch applied
[    1.746691] mmc1: CQHCI version 5.10
[    1.773316] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci] using ADMA
[    1.858410] mmc1: Command Queue Engine enabled
[    1.858418] mmc1: new HS400 MMC card at address 0001
[    1.858897] mmcblk1: mmc1:0001 DG4008 7.28 GiB
[    1.859002] mmcblk1boot0: mmc1:0001 DG4008 partition 1 4.00 MiB
[    1.859097] mmcblk1boot1: mmc1:0001 DG4008 partition 2 4.00 MiB
[    1.859182] mmcblk1rpmb: mmc1:0001 DG4008 partition 3 4.00 MiB, chardev (242:0)

Fixes: c373eb489b27b mmc: core: add DT bindings for eMMC HS400 1.8/1.2V

Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
---
 drivers/mmc/core/host.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 96b2ca1f1b06..f55113e24c68 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -295,7 +295,7 @@ int mmc_of_parse(struct mmc_host *host)
 	if (device_property_read_bool(dev, "mmc-hs200-1_2v"))
 		host->caps2 |= MMC_CAP2_HS200_1_2V_SDR;
 	if (device_property_read_bool(dev, "mmc-hs400-1_8v"))
-		host->caps2 |= MMC_CAP2_HS400_1_8V | MMC_CAP2_HS200_1_8V_SDR;
+		host->caps2 |= MMC_CAP2_HS400_1_8V;
 	if (device_property_read_bool(dev, "mmc-hs400-1_2v"))
 		host->caps2 |= MMC_CAP2_HS400_1_2V | MMC_CAP2_HS200_1_2V_SDR;
 	if (device_property_read_bool(dev, "mmc-hs400-enhanced-strobe"))
--
2.20.1


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

* RE: [PATCH] mmc: core: MMC_CAP2_HS200_1_8V_SDR with mmc-hs400-1_8v
  2020-11-27  4:40 [PATCH] mmc: core: MMC_CAP2_HS200_1_8V_SDR with mmc-hs400-1_8v Chris Ruehl
@ 2020-11-29 12:28 ` Avri Altman
  2020-12-01  8:59   ` Chris Ruehl
  0 siblings, 1 reply; 3+ messages in thread
From: Avri Altman @ 2020-11-29 12:28 UTC (permalink / raw)
  To: Chris Ruehl
  Cc: Ulf Hansson, Michał Mirosław, Gustavo A. R. Silva,
	Yoshihiro Shimoda, Veerabhadrarao Badiganti, Matthias Schiffer,
	Chris Ball, Seungwon Jeon, linux-mmc, linux-kernel

 
> This patch remove the MMC_CAP2_HS200_1_8V_SDR capacity from
> host->cap2 when the dt property mmc-hs400-1v8 set. It cause
> error and occasionally hang on boot and reboot.
> Board with this issue: rk3399 with SanDisk DG4008 eMMC.
> 
> This patch did not change the mmc-hs400-1_2v host->cap2
> added the MMC_CAP2_HS200_1_2V_SDR.
> 
> Log shows a boot process with a HS400 5.1 capable SanDisk 8G
> with mmc-hs400-1_8v dt property and the MMC_CAP2_HS200_1_8V_SDR
> append to the host->cap2.
> 
> [    1.775721] mmc1: CQHCI version 5.10
> [    1.802342] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci]
> using ADMA
> [    2.007581] mmc1: mmc_select_hs200 failed, error -110
> [    2.007589] mmc1: error -110 whilst initialising MMC card
> [    2.413559] mmc1: mmc_select_hs200 failed, error -110
> [    2.413562] mmc1: error -110 whilst initialising MMC card
> [    3.183343] mmc1: Command Queue Engine enabled
> [    3.183355] mmc1: new HS400 MMC card at address 0001
> [    3.197163] mmcblk1: mmc1:0001 DG4008 7.28 GiB
> [    3.197256] mmcblk1boot0: mmc1:0001 DG4008 partition 1 4.00 MiB
> [    3.197360] mmcblk1boot1: mmc1:0001 DG4008 partition 2 4.00 MiB
> [    3.197479] mmcblk1rpmb: mmc1:0001 DG4008 partition 3 4.00 MiB, chardev
> (242:0)
> 
> after patch applied
> [    1.746691] mmc1: CQHCI version 5.10
> [    1.773316] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci]
> using ADMA
> [    1.858410] mmc1: Command Queue Engine enabled
> [    1.858418] mmc1: new HS400 MMC card at address 0001
> [    1.858897] mmcblk1: mmc1:0001 DG4008 7.28 GiB
> [    1.859002] mmcblk1boot0: mmc1:0001 DG4008 partition 1 4.00 MiB
> [    1.859097] mmcblk1boot1: mmc1:0001 DG4008 partition 2 4.00 MiB
> [    1.859182] mmcblk1rpmb: mmc1:0001 DG4008 partition 3 4.00 MiB, chardev
> (242:0)
> 
> Fixes: c373eb489b27b mmc: core: add DT bindings for eMMC HS400 1.8/1.2V
> 
> Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Acked-by: Avri Altman <avri.altman@wdc.com>

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

* Re: [PATCH] mmc: core: MMC_CAP2_HS200_1_8V_SDR with mmc-hs400-1_8v
  2020-11-29 12:28 ` Avri Altman
@ 2020-12-01  8:59   ` Chris Ruehl
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Ruehl @ 2020-12-01  8:59 UTC (permalink / raw)
  To: Avri Altman
  Cc: Ulf Hansson, Michał Mirosław, Gustavo A. R. Silva,
	Yoshihiro Shimoda, Veerabhadrarao Badiganti, Matthias Schiffer,
	Chris Ball, Seungwon Jeon, linux-mmc, linux-kernel

Hi,

I have to callback my patch,
The mmc.c logic needs the MMC_CAP2_HS200_1_8V_SDR in the current implementation.

If I want to precise use mmc-hs400-1_8v or mmc-hs200-1_8v have their
explicit code-path its needs a bigger effort.

On it.

@Avri Altman , I have to reject your ACK. :)

Chris


On 29/11/2020 8:28 pm, Avri Altman wrote:
>   
>> This patch remove the MMC_CAP2_HS200_1_8V_SDR capacity from
>> host->cap2 when the dt property mmc-hs400-1v8 set. It cause
>> error and occasionally hang on boot and reboot.
>> Board with this issue: rk3399 with SanDisk DG4008 eMMC.
>>
>> This patch did not change the mmc-hs400-1_2v host->cap2
>> added the MMC_CAP2_HS200_1_2V_SDR.
>>
>> Log shows a boot process with a HS400 5.1 capable SanDisk 8G
>> with mmc-hs400-1_8v dt property and the MMC_CAP2_HS200_1_8V_SDR
>> append to the host->cap2.
>>
>> [    1.775721] mmc1: CQHCI version 5.10
>> [    1.802342] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci]
>> using ADMA
>> [    2.007581] mmc1: mmc_select_hs200 failed, error -110
>> [    2.007589] mmc1: error -110 whilst initialising MMC card
>> [    2.413559] mmc1: mmc_select_hs200 failed, error -110
>> [    2.413562] mmc1: error -110 whilst initialising MMC card
>> [    3.183343] mmc1: Command Queue Engine enabled
>> [    3.183355] mmc1: new HS400 MMC card at address 0001
>> [    3.197163] mmcblk1: mmc1:0001 DG4008 7.28 GiB
>> [    3.197256] mmcblk1boot0: mmc1:0001 DG4008 partition 1 4.00 MiB
>> [    3.197360] mmcblk1boot1: mmc1:0001 DG4008 partition 2 4.00 MiB
>> [    3.197479] mmcblk1rpmb: mmc1:0001 DG4008 partition 3 4.00 MiB, chardev
>> (242:0)
>>
>> after patch applied
>> [    1.746691] mmc1: CQHCI version 5.10
>> [    1.773316] mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci]
>> using ADMA
>> [    1.858410] mmc1: Command Queue Engine enabled
>> [    1.858418] mmc1: new HS400 MMC card at address 0001
>> [    1.858897] mmcblk1: mmc1:0001 DG4008 7.28 GiB
>> [    1.859002] mmcblk1boot0: mmc1:0001 DG4008 partition 1 4.00 MiB
>> [    1.859097] mmcblk1boot1: mmc1:0001 DG4008 partition 2 4.00 MiB
>> [    1.859182] mmcblk1rpmb: mmc1:0001 DG4008 partition 3 4.00 MiB, chardev
>> (242:0)
>>
>> Fixes: c373eb489b27b mmc: core: add DT bindings for eMMC HS400 1.8/1.2V
>>
>> Signed-off-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
> Acked-by: Avri Altman <avri.altman@wdc.com>
> 

-- 
GTSYS Limited RFID Technology
9/F, Unit E, R07, Kwai Shing Industrial Building Phase 2,
42-46 Tai Lin Pai Road, Kwai Chung, N.T., Hong Kong
Tel (852) 9079 9521

Disclaimer: https://www.gtsys.com.hk/email/classified.html

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

end of thread, other threads:[~2020-12-01  9:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27  4:40 [PATCH] mmc: core: MMC_CAP2_HS200_1_8V_SDR with mmc-hs400-1_8v Chris Ruehl
2020-11-29 12:28 ` Avri Altman
2020-12-01  8:59   ` Chris Ruehl

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.