4 Commits

Author SHA1 Message Date
Andrei Warkentin
5290bbe34c Platform/RaspberryPi: fix MmcTransferBlock (writes) regression for eMMC
Way back when I added write block validation [0], I had screwed the
logic up, breaking eMMC.

This starts to matter on the CM3, which has eMMC.

[0] https://github.com/andreiw/RaspberryPiPkg/commit/bdea35dc3f1652bf

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
2020-04-30 11:33:23 +02:00
Andrei Warkentin
6c090ea079 Platform/RPi/MmcDxe: Improve MMC driver stability
For reasons that aren't entirely understood, SCR reads can randomly
fail on the Raspberry Pi 4. It can be on the first boot or during
subsequent reboots.

To alleviate this, and improve the overall behavior of the code,
we modify CheckCardsCallback () to retry InitializeMmcDevice ()
in case of failure.

Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-12-02 17:35:52 +00:00
Andrei Warkentin
e3ddb89114 Platform/RPi/MmcDxe: Factorize SCR call and clean up MMC init
This is mostly a maintainability improvement for the
InitializeSdMmcDevice () call achieved by factorizing the
code related to SCR execution into a new SdExecuteScr () call.

Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-12-02 17:34:45 +00:00
Pete Batard
03f36b8fcf Platforms/RPi3: Restructure platform in preparation for Pi 4
In preparation for adding Raspberry Pi 4 support, the Pi 3 platform
is restructured by factorizing all the drivers and libraries that are
going to be commonly used by the two platforms.

Because much of the Pi 4 SoC is an extension of the Pi 3 one this
means that almost everything, except the ACPI tables, is moved up
into a new common RaspberryPi/ subdirectory that will serve both
platforms. The .dec is also moved to this directory, under a new
RaspberryPi.dec name, and existing references to it are updated.

This commit requires the edk2-non-osi in use to contain commit 243e55f622ea
in order to build.

Signed-off-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2019-10-21 15:32:32 +01:00