Skip to content

Commit

Permalink
DwcSdhciDxe: Disable ADMA2 to avoid data corruption
Browse files Browse the repository at this point in the history
This controller has the limitation that a single ADMA2 descriptor cannot
cross 128 MB boundaries and must be split.
This would require a patch in SdMmcPciHcDxe, but SDMA works fine for the
time being.

Signed-off-by: Mario Bălănică <[email protected]>
  • Loading branch information
mariobalanica committed Jun 22, 2024
1 parent 053cf71 commit 02d1502
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ EmmcSdMmcCapability (
return EFI_NOT_FOUND;
}

//
// Disable ADMA2 to avoid data corruption.
// This controller has the limitation that a single descriptor
// cannot cross 128 MB boundaries and must be split.
// This would require a patch in SdMmcPciHcDxe, but SDMA works
// fine for the time being.
//
Capability->Adma2 = 0;

Capability->Hs400 = !EMMC_DISABLE_HS400;

if (EMMC_FORCE_HIGH_SPEED) {
Expand Down

0 comments on commit 02d1502

Please sign in to comment.