MdeModulePkg/SdMmcPciHcDxe: Add V3 64b DMA Support

Driver was supporting only 32b DMA support for V3 controllers. Add
support for 64b DMA as well for completeness.

For V4.0 64b support, driver was looking at incorrect capability
register bit. Fix for that is present as well.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1583
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
Tested-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
Ashish Singhal
2019-03-06 22:04:44 +08:00
committed by Hao Wu
parent a24a37dba4
commit 690d60c0ad
4 changed files with 162 additions and 74 deletions

View File

@@ -6,7 +6,7 @@
It would expose EFI_SD_MMC_PASS_THRU_PROTOCOL for upper layer use.
Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -666,8 +666,12 @@ SdMmcPciHcDriverBindingStart (
// If any of the slots does not support 64b system bus
// do not enable 64b DMA in the PCI layer.
//
if (Private->Capability[Slot].SysBus64V3 == 0 &&
Private->Capability[Slot].SysBus64V4 == 0) {
if ((Private->ControllerVersion[Slot] == SD_MMC_HC_CTRL_VER_300 &&
Private->Capability[Slot].SysBus64V3 == 0) ||
(Private->ControllerVersion[Slot] == SD_MMC_HC_CTRL_VER_400 &&
Private->Capability[Slot].SysBus64V3 == 0) ||
(Private->ControllerVersion[Slot] >= SD_MMC_HC_CTRL_VER_410 &&
Private->Capability[Slot].SysBus64V4 == 0)) {
Support64BitDma = FALSE;
}