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)
committerJaehoon Chung <jh80.chung@samsung.com>
Tue, 17 Oct 2023 04:19:30 +0000 (13:19 +0900)
commit2956b5b8a4f41007f43384eb6da408a140ab2b42
treeca0cc2f2100f2ce4cc65d2a26e242757f110c7a3
parent6f375374bfcbf93843405b71635dbc03f0367a5f
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