All of lore.kernel.org
 help / color / mirror / Atom feed
From: ZHIZHIKIN Andrey <andrey.zhizhikin@leica-geosystems.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] mmc: fsl_esdhc_imx: remove redundant cmd11 related code.
Date: Wed, 3 Mar 2021 10:59:55 +0000	[thread overview]
Message-ID: <AM6PR06MB4691817143A59D686ECF71D8A6989@AM6PR06MB4691.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <1614762347-12380-2-git-send-email-haibo.chen@nxp.com>



> -----Original Message-----
> From: haibo.chen at nxp.com <haibo.chen@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@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@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@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(&regs->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(&regs->vendorspec, ESDHC_VENDORSPEC_VSELECT);
> +               mdelay(5);

Why is this delay introduced here? It is not clear from the commit message whether and why it is required here.

If this is kept from the removed block - maybe it is better to move the corresponding comment here as well.

>                 if (esdhc_read32(&regs->vendorspec) & ESDHC_VENDORSPEC_VSELECT)
>                         return 0;
> 
> --
> 2.17.1

-- andrey

  parent reply	other threads:[~2021-03-03 10:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03  9:05 [PATCH 1/2] mmc: fsl_esdhc_imx: use VENDORSPEC_FRC_SDCLK_ON to control card clock output haibo.chen at nxp.com
2021-03-03  9:05 ` [PATCH 2/2] mmc: fsl_esdhc_imx: remove redundant cmd11 related code haibo.chen at nxp.com
2021-03-03 10:43   ` Adam Ford
2021-03-03 10:51   ` ZHIZHIKIN Andrey
2021-03-03 10:59   ` ZHIZHIKIN Andrey [this message]
2021-03-03 11:27     ` Bough Chen
2021-03-03 12:49       ` ZHIZHIKIN Andrey
2021-03-08  9:50         ` Bough Chen
2021-03-09  7:46           ` Bough Chen
2021-03-03 10:51 ` [PATCH 1/2] mmc: fsl_esdhc_imx: use VENDORSPEC_FRC_SDCLK_ON to control card clock output ZHIZHIKIN Andrey
2021-04-09 11:24 ` sbabic at denx.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR06MB4691817143A59D686ECF71D8A6989@AM6PR06MB4691.eurprd06.prod.outlook.com \
    --to=andrey.zhizhikin@leica-geosystems.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.