Omap35xxPkg/MmcHostDxe: Clean code to respect EDK2 coding convention

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12254 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2011-09-01 16:33:51 +00:00
parent ef2455b175
commit 66f47f9fc0
1 changed files with 86 additions and 83 deletions

View File

@ -16,9 +16,9 @@
#include "MmcHostDxe.h" #include "MmcHostDxe.h"
EMBEDDED_EXTERNAL_DEVICE *gTPS65950; EMBEDDED_EXTERNAL_DEVICE *gTPS65950;
UINT8 MaxDataTransferRate = 0; UINT8 mMaxDataTransferRate = 0;
UINT32 Rca = 0; UINT32 mRca = 0;
BOOLEAN BitModeSet = FALSE; BOOLEAN mBitModeSet = FALSE;
typedef struct { typedef struct {
@ -116,16 +116,17 @@ CalculateCardCLKD (
UINTN *ClockFrequencySelect UINTN *ClockFrequencySelect
) )
{ {
DEBUG((EFI_D_ERROR, "CalculateCardCLKD()\n"));
UINTN TransferRateValue = 0; UINTN TransferRateValue = 0;
UINTN TimeValue = 0 ; UINTN TimeValue = 0 ;
UINTN Frequency = 0; UINTN Frequency = 0;
DEBUG ((DEBUG_BLKIO, "CalculateCardCLKD()\n"));
// For SD Cards we would need to send CMD6 to set // For SD Cards we would need to send CMD6 to set
// speeds abouve 25MHz. High Speed mode 50 MHz and up // speeds abouve 25MHz. High Speed mode 50 MHz and up
//Calculate Transfer rate unit (Bits 2:0 of TRAN_SPEED) // Calculate Transfer rate unit (Bits 2:0 of TRAN_SPEED)
switch (MaxDataTransferRate & 0x7) { // 2 switch (mMaxDataTransferRate & 0x7) { // 2
case 0: case 0:
TransferRateValue = 100 * 1000; TransferRateValue = 100 * 1000;
break; break;
@ -143,12 +144,13 @@ CalculateCardCLKD (
break; break;
default: default:
DEBUG((EFI_D_ERROR, "Invalid parameter.\n")); DEBUG ((DEBUG_BLKIO, "Invalid parameter.\n"));
ASSERT(FALSE); ASSERT(FALSE);
return;
} }
//Calculate Time value (Bits 6:3 of TRAN_SPEED) //Calculate Time value (Bits 6:3 of TRAN_SPEED)
switch ((MaxDataTransferRate >> 3) & 0xF) { // 6 switch ((mMaxDataTransferRate >> 3) & 0xF) { // 6
case 1: case 1:
TimeValue = 10; TimeValue = 10;
break; break;
@ -210,16 +212,17 @@ CalculateCardCLKD (
break; break;
default: default:
DEBUG((EFI_D_ERROR, "Invalid parameter.\n")); DEBUG ((DEBUG_BLKIO, "Invalid parameter.\n"));
ASSERT(FALSE); ASSERT(FALSE);
return;
} }
Frequency = TransferRateValue * TimeValue/10; Frequency = TransferRateValue * TimeValue/10;
//Calculate Clock divider value to program in MMCHS_SYSCTL[CLKD] field. // Calculate Clock divider value to program in MMCHS_SYSCTL[CLKD] field.
*ClockFrequencySelect = ((MMC_REFERENCE_CLK/Frequency) + 1); *ClockFrequencySelect = ((MMC_REFERENCE_CLK/Frequency) + 1);
DEBUG ((EFI_D_INFO, "MaxDataTransferRate: 0x%x, Frequency: %d KHz, ClockFrequencySelect: %x\n", MaxDataTransferRate, Frequency/1000, *ClockFrequencySelect)); DEBUG ((DEBUG_BLKIO, "mMaxDataTransferRate: 0x%x, Frequency: %d KHz, ClockFrequencySelect: %x\n", mMaxDataTransferRate, Frequency/1000, *ClockFrequencySelect));
} }
VOID VOID
@ -227,17 +230,18 @@ UpdateMMCHSClkFrequency (
UINTN NewCLKD UINTN NewCLKD
) )
{ {
DEBUG((EFI_D_ERROR, "UpdateMMCHSClkFrequency()\n")); DEBUG ((DEBUG_BLKIO, "UpdateMMCHSClkFrequency()\n"));
//Set Clock enable to 0x0 to not provide the clock to the card
// Set Clock enable to 0x0 to not provide the clock to the card
MmioAnd32 (MMCHS_SYSCTL, ~CEN); MmioAnd32 (MMCHS_SYSCTL, ~CEN);
//Set new clock frequency. // Set new clock frequency.
MmioAndThenOr32 (MMCHS_SYSCTL, ~CLKD_MASK, NewCLKD << 6); MmioAndThenOr32 (MMCHS_SYSCTL, ~CLKD_MASK, NewCLKD << 6);
//Poll till Internal Clock Stable // Poll till Internal Clock Stable
while ((MmioRead32 (MMCHS_SYSCTL) & ICS_MASK) != ICS); while ((MmioRead32 (MMCHS_SYSCTL) & ICS_MASK) != ICS);
//Set Clock enable to 0x1 to provide the clock to the card // Set Clock enable to 0x1 to provide the clock to the card
MmioOr32 (MMCHS_SYSCTL, CEN); MmioOr32 (MMCHS_SYSCTL, CEN);
} }
@ -246,21 +250,22 @@ InitializeMMCHS (
VOID VOID
) )
{ {
DEBUG((EFI_D_ERROR, "InitializeMMCHS()\n")); UINT8 Data;
UINT8 Data = 0;
EFI_STATUS Status; EFI_STATUS Status;
//Select Device group to belong to P1 device group in Power IC. DEBUG ((DEBUG_BLKIO, "InitializeMMCHS()\n"));
// Select Device group to belong to P1 device group in Power IC.
Data = DEV_GRP_P1; Data = DEV_GRP_P1;
Status = gTPS65950->Write (gTPS65950, EXTERNAL_DEVICE_REGISTER(I2C_ADDR_GRP_ID4, VMMC1_DEV_GRP), 1, &Data); Status = gTPS65950->Write (gTPS65950, EXTERNAL_DEVICE_REGISTER(I2C_ADDR_GRP_ID4, VMMC1_DEV_GRP), 1, &Data);
ASSERT_EFI_ERROR(Status); ASSERT_EFI_ERROR(Status);
//Configure voltage regulator for MMC1 in Power IC to output 3.0 voltage. // Configure voltage regulator for MMC1 in Power IC to output 3.0 voltage.
Data = VSEL_3_00V; Data = VSEL_3_00V;
Status = gTPS65950->Write (gTPS65950, EXTERNAL_DEVICE_REGISTER(I2C_ADDR_GRP_ID4, VMMC1_DEDICATED_REG), 1, &Data); Status = gTPS65950->Write (gTPS65950, EXTERNAL_DEVICE_REGISTER(I2C_ADDR_GRP_ID4, VMMC1_DEDICATED_REG), 1, &Data);
ASSERT_EFI_ERROR(Status); ASSERT_EFI_ERROR(Status);
//After ramping up voltage, set VDDS stable bit to indicate that voltage level is stable. // After ramping up voltage, set VDDS stable bit to indicate that voltage level is stable.
MmioOr32 (CONTROL_PBIAS_LITE, (PBIASLITEVMODE0 | PBIASLITEPWRDNZ0 | PBIASSPEEDCTRL0 | PBIASLITEVMODE1 | PBIASLITEWRDNZ1)); MmioOr32 (CONTROL_PBIAS_LITE, (PBIASLITEVMODE0 | PBIASLITEPWRDNZ0 | PBIASSPEEDCTRL0 | PBIASLITEVMODE1 | PBIASLITEWRDNZ1));
// Enable WP GPIO // Enable WP GPIO
@ -270,7 +275,6 @@ InitializeMMCHS (
Data = CARD_DETECT_ENABLE; Data = CARD_DETECT_ENABLE;
gTPS65950->Write (gTPS65950, EXTERNAL_DEVICE_REGISTER(I2C_ADDR_GRP_ID2, TPS65950_GPIO_CTRL), 1, &Data); gTPS65950->Write (gTPS65950, EXTERNAL_DEVICE_REGISTER(I2C_ADDR_GRP_ID2, TPS65950_GPIO_CTRL), 1, &Data);
return Status; return Status;
} }
@ -279,7 +283,6 @@ MMCIsCardPresent (
VOID VOID
) )
{ {
//DEBUG((EFI_D_ERROR, "MMCIsCardPresent()\n"));
EFI_STATUS Status; EFI_STATUS Status;
UINT8 Data; UINT8 Data;
@ -332,47 +335,48 @@ MMCSendCommand (
IN UINT32 Argument IN UINT32 Argument
) )
{ {
UINTN MmcStatus;
UINTN RetryCount = 0;
if (IgnoreCommand(MmcCmd)) if (IgnoreCommand(MmcCmd))
return EFI_SUCCESS; return EFI_SUCCESS;
MmcCmd = TranslateCommand(MmcCmd); MmcCmd = TranslateCommand(MmcCmd);
//DEBUG((EFI_D_ERROR, "MMCSendCommand(%d)\n", MmcCmd)); //DEBUG ((EFI_D_ERROR, "MMCSendCommand(%d)\n", MmcCmd));
UINTN MmcStatus;
UINTN RetryCount = 0;
//Check if command line is in use or not. Poll till command line is available. // Check if command line is in use or not. Poll till command line is available.
while ((MmioRead32 (MMCHS_PSTATE) & DATI_MASK) == DATI_NOT_ALLOWED); while ((MmioRead32 (MMCHS_PSTATE) & DATI_MASK) == DATI_NOT_ALLOWED);
//Provide the block size. // Provide the block size.
MmioWrite32 (MMCHS_BLK, BLEN_512BYTES); MmioWrite32 (MMCHS_BLK, BLEN_512BYTES);
//Setting Data timeout counter value to max value. // Setting Data timeout counter value to max value.
MmioAndThenOr32 (MMCHS_SYSCTL, ~DTO_MASK, DTO_VAL); MmioAndThenOr32 (MMCHS_SYSCTL, ~DTO_MASK, DTO_VAL);
//Clear Status register. // Clear Status register.
MmioWrite32 (MMCHS_STAT, 0xFFFFFFFF); MmioWrite32 (MMCHS_STAT, 0xFFFFFFFF);
//Set command argument register // Set command argument register
MmioWrite32 (MMCHS_ARG, Argument); MmioWrite32 (MMCHS_ARG, Argument);
//TODO: fix this //TODO: fix this
//Enable interrupt enable events to occur //Enable interrupt enable events to occur
//MmioWrite32 (MMCHS_IE, CmdInterruptEnableVal); //MmioWrite32 (MMCHS_IE, CmdInterruptEnableVal);
//Send a command // Send a command
MmioWrite32 (MMCHS_CMD, MmcCmd); MmioWrite32 (MMCHS_CMD, MmcCmd);
//Check for the command status. // Check for the command status.
while (RetryCount < MAX_RETRY_COUNT) { while (RetryCount < MAX_RETRY_COUNT) {
do { do {
MmcStatus = MmioRead32 (MMCHS_STAT); MmcStatus = MmioRead32 (MMCHS_STAT);
} while (MmcStatus == 0); } while (MmcStatus == 0);
//Read status of command response // Read status of command response
if ((MmcStatus & ERRI) != 0) { if ((MmcStatus & ERRI) != 0) {
//Perform soft-reset for mmci_cmd line. // Perform soft-reset for mmci_cmd line.
MmioOr32 (MMCHS_SYSCTL, SRC); MmioOr32 (MMCHS_SYSCTL, SRC);
while ((MmioRead32 (MMCHS_SYSCTL) & SRC)); while ((MmioRead32 (MMCHS_SYSCTL) & SRC));
@ -380,7 +384,7 @@ MMCSendCommand (
return EFI_DEVICE_ERROR; return EFI_DEVICE_ERROR;
} }
//Check if command is completed. // Check if command is completed.
if ((MmcStatus & CC) == CC) { if ((MmcStatus & CC) == CC) {
MmioWrite32 (MMCHS_STAT, CC); MmioWrite32 (MMCHS_STAT, CC);
break; break;
@ -390,7 +394,7 @@ MMCSendCommand (
} }
if (RetryCount == MAX_RETRY_COUNT) { if (RetryCount == MAX_RETRY_COUNT) {
DEBUG((EFI_D_ERROR, "MMCSendCommand: Timeout\n")); DEBUG ((DEBUG_BLKIO, "MMCSendCommand: Timeout\n"));
return EFI_TIMEOUT; return EFI_TIMEOUT;
} }
@ -403,27 +407,28 @@ MMCNotifyState (
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
UINTN freqSel; UINTN FreqSel;
switch(State) { switch(State) {
case MmcInvalidState: case MmcInvalidState:
ASSERT(0); ASSERT(0);
break; break;
case MmcHwInitializationState: case MmcHwInitializationState:
BitModeSet = FALSE; mBitModeSet = FALSE;
DEBUG((EFI_D_ERROR, "MMCHwInitializationState()\n")); DEBUG ((DEBUG_BLKIO, "MMCHwInitializationState()\n"));
Status = InitializeMMCHS (); Status = InitializeMMCHS ();
if (EFI_ERROR(Status)) { if (EFI_ERROR(Status)) {
DEBUG ((EFI_D_ERROR, "Initialize MMC host controller fails. Status: %x\n", Status)); DEBUG ((DEBUG_BLKIO, "Initialize MMC host controller fails. Status: %x\n", Status));
return Status; return Status;
} }
//Software reset of the MMCHS host controller. // Software reset of the MMCHS host controller.
MmioWrite32 (MMCHS_SYSCONFIG, SOFTRESET); MmioWrite32 (MMCHS_SYSCONFIG, SOFTRESET);
gBS->Stall(1000); gBS->Stall(1000);
while ((MmioRead32 (MMCHS_SYSSTATUS) & RESETDONE_MASK) != RESETDONE); while ((MmioRead32 (MMCHS_SYSSTATUS) & RESETDONE_MASK) != RESETDONE);
//Soft reset for all. // Soft reset for all.
MmioWrite32 (MMCHS_SYSCTL, SRA); MmioWrite32 (MMCHS_SYSCTL, SRA);
gBS->Stall(1000); gBS->Stall(1000);
while ((MmioRead32 (MMCHS_SYSCTL) & SRA) != 0x0); while ((MmioRead32 (MMCHS_SYSCTL) & SRA) != 0x0);
@ -431,52 +436,52 @@ MMCNotifyState (
//Voltage capabilities initialization. Activate VS18 and VS30. //Voltage capabilities initialization. Activate VS18 and VS30.
MmioOr32 (MMCHS_CAPA, (VS30 | VS18)); MmioOr32 (MMCHS_CAPA, (VS30 | VS18));
//Wakeup configuration // Wakeup configuration
MmioOr32 (MMCHS_SYSCONFIG, ENAWAKEUP); MmioOr32 (MMCHS_SYSCONFIG, ENAWAKEUP);
MmioOr32 (MMCHS_HCTL, IWE); MmioOr32 (MMCHS_HCTL, IWE);
//MMCHS Controller default initialization // MMCHS Controller default initialization
MmioOr32 (MMCHS_CON, (OD | DW8_1_4_BIT | CEATA_OFF)); MmioOr32 (MMCHS_CON, (OD | DW8_1_4_BIT | CEATA_OFF));
MmioWrite32 (MMCHS_HCTL, (SDVS_3_0_V | DTW_1_BIT | SDBP_OFF)); MmioWrite32 (MMCHS_HCTL, (SDVS_3_0_V | DTW_1_BIT | SDBP_OFF));
//Enable internal clock // Enable internal clock
MmioOr32 (MMCHS_SYSCTL, ICE); MmioOr32 (MMCHS_SYSCTL, ICE);
//Set the clock frequency to 80KHz. // Set the clock frequency to 80KHz.
UpdateMMCHSClkFrequency (CLKD_80KHZ); UpdateMMCHSClkFrequency (CLKD_80KHZ);
//Enable SD bus power. // Enable SD bus power.
MmioOr32 (MMCHS_HCTL, (SDBP_ON)); MmioOr32 (MMCHS_HCTL, (SDBP_ON));
//Poll till SD bus power bit is set. // Poll till SD bus power bit is set.
while ((MmioRead32 (MMCHS_HCTL) & SDBP_MASK) != SDBP_ON); while ((MmioRead32 (MMCHS_HCTL) & SDBP_MASK) != SDBP_ON);
//Enable interrupts. // Enable interrupts.
MmioWrite32 (MMCHS_IE, (BADA_EN | CERR_EN | DEB_EN | DCRC_EN | DTO_EN | CIE_EN | MmioWrite32 (MMCHS_IE, (BADA_EN | CERR_EN | DEB_EN | DCRC_EN | DTO_EN | CIE_EN |
CEB_EN | CCRC_EN | CTO_EN | BRR_EN | BWR_EN | TC_EN | CC_EN)); CEB_EN | CCRC_EN | CTO_EN | BRR_EN | BWR_EN | TC_EN | CC_EN));
//Controller INIT procedure start. // Controller INIT procedure start.
MmioOr32 (MMCHS_CON, INIT); MmioOr32 (MMCHS_CON, INIT);
MmioWrite32 (MMCHS_CMD, 0x00000000); MmioWrite32 (MMCHS_CMD, 0x00000000);
while (!(MmioRead32 (MMCHS_STAT) & CC)); while (!(MmioRead32 (MMCHS_STAT) & CC));
//Wait for 1 ms // Wait for 1 ms
gBS->Stall(1000); gBS->Stall (1000);
//Set CC bit to 0x1 to clear the flag // Set CC bit to 0x1 to clear the flag
MmioOr32 (MMCHS_STAT, CC); MmioOr32 (MMCHS_STAT, CC);
//Retry INIT procedure. // Retry INIT procedure.
MmioWrite32 (MMCHS_CMD, 0x00000000); MmioWrite32 (MMCHS_CMD, 0x00000000);
while (!(MmioRead32 (MMCHS_STAT) & CC)); while (!(MmioRead32 (MMCHS_STAT) & CC));
//End initialization sequence // End initialization sequence
MmioAnd32 (MMCHS_CON, ~INIT); MmioAnd32 (MMCHS_CON, ~INIT);
MmioOr32 (MMCHS_HCTL, (SDVS_3_0_V | DTW_1_BIT | SDBP_ON)); MmioOr32 (MMCHS_HCTL, (SDVS_3_0_V | DTW_1_BIT | SDBP_ON));
//Change clock frequency to 400KHz to fit protocol // Change clock frequency to 400KHz to fit protocol
UpdateMMCHSClkFrequency(CLKD_400KHZ); UpdateMMCHSClkFrequency(CLKD_400KHZ);
MmioOr32 (MMCHS_CON, OD); MmioOr32 (MMCHS_CON, OD);
@ -488,20 +493,20 @@ MMCNotifyState (
case MmcIdentificationState: case MmcIdentificationState:
break; break;
case MmcStandByState: case MmcStandByState:
CalculateCardCLKD(&freqSel); CalculateCardCLKD (&FreqSel);
UpdateMMCHSClkFrequency(freqSel); UpdateMMCHSClkFrequency (FreqSel);
break; break;
case MmcTransferState: case MmcTransferState:
if (!BitModeSet) { if (!mBitModeSet) {
Status = MMCSendCommand (CMD55, Rca << 16); Status = MMCSendCommand (This, CMD55, mRca << 16);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
// set device into 4-bit data bus mode // Set device into 4-bit data bus mode
Status = MMCSendCommand (ACMD6, 0x2); Status = MMCSendCommand (This, ACMD6, 0x2);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
// Set host controler into 4-bit mode // Set host controler into 4-bit mode
MmioOr32 (MMCHS_HCTL, DTW_4_BIT); MmioOr32 (MMCHS_HCTL, DTW_4_BIT);
DEBUG ((EFI_D_INFO, "SD Memory Card set to 4-bit mode\n")); DEBUG ((DEBUG_BLKIO, "SD Memory Card set to 4-bit mode\n"));
BitModeSet = TRUE; mBitModeSet = TRUE;
} }
} }
} }
@ -525,9 +530,7 @@ MMCReceiveResponse (
IN UINT32* Buffer IN UINT32* Buffer
) )
{ {
//DEBUG((EFI_D_ERROR, "MMCReceiveResponse()\n"));
if (Buffer == NULL) { if (Buffer == NULL) {
DEBUG((EFI_D_ERROR, "Buffer was NULL\n"));
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -541,9 +544,9 @@ MMCReceiveResponse (
} }
if (Type == MMC_RESPONSE_TYPE_CSD) { if (Type == MMC_RESPONSE_TYPE_CSD) {
MaxDataTransferRate = Buffer[3] & 0xFF; mMaxDataTransferRate = Buffer[3] & 0xFF;
} else if (Type == MMC_RESPONSE_TYPE_RCA) { } else if (Type == MMC_RESPONSE_TYPE_RCA) {
Rca = Buffer[0] >> 16; mRca = Buffer[0] >> 16;
} }
return EFI_SUCCESS; return EFI_SUCCESS;
@ -556,24 +559,23 @@ MMCReadBlockData (
IN UINT32* Buffer IN UINT32* Buffer
) )
{ {
//DEBUG((EFI_D_ERROR, "MMCReadBlockData(LBA: 0x%x, ", Lba));
//DEBUG((EFI_D_ERROR, "Length: 0x%x, ", Length));
//DEBUG((EFI_D_ERROR, "Buffer: 0x%x)\n", Buffer));
UINTN MmcStatus; UINTN MmcStatus;
UINTN Count; UINTN Count;
UINTN RetryCount = 0; UINTN RetryCount = 0;
//Check controller status to make sure there is no error. DEBUG ((DEBUG_BLKIO, "MMCReadBlockData(LBA: 0x%x, Length: 0x%x, Buffer: 0x%x)\n", Lba, Length, Buffer));
// Check controller status to make sure there is no error.
while (RetryCount < MAX_RETRY_COUNT) { while (RetryCount < MAX_RETRY_COUNT) {
do { do {
//Read Status. // Read Status.
MmcStatus = MmioRead32 (MMCHS_STAT); MmcStatus = MmioRead32 (MMCHS_STAT);
} while(MmcStatus == 0); } while(MmcStatus == 0);
//Check if Buffer read ready (BRR) bit is set? // Check if Buffer read ready (BRR) bit is set?
if (MmcStatus & BRR) { if (MmcStatus & BRR) {
//Clear BRR bit // Clear BRR bit
MmioOr32 (MMCHS_STAT, BRR); MmioOr32 (MMCHS_STAT, BRR);
for (Count = 0; Count < Length / 4; Count++) { for (Count = 0; Count < Length / 4; Count++) {
@ -602,20 +604,20 @@ MMCWriteBlockData (
UINTN Count; UINTN Count;
UINTN RetryCount = 0; UINTN RetryCount = 0;
//Check controller status to make sure there is no error. // Check controller status to make sure there is no error.
while (RetryCount < MAX_RETRY_COUNT) { while (RetryCount < MAX_RETRY_COUNT) {
do { do {
//Read Status. // Read Status.
MmcStatus = MmioRead32 (MMCHS_STAT); MmcStatus = MmioRead32 (MMCHS_STAT);
} while(MmcStatus == 0); } while(MmcStatus == 0);
//Check if Buffer write ready (BWR) bit is set? // Check if Buffer write ready (BWR) bit is set?
if (MmcStatus & BWR) { if (MmcStatus & BWR) {
//Clear BWR bit // Clear BWR bit
MmioOr32 (MMCHS_STAT, BWR); MmioOr32 (MMCHS_STAT, BWR);
//Write block worth of data. // Write block worth of data.
for (Count = 0; Count < Length / 4; Count++) { for (Count = 0; Count < Length / 4; Count++) {
MmioWrite32 (MMCHS_DATA, *Buffer++); MmioWrite32 (MMCHS_DATA, *Buffer++);
} }
@ -649,10 +651,11 @@ MMCInitialize (
IN EFI_SYSTEM_TABLE *SystemTable IN EFI_SYSTEM_TABLE *SystemTable
) )
{ {
DEBUG((EFI_D_ERROR, "MMCInitialize()\n"));
EFI_STATUS Status; EFI_STATUS Status;
EFI_HANDLE Handle = NULL; EFI_HANDLE Handle = NULL;
DEBUG ((DEBUG_BLKIO, "MMCInitialize()\n"));
Status = gBS->LocateProtocol (&gEmbeddedExternalDeviceProtocolGuid, NULL, (VOID **)&gTPS65950); Status = gBS->LocateProtocol (&gEmbeddedExternalDeviceProtocolGuid, NULL, (VOID **)&gTPS65950);
ASSERT_EFI_ERROR(Status); ASSERT_EFI_ERROR(Status);