summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3201075)
Since ECSD also describes the information of card, move it into
structure CardInfo.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
OCR OCRData;\r
CID CIDData;\r
CSD CSDData;\r
OCR OCRData;\r
CID CIDData;\r
CSD CSDData;\r
+ UINT32 ECSD[128]; // MMC V4 extended card specific\r
} CARD_INFO;\r
\r
typedef struct _MMC_HOST_INSTANCE {\r
} CARD_INFO;\r
\r
typedef struct _MMC_HOST_INSTANCE {\r
EFI_BLOCK_IO_MEDIA *Media;\r
EFI_STATUS Status;\r
UINT32 RCA;\r
EFI_BLOCK_IO_MEDIA *Media;\r
EFI_STATUS Status;\r
UINT32 RCA;\r
\r
Host = MmcHostInstance->MmcHost;\r
Media = MmcHostInstance->BlockIo.Media;\r
\r
Host = MmcHostInstance->MmcHost;\r
Media = MmcHostInstance->BlockIo.Media;\r
DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): ECSD fetch error, Status=%r.\n", Status));\r
}\r
\r
DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): ECSD fetch error, Status=%r.\n", Status));\r
}\r
\r
- Status = Host->ReadBlockData (Host, 0, 512, ECSD);\r
+ Status = Host->ReadBlockData (Host, 0, 512, (UINT32 *)&(MmcHostInstance->CardInfo.ECSD));\r
if (EFI_ERROR (Status)) {\r
DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): ECSD read error, Status=%r.\n", Status));\r
return Status;\r
if (EFI_ERROR (Status)) {\r
DEBUG ((EFI_D_ERROR, "EmmcIdentificationMode(): ECSD read error, Status=%r.\n", Status));\r
return Status;\r
Media->LogicalBlocksPerPhysicalBlock = 1;\r
Media->IoAlign = 4;\r
// Compute last block using bits [215:212] of the ECSD\r
Media->LogicalBlocksPerPhysicalBlock = 1;\r
Media->IoAlign = 4;\r
// Compute last block using bits [215:212] of the ECSD\r
- Media->LastBlock = ECSD[EMMC_ECSD_SIZE_OFFSET] - 1; // eMMC isn't supposed to report this for\r
+ Media->LastBlock = MmcHostInstance->CardInfo.ECSD[EMMC_ECSD_SIZE_OFFSET] - 1; // eMMC isn't supposed to report this for\r
// Cards <2GB in size, but the model does.\r
\r
// Setup card type\r
// Cards <2GB in size, but the model does.\r
\r
// Setup card type\r