rpi: use board_early_init_r to init PCI/USB and detect boot device
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 29 Jan 2021 12:03:03 +0000 (13:03 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 16 Nov 2021 12:00:22 +0000 (13:00 +0100)
commit0d4164d2e74eec1002c1cfac68ee658b81f451b3
tree227a1475b18cf3911141eebfffeffeccff1f9535
parent61688c0c93836ae73f6243f546df2b3d2f355f23
rpi: use board_early_init_r to init PCI/USB and detect boot device

Move initialization of the PCI and the USB subsystems from the 'preboot'
command to the board's early_init_r() function and then try to detect a
boot device by accessing the MMC0 device. If it works, then set boot
device interface to 'mmc', if not, use 'usb'.

This allows the environment variales to be loaded from the proper
storage interface.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Idf06ba827167479510206587308875c8eedce892
board/raspberrypi/rpi/rpi.c
configs/rpi_4_32b_defconfig
configs/rpi_4_defconfig