From: Shawn Lin <shawn.lin@rock-chips.com>
To: Yousong Zhou <yszhou4tech@gmail.com>
Cc: shawn.lin@rock-chips.com, Hans de Goede <hdegoede@redhat.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-mmc@vger.kernel.org, dev@linux-sunxi.org
Subject: Re: [linux-sunxi] Re: [RFC] mmc: core: Set clock before switching to highspeed mode.
Date: Mon, 7 Sep 2015 08:16:24 +0800 [thread overview]
Message-ID: <55ECD758.90900@rock-chips.com> (raw)
In-Reply-To: <CAECwjAg2pgN0UOaa8Gv=4622uTcKtwbAs+UE6X9=DXX6SBEgMA@mail.gmail.com>
On 2015/9/6 22:51, Yousong Zhou wrote:
>>>> all of this is under control of the mmc core.
>>>> So if Yongsong does want this card to work for any linux-based mmc stack,
>>>> I
>>>> guess something like that should be "better"?
>>>>
>>>> if (switch to HS fail) {
>>>> set_bus_clk
>>>> goto retry switch to HS
>>>> }
>>>>
>>>> BUT...I admit it seems strange as well.
>>>>
>>>
>>> The SD Specification (simplified version) says "If CRC error occurs on
>>> the status data, the host should issue a power cycle.", so I guess the
>>> above approach is anti-spec in some way :)
>>>
>>
>> Right,I was guessing that way from your intention.
>>
>>> In case it may help debug this problem, I'd like to add that the card
>>> previously worked fine with U-Boot before commit [1]. This can also
>>> be confirmed by Debian Jessie installer image with which the old
>>> U-Boot there worked fine while the kernel (3.16) did not.
>>>
>>> [1] sunxi: mmc: Properly setup mod-clk and clock sampling phases,
>>>
>>> http://git.denx.de/?p=u-boot.git;a=commit;h=fc3a832576ce7bb597b1823935bfb7dcca235c3c
>>>
>>
>> Interesting... but that at least prove your patch is a workaround but not
>> find the root cause.
>>
>> Anyway, look into commit-sha [1], can you have a test by restoring mod-clk
>> and clock sampling phases before jump to kernel.
>>
>
> Maybe my statement about U-Boot commit [1] above was a little
> ambiguous, sorry. I meant to say that with that commit applied,
> U-Boot failed initialising the card the same way as the kernel, i.e.
> response crc error.
>
> The Debian Jessie installer image's U-Boot worked fine and booted the
> kernel because it was before commit [1] happened. However after that
> the 3.16 kernel failed initialising the card.
>
So I undertand your point: Uboot w/o commit[1] + 3.16 kernel failed
that way just as Uboot w/ commit[1] + pre-3.16 kernel, right?
If that is it, could you check sunxi-platform's patches merged into
v3.16 for sure whether there is any patch do the same things just like
what commit[1] did for uboot or not?
> So, with commit [1], U-Boot failed right away without any chance at
> all jumping to kernel.
>
> OpenWrt ticket 20387 has more info about the U-Boot failure.
>
> https://dev.openwrt.org/ticket/20387
>
> Anyway, I have no idea what's the effect of those magic numbers on
> "sampling phases". Never played with such things before :)
>
> yousong
>
>> I happended to fix some problems which seems *similar* to yours(but I'm not
>> sure just from commit[1]'s msg):
>>
>> https://patchwork.kernel.org/patch/7119661/
>
>
>
--
Best Regards
Shawn Lin
prev parent reply other threads:[~2015-09-07 0:16 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
2015-09-06 14:51 ` [linux-sunxi] " Yousong Zhou
2015-09-07 0:16 ` Shawn Lin [this message]
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=55ECD758.90900@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=dev@linux-sunxi.org \
--cc=hdegoede@redhat.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=yszhou4tech@gmail.com \
/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.