All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Yousong Zhou <yszhou4tech-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dev-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org
Subject: Re: Re: [RFC] mmc: core: Set clock before switching to highspeed mode.
Date: Wed, 9 Sep 2015 10:47:27 +0200	[thread overview]
Message-ID: <55EFF21F.1010908@redhat.com> (raw)
In-Reply-To: <CAECwjAjsi28gQ-iMZbEgFdoDoTcf0khnS0KRrzO1wnL1j0o0vQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi,

On 08-09-15 17:38, Yousong Zhou wrote:
> I just tried a method from allwinner's u-boot sources: retry the mode switch in
> case of an error [1].  It was accompanied with a comment quoted below:
>
> //retry for Toshiba emmc;for the first time Toshiba emmc change to HS
> //it will return response crc err,so retry
>
> Well, that 1GB card of mine is labeled as "pqi" made in Korea.  This workaround
> really worked and it succeeded on the second try, though I am not sure how
> anti-spec this can be (the spec says a power reset SHOULD be done in the case
> of crc error in the status data).
>
> The above change alone can make the card work.  I also noticed that allwinner's
> uboot will disable the clock first before setting it and re-enable it
> thereafter [2].  I can only guess that this is possibly some bugfix made
> by engineers of allwinner.  So I mimicked this approach and attached a patch
> here.

Thanks for this. So if I understand you correctly then just the:

"mmc: retry in the case of failing to switch to HS mode"

Patch is enough to make things work, right ?

That makes sense because the clock dance you are subscribing is something which
allwinner does in many places and it really is not necessary.

Can you do a similar patch for the kernel and test that too ?

And once you've a working kernel patch submit that to Ulf, with the mmc
list in the Cc?

If Ulf is willing to take this fix on the kernel side (I'm the sunxi-mmc maintainer
in the kernel, and the fix will get my ack), then I'm willing to take the u-boot
version of this fix.

Regards,

Hans

  parent reply	other threads:[~2015-09-09  8:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-05 10:19 [RFC] mmc: core: Set clock before switching to highspeed mode Yousong Zhou
     [not found] ` <1441448358-13129-1-git-send-email-yszhou4tech-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-05 14:07   ` Shawn Lin
2015-09-05 14:58     ` [linux-sunxi] " Hans de Goede
     [not found]       ` <55EB02FD.5040403-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-06  0:12         ` Shawn Lin
2015-09-06 12:09           ` [linux-sunxi] " Yousong Zhou
     [not found]             ` <CAECwjAhe3g0T2icEExE_tBbZ2D1z+BpVNCd0dGZVNU=7zH-LHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-06 14:14               ` Shawn Lin
     [not found]                 ` <55EC4A31.4060605-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-09-06 14:47                   ` Yousong Zhou
     [not found]                     ` <CAECwjAgLuskgyHv50GOVN8fGOmQz+jo9PLCAr-POpYH6AszWSg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-07  7:02                       ` Hans de Goede
2015-09-07 15:37                         ` [linux-sunxi] " Yousong Zhou
2015-09-08 15:38                         ` Yousong Zhou
     [not found]                           ` <CAECwjAjsi28gQ-iMZbEgFdoDoTcf0khnS0KRrzO1wnL1j0o0vQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-09  8:47                             ` Hans de Goede [this message]
2015-09-06 14:51                 ` Yousong Zhou
2015-09-07  0:16                   ` Shawn Lin

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=55EFF21F.1010908@redhat.com \
    --to=hdegoede-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=dev-3kdeTeqwOZ9EV1b7eY7vFQ@public.gmane.org \
    --cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=yszhou4tech-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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.