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>
Wed, 12 Oct 2022 05:48:53 +0000 (14:48 +0900)
commit38b68596a099135a3e7b73499247b21d21bb1c3e
treed4af9fc6b6cd947a6e6b12b045ee9cc249ca3709
parent00bda4e839b85ad24300f9d93c220863686c22f2
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