Skip to contentSkip to conversation

spl: dw_mmc_socfpga: udevice structure is NULL in SPL

RFC Dinh Nguyen 2 participants 3 messages Apr 26, 2018

lore
Share & tools
lore
#0 lore raw

Hi,

I am trying to add support for the sdmmc driver to use the reset manager driver in SPL. But I'm noticing that the udevice struct dev that passed into socfpga_dwmmc_probe() is NULL, thus, I can't use the reset_get_by_() functions to get the reset information because it needs the dev structure is NULL.

Not sure if I'm missing a config option or something?

Thanks,
Dinh

#1 lore raw
Quoted 8 lines · Dinh Nguyen

Hi,

I am trying to add support for the sdmmc driver to use the reset manager driver in SPL. But I'm noticing that the udevice struct dev that passed into socfpga_dwmmc_probe() is NULL, thus, I can't use the reset_get_by_() functions to get the reset information because it needs the dev structure is NULL.

Quoted 4 lines

Not sure if I'm missing a config option or something?

Thanks,
Dinh

I think you need add " u-boot,dm-pre-reloc;" into reset manager and DW MMC device tree nodes.

Regards
Ley Foon

#2 lore raw
Quoted 9 lines · Ley Foon Tan
Quoted 8 lines · Dinh Nguyen

Hi,

I am trying to add support for the sdmmc driver to use the reset manager driver in SPL. But I'm noticing that the udevice struct dev that passed into socfpga_dwmmc_probe() is NULL, thus, I can't use the reset_get_by_() functions to get the reset information because it needs the dev structure is NULL.

Quoted 9 lines
Quoted 4 lines

Not sure if I'm missing a config option or something?

Thanks,
Dinh

I think you need add " u-boot,dm-pre-reloc;" into reset manager and DW MMC device tree nodes.

Ah yes, thanks! That solved the problem.

Dinh