All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] mmc: fsl_esdhc: Do not set high speed mode on MX25 and MX51
Date: Tue, 24 Oct 2017 06:50:31 -0200	[thread overview]
Message-ID: <CAOMZO5Br4tQ80BK4vPAGZtFKwczJj+ue7Wa4sSyFAby8QPQG2A@mail.gmail.com> (raw)
In-Reply-To: <CA+sos789DNUyak2UsUwTWMxreZyasimORm3OpLaOdHjU6+DLnA@mail.gmail.com>

Hi Benoît,

On Mon, Oct 23, 2017 at 8:45 PM, Benoît Thébaudeau
<benoit.thebaudeau.dev@gmail.com> wrote:

> The issue is the timeout in esdhc_setup_data() on line 309. If I
> revert e978a31b and fb823981, then everything works fine. However, the
> latest calculation is correct, so reverting these commits is not the
> fix. Indeed, for HS transfers:
> mmc->tran_speed = 50000000, fls(mmc->tran_speed/4) = 24
> mmc->clock = 48000000, fls(mmc->clock/2) = 25
> I've tested with 26 and 27, and they work fine. Therefore,
> SYSCTL.DTOCV is broken for 25 - 13 = 12 here, so the i.MX25 has an
> undocumented erratum, which could just happen to be
> CONFIG_SYS_FSL_ERRATUM_ESDHC_A001. If it's not exactly this erratum,
> then a new workaround could be implemented for it, or
> ESDHCI_QUIRK_BROKEN_TIMEOUT_VALUE could be used instead. Can you ask
> your design team to confirm this?

I can try to ask it internally when I am back to the office next week.

> Shouldn't CONFIG_SYS_FSL_ERRATUM_ESDHC_A001 be changed into a quirk to
> be defined in a SoC header file (such as
> arch/arm/include/asm/arch-mx25/imx-regs.h) or in
> drivers/mmc/fsl_esdhc.c if an affected SoC or IP version is detected
> from the configuration, rather than keeping it as a configuration
> setting to be defined in a board configuration file (such as
> include/configs/mx25pdk.h)?
>
> Note that it would be possible to go further than fb823981 to optimize
> this timeout because mmc->clock is also not always the actual SD clock
> frequency resulting from set_sysctl(). However, timeout cases should
> normally never occur, so optimizing them is a bit pointless.
>
> Note that mainline Linux always uses the maximum timeout regardless of
> the SD clock frequency.

Can we also do like this in U-Boot for now?

Thanks

  reply	other threads:[~2017-10-24  8:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-18 15:57 [U-Boot] [RFC] mmc: fsl_esdhc: Do not set high speed mode on MX25 and MX51 Fabio Estevam
2017-10-18 16:04 ` Otavio Salvador
2017-10-18 16:13 ` Benoît Thébaudeau
2017-10-18 16:20   ` Benoît Thébaudeau
2017-10-18 16:40   ` Fabio Estevam
2017-10-18 16:56     ` Benoît Thébaudeau
2017-10-18 17:35       ` Fabio Estevam
2017-10-18 20:10         ` Benoît Thébaudeau
2017-10-18 20:14           ` Fabio Estevam
2017-10-19 11:57           ` Fabio Estevam
2017-10-19 12:42             ` Fabio Estevam
2017-10-19 12:46               ` Otavio Salvador
2017-10-19 12:52                 ` Fabio Estevam
2017-10-19 12:54                   ` Benoît Thébaudeau
2017-10-20 12:40             ` Benoît Thébaudeau
2017-10-20 18:40               ` Fabio Estevam
2017-10-21 12:34                 ` Benoît Thébaudeau
2017-10-21 12:38                   ` Fabio Estevam
2017-10-23 22:45                     ` Benoît Thébaudeau
2017-10-24  8:50                       ` Fabio Estevam [this message]
2017-10-29 21:18                         ` Benoît Thébaudeau
2017-10-30  2:10                           ` Fabio Estevam
2017-11-03 15:17                           ` Fabio Estevam
2017-11-03 21:25                             ` Benoît Thébaudeau
2017-11-04 11:59                               ` Fabio Estevam

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=CAOMZO5Br4tQ80BK4vPAGZtFKwczJj+ue7Wa4sSyFAby8QPQG2A@mail.gmail.com \
    --to=festevam@gmail.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.