[U-Boot] [PATCH] dm: mmc: socfpga: call dwmci_probe()

Patrick Brünn P.Bruenn at beckhoff.com
Thu Mar 8 05:39:25 UTC 2018


>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?

Maybe this diff helps:
u-boot$ diff configs/socfpga_cx8100_defconfig configs/socfpga_cyclone5_defconfig
2d1
< CONFIG_API=y
6c5
< CONFIG_TARGET_SOCFPGA_CX8100=y
---
> CONFIG_TARGET_SOCFPGA_CYCLONE5_SOCDK=y
8c7,8
< CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_cx8100"
---
> CONFIG_DEFAULT_DEVICE_TREE="socfpga_cyclone5_socdk"
> CONFIG_DISTRO_DEFAULTS=y
9a10
> # CONFIG_USE_BOOTCOMMAND is not set
13c14
< CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_cx8100.dtb"
---
> CONFIG_DEFAULT_FDT_FILE="socfpga_cyclone5_socdk.dtb"
16d16
< CONFIG_BOARD_EARLY_INIT_F=y
20,21d19
< CONFIG_HUSH_PARSER=y
< CONFIG_CMD_BOOTZ=y
29d26
< CONFIG_CMD_PART=y
34,37d30
< CONFIG_CMD_DHCP=y
< CONFIG_CMD_PXE=y
< CONFIG_CMD_MII=y
< CONFIG_CMD_PING=y
39d31
< CONFIG_CMD_EXT4=y
41,42d32
< CONFIG_CMD_FAT=y
< CONFIG_CMD_FS_GENERIC=y
54,56d43
< CONFIG_CMD_LED=y
< CONFIG_LED=y
< CONFIG_LED_GPIO=y
60a48
> CONFIG_SPI_FLASH_MACRONIX=y

Thanks for your time and patience,
Patrick

Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075




More information about the U-Boot mailing list