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:
@@ -2,7 +2,7 @@
|
||||
|
||||
Provides some data structure definitions used by the SD/MMC host controller driver.
|
||||
|
||||
Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
Copyright (c) 2015, 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
|
||||
@@ -80,15 +80,24 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
//
|
||||
// The transfer modes supported by SD Host Controller
|
||||
// Simplified Spec 3.0 Table 1-2
|
||||
//
|
||||
typedef enum {
|
||||
SdMmcNoData,
|
||||
SdMmcPioMode,
|
||||
SdMmcSdmaMode,
|
||||
SdMmcAdmaMode
|
||||
SdMmcAdma32bMode,
|
||||
SdMmcAdma64bV3Mode,
|
||||
SdMmcAdma64bV4Mode
|
||||
} SD_MMC_HC_TRANSFER_MODE;
|
||||
|
||||
//
|
||||
// The ADMA transfer lengths supported by SD Host Controller
|
||||
//
|
||||
typedef enum {
|
||||
SdMmcAdmaLen16b,
|
||||
SdMmcAdmaLen26b
|
||||
} SD_MMC_HC_ADMA_LENGTH_MODE;
|
||||
|
||||
//
|
||||
// The maximum data length of each descriptor line
|
||||
//
|
||||
@@ -112,6 +121,18 @@ typedef struct {
|
||||
//
|
||||
// ADMA descriptor for 64b addressing.
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 Valid:1;
|
||||
UINT32 End:1;
|
||||
UINT32 Int:1;
|
||||
UINT32 Reserved:1;
|
||||
UINT32 Act:2;
|
||||
UINT32 UpperLength:10;
|
||||
UINT32 LowerLength:16;
|
||||
UINT32 LowerAddress;
|
||||
UINT32 UpperAddress;
|
||||
} SD_MMC_HC_ADMA_64_V3_DESC_LINE;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Valid:1;
|
||||
UINT32 End:1;
|
||||
@@ -123,7 +144,7 @@ typedef struct {
|
||||
UINT32 LowerAddress;
|
||||
UINT32 UpperAddress;
|
||||
UINT32 Reserved1;
|
||||
} SD_MMC_HC_ADMA_64_DESC_LINE;
|
||||
} SD_MMC_HC_ADMA_64_V4_DESC_LINE;
|
||||
|
||||
#define SD_MMC_SDMA_BOUNDARY 512 * 1024
|
||||
#define SD_MMC_SDMA_ROUND_UP(x, n) (((x) + n) & ~(n - 1))
|
||||
|
Reference in New Issue
Block a user