rpi: use board_early_init_r to init PCI/USB and detect boot device 05/252605/1
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 29 Jan 2021 12:03:03 +0000 (13:03 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 29 Jan 2021 14:30:19 +0000 (15:30 +0100)
commit94e447a9b05e9c2ed1d82285fefdca9127843145
tree9b9bc258e3e9b4053f60479b36658d2aa174c70c
parenteea53f3f978015a1fa17c741e170bf21b25e7371
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