Hi Peng,

On 10/07/2019 07:51, Peng Fan wrote:
Hi Jean,

-----Original Message-----
From: Jean-Jacques Hiblot [mailto:[email protected]]
Sent: 2019年7月2日 16:54
To: [email protected]
Cc: Jean-Jacques Hiblot <[email protected]>; Jon Nettleton
<[email protected]>; Peng Fan <[email protected]>; Marek Vasut
<[email protected]>; [email protected]; Baruch Siach
<[email protected]>; Jens Wiklander <[email protected]>; Rajesh
Bhagat <[email protected]>
Subject: [PATCH v2 07/11] mmc: use the generic timeout for cmd6 (SWITCH)
provided in the ext_csd

Starting with rev 4.5, the eMMC can define a generic timeout for the SWITCH
command.

Signed-off-by: Jean-Jacques Hiblot <[email protected]>
---

Changes in v2: None

  drivers/mmc/mmc.c | 10 +++++++++-
  include/mmc.h     |  2 ++
  2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index
a61e311cca..ff56c3dd67 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -21,6 +21,8 @@
  #include <div64.h>
  #include "mmc_private.h"

+#define DEFAULT_CMD6_TIMEOUT_MS  500
+
  static int mmc_set_signal_voltage(struct mmc *mmc, uint signal_voltage);
static int mmc_power_cycle(struct mmc *mmc);
#if !CONFIG_IS_ENABLED(MMC_TINY) @@ -745,10 +747,13 @@ static int
__mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value,
                        bool send_status)
  {
        struct mmc_cmd cmd;
-       int timeout = 1000;
+       int timeout = DEFAULT_CMD6_TIMEOUT_MS;
Is this expected to change 1000->500?

Yes. The 500ms timeout value directly comes from the linux driver.


Regards,
Peng.

        int retries = 3;
        int ret;

_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to