On 9/20/22 11:00, Quentin Schulz wrote:
Hi Marek,

Hi,

On 9/19/22 21:45, Marek Vasut wrote:
The gpio_hog_probe_all() functionality can be perfectly well replaced by
DM_FLAG_PROBE_AFTER_BIND DM flag, which would trigger .probe() callback
of each GPIO hog driver instance after .bind() and thus configure the
hogged GPIO accordingly.

Signed-off-by: Marek Vasut <ma...@denx.de>

This patch breaks the U-Boot proper loading fallback mechanism on Puma RK3399.

https://lore.kernel.org/u-boot/20220915091432.789294-1-foss+ub...@0leil.net/ is 
the base I used, on top of commit d6a03711fd with your patch applied on top.

I need the GPIO hogs to be probed before the SPL starts looking for storage media for U-Boot proper because the GPIO hog is necessary on the HW level for the eMMC and SPI-NOR flash to be usable.

That _should_ still work.

Look at common/spl/spl.c board_init_r() calls spl_init() calls spl_common_init() -> dm_init_and_scan() . That should bind and probe the GPIO hogs for you . The old gpio_hog_probe_all() happened AFTER all this.

Can you use e.g. dm_dump_all() call in or around spl_board_init() to check whether the hogs got probed in SPL ?

Basically, we have a switch on the board disabling eMMC and SPI-NOR so that we can boot from SD card, but we want to be able to load U-Boot proper from eMMC/SPI-NOR. The GPIO hog overrides this HW switch. Use case is to recover from a corrupted SPL without touching U-Boot proper.

I don't quite get this -- isn't board_boot_order() or spl_boot_device() used for the purpose of selecting boot media , including fallback ?

[...]

Reply via email to