]> git.baikalelectronics.ru Git - arm-tf.git/commit
fix(rpi3): initialize SD card host controller
authorRob Newberry <robthedude@mac.com>
Thu, 30 Mar 2023 17:43:21 +0000 (10:43 -0700)
committerAndre Przywara <andre.przywara@arm.com>
Thu, 13 Apr 2023 09:29:51 +0000 (10:29 +0100)
commitbd96d533dc28c4c938aa54905787688823cbccac
tree3e9bf4b8ccd17b63bb36e7f67ead7f501c55cc19
parent2237e562fd4d68cf4051e51bbff33ebd9ad14ae2
fix(rpi3): initialize SD card host controller

Add initial configuration parameters for Rasperry Pi 3's sdhost
controller, and then configure and use those parameters.

This change allows warm reboots of UEFI on Raspberry Pi 3B+ where
existing code often fails with "unknown error". See discussion at:

https://github.com/pftf/RPi3/issues/24

The basic idea is that some initial configuration parameters
(clock rate, bus width) aren't configured into the hardware before
commands start being sent. I suspect that the particular setting
that matters is the "slow card" bit, but the initial clock setting
also seemed wrong to me.

Change-Id: I526def340def143f23f3422f1fc14c12c937ca7f
Signed-off-by: Rob Newberry <robthedude@mac.com>
drivers/rpi3/sdhost/rpi3_sdhost.c
include/drivers/rpi3/sdhost/rpi3_sdhost.h
plat/rpi/rpi3/rpi3_bl2_setup.c