On 03/09/2018 07:51 AM, Patrick Brünn wrote:
From: Patrick Brünn
Sent: Donnerstag, 8. März 2018 06:39
From: Jaehoon Chung [mailto:jh80.ch...@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-...@beckhoff.com wrote:
From: Patrick Bruenn <p.bru...@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.bru...@beckhoff.com>
Reviewed-by: Jaehoon Chung <jh80.ch...@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().
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.
Yes, that's the only supported configuration -- U-Boot SPL and U-Boot.
Any such mix-and-match setups are NOT supported.
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.
We're too close to the release and it's not broken in mainline, it's
only broken if you use this horrible shitty MPL configuration, which is
not supported.
So we should revisit this patch after release, after it can be tested
properly and checked if it doesn't break standard setups.
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.
Sounds good
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot