Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1558022

Re: eMMC boot problem: switch to bus width 8 ddr failed

From Dong Aisheng <dongas86@gmail.com>
Newsgroups linux.kernel
Subject Re: eMMC boot problem: switch to bus width 8 ddr failed
Date 2017-01-13 05:50 +0100
Message-ID <sZ1Yl-4Ob-9@gated-at.bofh.it> (permalink)
References (2 earlier) <sWF5U-3ZI-33@gated-at.bofh.it> <sYQTg-6jV-21@gated-at.bofh.it> <sYZDb-3oM-1@gated-at.bofh.it> <sZ0zg-46z-11@gated-at.bofh.it> <sZ1lE-4Bb-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Shawn,

On Fri, Jan 13, 2017 at 12:03 PM, Shawn Lin <shawn.lin@rock-chips.com> wrote:

[...]

>
>> 2) root cause, in __mmc_switch, the process is   send CMD6 --> set DDR52
>> timing --> polling for busy.
>> For the DDR52 timing setting, we call set_ios(), in the set_ios, we first
>> set DDR_EN to config sdhc in ddr mode,
>> and then config the sd clock again.   Here it is, after CMD6 complete, we
>> find data0 still low, which means card
>> busy. At this time, if we set DDR_EN, there is a risk. For i.MX usdhc,
>> DDR_EN setting becomes active only when
>> the DATA and CMD line are idle. So, at this time for HW, DDR_EN do not
>> active, but software think DDR_EN already
>> active, and set the clock again to 49.5MHz, but actually the HW out put
>> the clock as 198MHz. So there is clock glitch.
>> This is the root cause--set DDR_EN when card is still busy.
>>
>
> Make sense. But it makes me more worried about the problem.
> Does it impact other controllers if changing timing settings when
> it's in busy state? It seems very likely possible. So I'm afraid
> that we now just break hs_ddr mode for your platform but on the
> contrary your case exposes this potention risk here. Thought?
>

Yes, i got the same concern as i replied in my last email.
Not sure if any other controllers exposes the same issue
since the kernel having this issue is quite new.

Regards
Dong Aisheng

>> The following method can fix this issue
>> a) change the HW behavior, DDR_EN setting becomes active at once no matter
>> what the state of the DATA and
>> CMD line are.   This can fix this issue, but our IC guys do not prefer
>> this, this method still not safe enough.
>>
>> b) add 1ms delay before DDR_EN to wait bus idle.  But we still not know
>> whether the time 1ms is appropriate. Better
>> to poll for busy before set DDR_EN.
>>
>> c) set DDR52 timing after CMD6 and pull for busy. This is what Shawn's
>> patch do.
>>
>> Hi Aisheng,
>> Correct me if anything wrong.
>>
>> My suggestion is that,  in __mmc_switch(), move the mmc_set_timing() after
>> the function mmc_poll_for_busy().
>>
>>
>> Best Regards
>> Haibo Chen
>>
>>
>>
>>>> if that can be done. So I will give Haibo/Dong etc a couple of more
>>>> days to investigate, before applying Shawn Lin's fix for the core.
>>>> Hope that approach is okay with all of you?
>>>>
>>>> Kind regards
>>>> Uffe
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards
>>> Shawn Lin
>>
>>
>
>
> --
> Best Regards
> Shawn Lin
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

eMMC boot problem: switch to bus width 8 ddr failed Clemens Gruber <clemens.gruber@pqgruber.com> - 2017-01-06 01:50 +0100
  Re: eMMC boot problem: switch to bus width 8 ddr failed Shawn Lin <shawn.lin@rock-chips.com> - 2017-01-06 03:40 +0100
    Re: eMMC boot problem: switch to bus width 8 ddr failed Clemens Gruber <clemens.gruber@pqgruber.com> - 2017-01-06 17:00 +0100
      Re: eMMC boot problem: switch to bus width 8 ddr failed Shawn Lin <shawn.lin@rock-chips.com> - 2017-01-09 08:20 +0100
        RE: eMMC boot problem: switch to bus width 8 ddr failed Bough Chen <haibo.chen@nxp.com> - 2017-01-10 09:40 +0100
      Re: eMMC boot problem: switch to bus width 8 ddr failed Ulf Hansson <ulf.hansson@linaro.org> - 2017-01-12 18:00 +0100
        Re: eMMC boot problem: switch to bus width 8 ddr failed Shawn Lin <shawn.lin@rock-chips.com> - 2017-01-13 03:20 +0100
          RE: eMMC boot problem: switch to bus width 8 ddr failed Bough Chen <haibo.chen@nxp.com> - 2017-01-13 04:20 +0100
            Re: eMMC boot problem: switch to bus width 8 ddr failed Shawn Lin <shawn.lin@rock-chips.com> - 2017-01-13 05:10 +0100
              Re: eMMC boot problem: switch to bus width 8 ddr failed Dong Aisheng <dongas86@gmail.com> - 2017-01-13 05:50 +0100
            Re: eMMC boot problem: switch to bus width 8 ddr failed Dong Aisheng <dongas86@gmail.com> - 2017-01-13 05:50 +0100
              Re: eMMC boot problem: switch to bus width 8 ddr failed Ulf Hansson <ulf.hansson@linaro.org> - 2017-01-13 12:20 +0100
            Re: eMMC boot problem: switch to bus width 8 ddr failed Ulf Hansson <ulf.hansson@linaro.org> - 2017-01-13 12:30 +0100
              RE: eMMC boot problem: switch to bus width 8 ddr failed Bough Chen <haibo.chen@nxp.com> - 2017-01-16 04:20 +0100
  Re: eMMC boot problem: switch to bus width 8 ddr failed Shawn Lin <shawn.lin@rock-chips.com> - 2017-01-06 04:10 +0100
    Re: eMMC boot problem: switch to bus width 8 ddr failed Clemens Gruber <clemens.gruber@pqgruber.com> - 2017-01-06 17:10 +0100
      Re: eMMC boot problem: switch to bus width 8 ddr failed Shawn Lin <shawn.lin@rock-chips.com> - 2017-01-09 08:40 +0100
      Re: eMMC boot problem: switch to bus width 8 ddr failed Jagan Teki <jagan@openedev.com> - 2017-01-09 23:30 +0100
        Re: eMMC boot problem: switch to bus width 8 ddr failed Shawn Lin <shawn.lin@rock-chips.com> - 2017-01-10 02:10 +0100
        Re: eMMC boot problem: switch to bus width 8 ddr failed Dong Aisheng <dongas86@gmail.com> - 2017-01-10 16:30 +0100
  Re: eMMC boot problem: switch to bus width 8 ddr failed Dong Aisheng <dongas86@gmail.com> - 2017-01-10 16:30 +0100

csiph-web