[U-Boot] [PATCH] dm: mmc: socfpga: call dwmci_probe()
Jaehoon Chung
jh80.chung at samsung.com
Tue Mar 13 05:01:12 UTC 2018
On 03/10/2018 03:13 AM, Marek Vasut wrote:
> On 03/09/2018 09:24 AM, Jaehoon Chung wrote:
>> Dear Patrick,
>>
>> On 03/09/2018 03:51 PM, Patrick Brünn wrote:
>>>> From: Patrick Brünn
>>>> Sent: Donnerstag, 8. März 2018 06:39
>>>>> From: Jaehoon Chung [mailto:jh80.chung at samsung.com]
>>>>> Sent: Donnerstag, 8. März 2018 04:57
>>>>> On 03/08/2018 12:12 PM, Marek Vasut wrote:
>>>>>> On 03/08/2018 03:17 AM, Jaehoon Chung wrote:
>>>>>>> On 03/06/2018 05:07 PM, linux-kernel-dev at beckhoff.com wrote:
>>>>>>>> From: Patrick Bruenn <p.bruenn at beckhoff.com>
>>>>>>>>
>>>>>>>> On a socfpga_cyclone5 based board the SD card, was never powered
>>>> up.
>>>>> For
>>>>>>>> other dw_mmc based SoCs dwmci_probe() is called in the platform
>>>>> specific
>>>>>>>> probe(). It seems this call is missing for socfpga_dw_mmc.
>>>>>>>>
>>>>>>>> With this change DWMCI_PWREN is set by dmwci_init().
>>>>>>>>
>>>>>>>> Signed-off-by: Patrick Bruenn <p.bruenn at beckhoff.com>
>>>>>>>
>>>>>>> Reviewed-by: Jaehoon Chung <jh80.chung at samsung.com>
>>>>>>>
>>>>>>> Will apply this patch before releasing v2018.03.
>>>>>>> (I have a problem about accessing git.denx.de. After fixing my problem,
>>>>> will resend email about applying.)
>>>>>>
>>>>>> DWMMC works on SoCFPGA for me (tested on rc4), so I don't understand
>>>>> what this patch is trying to fix. I'd prefer if you did not hastily apply this.
>>>>>
>>>>> It's my misunderstanding. When i checked more. I think that Marek is right.
>>>>> Thanks Marek for pointing out.
>>>>>
>>>> Okay, but do you have any hint what I am doing wrong? My board (cx8100 not
>>>> mainline, yet) is based on socfpga_cyclone5. And on my board "
>>>> dwmci_writel(host, DWMCI_PWREN, 1);" is never called, because
>>>> dwmci_init() is never called.
>>>> As far as I can see with CONFIG_DM_MMC enabled dwmci_init() should be
>>>> called by dwmci_probe().
>>>>
>>>> exynos and rockchip do call dwmci_probe() within
>>>> exynos/rockchip_dwmmc_probe().
>>>> but socfpga_dwmmc_probe() is missing this call. So I looked deeper but found
>>>> no place for socfpga platform to call dwmci_probe() or dwmci_init().
>>>> What am I missing?
>>>>
>>> I got an idea, what might be the difference between my board and your boards.
>>> I suspect you use U-BOOT SPL without CONFIG_DM_MMC set, so
>>> dwmci_init() is called indirectly by mmc_start_init().
>>
>> Right, it's difference with CONFIG_DM_MMC. I had checked this.
>>
>>> Now, when your main U-Boot (with CONFIG_DM_MMC) is launched,
>>> everything is already configured and it isn't necessary to call dwmci_init() again.
>>> On my board the Altera MPL is used (and I can't replace it). Which seems to
>>> disable DWMCI_PWREN before launching U-Boot.
>>> If my assumption is correct, I still think it is a U-Boot bug to assume code like in
>>> dwmci_init() was already run before U-Boot gets in control.
>>> Besides exynos/rockchip_dw_mmc don't have this precondition requirement.
>>>
>>> Please take your time to look deeper into this issue, before deciding anything.
>>> I don't think we need to rush this into the next release, as normal mainline
>>> boards are "accidently" not affected.
>>
>> Sure. I will check this patch. Before applying this, will check more carefully.
>> I agreed about Marek's opinion "did not hastily apply this."
>> And i think that your approach also is right.
>
> Please queue for -next , NOT this release.
Yes. I understood what you want. Thanks!
>
>
>
More information about the U-Boot
mailing list