[PATCH 2/2] mmc: fsl_esdhc_imx: remove redundant cmd11 related code.
ZHIZHIKIN Andrey
andrey.zhizhikin at leica-geosystems.com
Wed Mar 3 11:51:14 CET 2021
Hello Haibo,
> -----Original Message-----
> From: haibo.chen at nxp.com <haibo.chen at nxp.com>
> Sent: Wednesday, March 3, 2021 10:06 AM
> To: peng.fan at nxp.com; u-boot at lists.denx.de; sbabic at denx.de
> Cc: haibo.chen at nxp.com; uboot-imx at nxp.com; tharvey at gateworks.com;
> ZHIZHIKIN Andrey <andrey.zhizhikin at leica-geosystems.com>;
> festevam at gmail.com; ye.li at nxp.com
> Subject: [PATCH 2/2] mmc: fsl_esdhc_imx: remove redundant cmd11 related
> code.
>
> From: Haibo Chen <haibo.chen at nxp.com>
>
> Common code already handle the voltage switch sequence based on spec, so
> remove the redundant voltage switch code.
>
> Signed-off-by: Haibo Chen <haibo.chen at nxp.com>
> ---
> drivers/mmc/fsl_esdhc_imx.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c index
> af36558b3c..a199cf3df6 100644
> --- a/drivers/mmc/fsl_esdhc_imx.c
> +++ b/drivers/mmc/fsl_esdhc_imx.c
> @@ -515,15 +515,6 @@ static int esdhc_send_cmd_common(struct
> fsl_esdhc_priv *priv, struct mmc *mmc,
> goto out;
> }
>
> - /* Switch voltage to 1.8V if CMD11 succeeded */
> - if (cmd->cmdidx == SD_CMD_SWITCH_UHS18V) {
> - esdhc_setbits32(®s->vendorspec, ESDHC_VENDORSPEC_VSELECT);
> -
> - printf("Run CMD11 1.8V switch\n");
> - /* Sleep for 5 ms - max time for card to switch to 1.8V */
> - udelay(5000);
> - }
> -
> /* Workaround for ESDHC errata ENGcm03648 */
> if (!data && (cmd->resp_type & MMC_RSP_BUSY)) {
> int timeout = 50000;
> @@ -839,6 +830,7 @@ static int esdhc_set_voltage(struct mmc *mmc)
> }
> #endif
> esdhc_setbits32(®s->vendorspec, ESDHC_VENDORSPEC_VSELECT);
> + mdelay(5);
> if (esdhc_read32(®s->vendorspec) & ESDHC_VENDORSPEC_VSELECT)
> return 0;
>
> --
> 2.17.1
Just tested the whole series on i.MX8M Mini EVK, boot log with MMC info:
---------------
U-Boot SPL 2021.04-rc3-00009-g1333570cee (Mar 03 2021 - 11:34:24 +0100)
Normal Boot
WDT: Started with servicing (60s timeout)
Trying to boot from MMC1
NOTICE: BL31: v2.2(release):rel_imx_5.4.70_2.3.0-0-gf1d7187f2
NOTICE: BL31: Built : 22:29:05, Jan 17 2021
U-Boot 2021.04-rc3-00009-g1333570cee (Mar 03 2021 - 11:34:24 +0100)
CPU: Freescale i.MX8MMQ rev1.0 at 1200 MHz
Reset cause: POR
Model: FSL i.MX8MM EVK board
DRAM: 2 GiB
WDT: Started with servicing (60s timeout)
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... *** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: eth0: ethernet at 30be0000
Hit any key to stop autoboot: 0
u-boot=> mmc dev 1
switch to partitions #0, OK
mmc1 is current device
u-boot=> mmc info
Device: FSL_SDHC
Manufacturer ID: 41
OEM: 3432
Name: SD32G
Bus Speed: 200000000
Mode: UHS SDR104 (208MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.3 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
u-boot=> mmc dev 2
switch to partitions #0, OK
mmc2(part 0) is current device
u-boot=> mmc info
Device: FSL_SDHC
Manufacturer ID: 45
OEM: 100
Name: DG401
Bus Speed: 200000000
Mode: HS400ES (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.7 GiB
Bus Width: 8-bit DDR
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 14.7 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
u-boot=>
------------
For the series:
Tested-by: Andrey Zhizhikin <andrey.zhizhikin at leica-geosystems.com> # imx8mm_evk
-- andrey
More information about the U-Boot
mailing list