TianoCore EDK2 master
|
#include "EmmcBlockIoPei.h"
Go to the source code of this file.
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EmmcHci.c.
EFI_STATUS BuildAdmaDescTable | ( | IN EMMC_TRB * | Trb | ) |
Build ADMA descriptor table for transfer.
Refer to SD Host Controller Simplified spec 3.0 Section 1.13 for details.
[in] | Trb | The pointer to the EMMC_TRB instance. |
EFI_SUCCESS | The ADMA descriptor table is created successfully. |
Others | The ADMA descriptor table isn't created successfully. |
EFI_STATUS EmmcPeimCheckTrbEnv | ( | IN UINTN | Bar, |
IN EMMC_TRB * | Trb | ||
) |
Check if the env is ready for execute specified TRB.
[in] | Bar | The mmio base address of the slot to be accessed. |
[in] | Trb | The pointer to the EMMC_TRB instance. |
EFI_SUCCESS | The env is ready for TRB execution. |
EFI_NOT_READY | The env is not ready for TRB execution. |
Others | Some erros happen. |
EFI_STATUS EmmcPeimCheckTrbResult | ( | IN UINTN | Bar, |
IN EMMC_TRB * | Trb | ||
) |
Check the TRB execution result.
[in] | Bar | The mmio base address of the slot to be accessed. |
[in] | Trb | The pointer to the EMMC_TRB instance. |
EFI_SUCCESS | The TRB is executed successfully. |
EFI_NOT_READY | The TRB is not completed for execution. |
Others | Some erros happen when executing this request. |
EMMC_TRB * EmmcPeimCreateTrb | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN EMMC_COMMAND_PACKET * | Packet | ||
) |
EFI_STATUS EFIAPI EmmcPeimExecCmd | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN OUT EMMC_COMMAND_PACKET * | Packet | ||
) |
Sends EMMC command to an EMMC card that is attached to the EMMC controller.
If Packet is successfully sent to the EMMC card, then EFI_SUCCESS is returned.
If a device error occurs while sending the Packet, then EFI_DEVICE_ERROR is returned.
If Slot is not in a valid range for the EMMC controller, then EFI_INVALID_PARAMETER is returned.
If Packet defines a data command but both InDataBuffer and OutDataBuffer are NULL, EFI_INVALID_PARAMETER is returned.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in,out] | Packet | A pointer to the EMMC command data structure. |
EFI_SUCCESS | The EMMC Command Packet was sent by the host. |
EFI_DEVICE_ERROR | A device error occurred while attempting to send the SD command Packet. |
EFI_INVALID_PARAMETER | Packet, Slot, or the contents of the Packet is invalid. |
EFI_INVALID_PARAMETER | Packet defines a data command but both InDataBuffer and OutDataBuffer are NULL. |
EFI_NO_MEDIA | SD Device not present in the Slot. |
EFI_UNSUPPORTED | The command described by the EMMC Command Packet is not supported by the host controller. |
EFI_BAD_BUFFER_SIZE | The InTransferLength or OutTransferLength exceeds the limit supported by EMMC card ( i.e. if the number of bytes exceed the Last LBA). |
EFI_STATUS EmmcPeimExecTrb | ( | IN UINTN | Bar, |
IN EMMC_TRB * | Trb | ||
) |
Execute the specified TRB.
[in] | Bar | The mmio base address of the slot to be accessed. |
[in] | Trb | The pointer to the EMMC_TRB instance. |
EFI_SUCCESS | The TRB is sent to host controller successfully. |
Others | Some erros happen when sending this request to the host controller. |
EFI_STATUS EmmcPeimGetAllCid | ( | IN EMMC_PEIM_HC_SLOT * | Slot | ) |
Broadcast command ALL_SEND_CID to the bus to ask all the EMMC devices to send the data of their CID registers.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimGetCsd | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT32 | Rca, | ||
OUT EMMC_CSD * | Csd | ||
) |
Send command SEND_CSD to the EMMC device to get the data of the CSD register.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.10.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Rca | The relative device address of selected device. |
[out] | Csd | The buffer to store the content of the CSD register. Note the caller should ignore the lowest byte of this buffer as the content of this byte is meaningless even if the operation succeeds. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimGetExtCsd | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
OUT EMMC_EXT_CSD * | ExtCsd | ||
) |
Send command SEND_EXT_CSD to the EMMC device to get the data of the EXT_CSD register.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.10.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[out] | ExtCsd | The buffer to store the content of the EXT_CSD register. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimGetOcr | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN OUT UINT32 * | Argument | ||
) |
Send command SEND_OP_COND to the EMMC device to get the data of the OCR register.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in,out] | Argument | On input, the argument of SEND_OP_COND is to send to the device. On output, the argument is the value of OCR register. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EFIAPI EmmcPeimHcAndMmio | ( | IN UINTN | Address, |
IN UINT8 | Count, | ||
IN VOID * | AndData | ||
) |
Do AND operation with the value of the specified EMMC host controller mmio register.
[in] | Address | The address of the mmio register to be read/written. |
[in] | Count | The width of the mmio register in bytes. Must be 1, 2 , 4 or 8 bytes. |
[in] | AndData | The pointer to the data used to do AND operation. The caller is responsible for having ownership of the data buffer and ensuring its size not less than Count bytes. |
EFI_INVALID_PARAMETER | The Address or the AndData or the Count is not valid. |
EFI_SUCCESS | The AND operation succeeds. |
Others | The AND operation fails. |
EFI_STATUS EmmcPeimHcCardDetect | ( | IN UINTN | Bar | ) |
Detect whether there is a EMMC card attached at the specified EMMC host controller slot.
Refer to SD Host Controller Simplified spec 3.0 Section 3.1 for details.
[in] | Bar | The mmio base address of the slot to be accessed. |
EFI_SUCCESS | There is a EMMC card attached. |
EFI_NO_MEDIA | There is not a EMMC card attached. |
Others | The detection fails. |
EFI_STATUS EFIAPI EmmcPeimHcCheckMmioSet | ( | IN UINTN | Address, |
IN UINT8 | Count, | ||
IN UINT64 | MaskValue, | ||
IN UINT64 | TestValue | ||
) |
Wait for the value of the specified MMIO register set to the test value.
[in] | Address | The address of the mmio register to be checked. |
[in] | Count | The width of the mmio register in bytes. Must be 1, 2, 4 or 8 bytes. |
[in] | MaskValue | The mask value of memory. |
[in] | TestValue | The test value of memory. |
EFI_NOT_READY | The MMIO register hasn't set to the expected value. |
EFI_SUCCESS | The MMIO register has expected value. |
Others | The MMIO operation fails. |
EFI_STATUS EmmcPeimHcClockSupply | ( | IN UINTN | Bar, |
IN UINT64 | ClockFreq | ||
) |
EMMC card clock supply.
Refer to SD Host Controller Simplified spec 3.0 Section 3.2.1 for details.
[in] | Bar | The mmio base address of the slot to be accessed. |
[in] | ClockFreq | The max clock frequency to be set. The unit is KHz. |
EFI_SUCCESS | The clock is supplied successfully. |
Others | The clock isn't supplied successfully. |
EFI_STATUS EmmcPeimHcEnableInterrupt | ( | IN UINTN | Bar | ) |
EFI_STATUS EmmcPeimHcGetCapability | ( | IN UINTN | Bar, |
OUT EMMC_HC_SLOT_CAP * | Capability | ||
) |
Get the capability data from the specified slot.
[in] | Bar | The mmio base address of the slot to be accessed. |
[out] | Capability | The buffer to store the capability data. |
EFI_SUCCESS | The operation executes successfully. |
Others | The operation fails. |
EFI_STATUS EmmcPeimHcInitClockFreq | ( | IN UINTN | Bar | ) |
EFI_STATUS EmmcPeimHcInitHost | ( | IN UINTN | Bar | ) |
Initial EMMC host controller with lowest clock frequency, max power and max timeout value at initialization.
[in] | Bar | The mmio base address of the slot to be accessed. |
EFI_SUCCESS | The host controller is initialized successfully. |
Others | The host controller isn't initialized successfully. |
EFI_STATUS EmmcPeimHcInitPowerVoltage | ( | IN UINTN | Bar | ) |
Supply EMMC card with maximum voltage at initialization.
Refer to SD Host Controller Simplified spec 3.0 Section 3.3 for details.
[in] | Bar | The mmio base address of the slot to be accessed. |
EFI_SUCCESS | The voltage is supplied successfully. |
Others | The voltage isn't supplied successfully. |
EFI_STATUS EmmcPeimHcInitTimeoutCtrl | ( | IN UINTN | Bar | ) |
Initialize the Timeout Control register with most conservative value at initialization.
Refer to SD Host Controller Simplified spec 3.0 Section 2.2.15 for details.
[in] | Bar | The mmio base address of the slot to be accessed. |
EFI_SUCCESS | The timeout control register is configured successfully. |
Others | The timeout control register isn't configured successfully. |
EFI_STATUS EmmcPeimHcLedOnOff | ( | IN UINTN | Bar, |
IN BOOLEAN | On | ||
) |
EFI_STATUS EFIAPI EmmcPeimHcOrMmio | ( | IN UINTN | Address, |
IN UINT8 | Count, | ||
IN VOID * | OrData | ||
) |
Do OR operation with the value of the specified EMMC host controller mmio register.
[in] | Address | The address of the mmio register to be read/written. |
[in] | Count | The width of the mmio register in bytes. Must be 1, 2 , 4 or 8 bytes. |
[in] | OrData | The pointer to the data used to do OR operation. The caller is responsible for having ownership of the data buffer and ensuring its size not less than Count bytes. |
EFI_INVALID_PARAMETER | The Address or the OrData or the Count is not valid. |
EFI_SUCCESS | The OR operation succeeds. |
Others | The OR operation fails. |
EFI_STATUS EmmcPeimHcPowerControl | ( | IN UINTN | Bar, |
IN UINT8 | PowerCtrl | ||
) |
EMMC bus power control.
Refer to SD Host Controller Simplified spec 3.0 Section 3.3 for details.
[in] | Bar | The mmio base address of the slot to be accessed. |
[in] | PowerCtrl | The value setting to the power control register. |
TRUE | There is a EMMC card attached. |
FALSE | There is no a EMMC card attached. |
EFI_STATUS EmmcPeimHcReset | ( | IN UINTN | Bar | ) |
EFI_STATUS EFIAPI EmmcPeimHcRwMmio | ( | IN UINTN | Address, |
IN BOOLEAN | Read, | ||
IN UINT8 | Count, | ||
IN OUT VOID * | Data | ||
) |
Read/Write specified EMMC host controller mmio register.
[in] | Address | The address of the mmio register to be read/written. |
[in] | Read | A boolean to indicate it's read or write operation. |
[in] | Count | The width of the mmio register in bytes. Must be 1, 2 , 4 or 8 bytes. |
[in,out] | Data | For read operations, the destination buffer to store the results. For write operations, the source buffer to write data from. The caller is responsible for having ownership of the data buffer and ensuring its size not less than Count bytes. |
EFI_INVALID_PARAMETER | The Address or the Data or the Count is not valid. |
EFI_SUCCESS | The read/write operation succeeds. |
Others | The read/write operation fails. |
EFI_STATUS EmmcPeimHcSetBusWidth | ( | IN UINTN | Bar, |
IN UINT16 | BusWidth | ||
) |
Set the EMMC bus width.
Refer to SD Host Controller Simplified spec 3.0 Section 3.4 for details.
[in] | Bar | The mmio base address of the slot to be accessed. |
[in] | BusWidth | The bus width used by the EMMC device, it must be 1, 4 or 8. |
EFI_SUCCESS | The bus width is set successfully. |
Others | The bus width isn't set successfully. |
EFI_STATUS EmmcPeimHcStopClock | ( | IN UINTN | Bar | ) |
EFI_STATUS EFIAPI EmmcPeimHcWaitMmioSet | ( | IN UINTN | Address, |
IN UINT8 | Count, | ||
IN UINT64 | MaskValue, | ||
IN UINT64 | TestValue, | ||
IN UINT64 | Timeout | ||
) |
Wait for the value of the specified MMIO register set to the test value.
[in] | Address | The address of the mmio register to wait. |
[in] | Count | The width of the mmio register in bytes. Must be 1, 2, 4 or 8 bytes. |
[in] | MaskValue | The mask value of memory. |
[in] | TestValue | The test value of memory. |
[in] | Timeout | The time out value for wait memory set, uses 1 microsecond as a unit. |
EFI_TIMEOUT | The MMIO register hasn't expected value in timeout range. |
EFI_SUCCESS | The MMIO register has expected value. |
Others | The MMIO operation fails. |
EFI_STATUS EmmcPeimIdentification | ( | IN EMMC_PEIM_HC_SLOT * | Slot | ) |
Execute EMMC device identification procedure.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
EFI_SUCCESS | There is a EMMC card. |
Others | There is not a EMMC card. |
EFI_STATUS EmmcPeimReset | ( | IN EMMC_PEIM_HC_SLOT * | Slot | ) |
Send command GO_IDLE_STATE (CMD0 with argument of 0x00000000) to the device to make it go to Idle State.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
EFI_SUCCESS | The EMMC device is reset correctly. |
Others | The device reset fails. |
EFI_STATUS EmmcPeimRwMultiBlocks | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN EFI_LBA | Lba, | ||
IN UINT32 | BlockSize, | ||
IN VOID * | Buffer, | ||
IN UINTN | BufferSize, | ||
IN BOOLEAN | IsRead | ||
) |
Send command READ_MULTIPLE_BLOCK/WRITE_MULTIPLE_BLOCK to the addressed EMMC device to read/write the specified number of blocks.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.10.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Lba | The logical block address of starting access. |
[in] | BlockSize | The block size of specified EMMC device partition. |
[in] | Buffer | The pointer to the transfer buffer. |
[in] | BufferSize | The size of transfer buffer. |
[in] | IsRead | Boolean to show the operation direction. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSelect | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT32 | Rca | ||
) |
Send command SELECT_DESELECT_CARD to the EMMC device to select/deselect it.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.10.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Rca | The relative device address of selected device. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSendStatus | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT32 | Rca, | ||
OUT UINT32 * | DevStatus | ||
) |
Send command SEND_STATUS to the addressed EMMC device to get its status register.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.10.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Rca | The relative device address of addressed device. |
[out] | DevStatus | The returned device status. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSendTuningBlk | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT8 | BusWidth | ||
) |
Send command SEND_TUNING_BLOCK to the EMMC device for HS200 optimal sampling point detection.
It may be sent up to 40 times until the host finishes the tuning procedure.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.6.8 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | BusWidth | The bus width to work. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSetBlkCount | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT16 | BlockCount | ||
) |
Send command SET_BLOCK_COUNT to the addressed EMMC device to set the number of blocks for the following block read/write cmd.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.10.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | BlockCount | The number of the logical block to access. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSetBusMode | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT32 | Rca | ||
) |
Switch the high speed timing according to request.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.6.8 and SD Host Controller Simplified Spec 3.0 section Figure 2-29 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Rca | The relative device address to be assigned. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSetRca | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT32 | Rca | ||
) |
Send command SET_RELATIVE_ADDR to the EMMC device to assign a Relative device Address (RCA).
Refer to EMMC Electrical Standard Spec 5.1 Section 6.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Rca | The relative device address to be assigned. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSwitch | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT8 | Access, | ||
IN UINT8 | Index, | ||
IN UINT8 | Value, | ||
IN UINT8 | CmdSet | ||
) |
Send command SWITCH to the EMMC device to switch the mode of operation of the selected Device or modifies the EXT_CSD registers.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.10.4 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Access | The access mode of SWITCH command. |
[in] | Index | The offset of the field to be access. |
[in] | Value | The value to be set to the specified field of EXT_CSD register. |
[in] | CmdSet | The value of CmdSet field of EXT_CSD register. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSwitchBusWidth | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT32 | Rca, | ||
IN BOOLEAN | IsDdr, | ||
IN UINT8 | BusWidth | ||
) |
Switch the bus width to specified width.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.6.9 and SD Host Controller Simplified Spec 3.0 section Figure 3-7 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Rca | The relative device address to be assigned. |
[in] | IsDdr | If TRUE, use dual data rate data simpling method. Otherwise use single data rate data simpling method. |
[in] | BusWidth | The bus width to be set, it could be 4 or 8. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSwitchClockFreq | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT32 | Rca, | ||
IN UINT8 | HsTiming, | ||
IN UINT32 | ClockFreq | ||
) |
Switch the clock frequency to the specified value.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.6 and SD Host Controller Simplified Spec 3.0 section Figure 3-3 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Rca | The relative device address to be assigned. |
[in] | HsTiming | The value to be written to HS_TIMING field of EXT_CSD register. |
[in] | ClockFreq | The max clock frequency to be set, the unit is MHz. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSwitchToHighSpeed | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT32 | Rca, | ||
IN UINT32 | ClockFreq, | ||
IN BOOLEAN | IsDdr, | ||
IN UINT8 | BusWidth | ||
) |
Switch to the High Speed timing according to request.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.6.8 and SD Host Controller Simplified Spec 3.0 section Figure 2-29 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Rca | The relative device address to be assigned. |
[in] | ClockFreq | The max clock frequency to be set. |
[in] | IsDdr | If TRUE, use dual data rate data simpling method. Otherwise use single data rate data simpling method. |
[in] | BusWidth | The bus width to be set, it could be 4 or 8. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSwitchToHS200 | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT32 | Rca, | ||
IN UINT32 | ClockFreq, | ||
IN UINT8 | BusWidth | ||
) |
Switch to the HS200 timing according to request.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.6.8 and SD Host Controller Simplified Spec 3.0 section Figure 2-29 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Rca | The relative device address to be assigned. |
[in] | ClockFreq | The max clock frequency to be set. |
[in] | BusWidth | The bus width to be set, it could be 4 or 8. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimSwitchToHS400 | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT32 | Rca, | ||
IN UINT32 | ClockFreq | ||
) |
Switch to the HS400 timing according to request.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.6.8 and SD Host Controller Simplified Spec 3.0 section Figure 2-29 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | Rca | The relative device address to be assigned. |
[in] | ClockFreq | The max clock frequency to be set. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimTuningClkForHs200 | ( | IN EMMC_PEIM_HC_SLOT * | Slot, |
IN UINT8 | BusWidth | ||
) |
Tuning the clock to get HS200 optimal sampling point.
Command SEND_TUNING_BLOCK may be sent up to 40 times until the host finishes the tuning procedure.
Refer to EMMC Electrical Standard Spec 5.1 Section 6.6.8 and SD Host Controller Simplified Spec 3.0 section Figure 2-29 for details.
[in] | Slot | The slot number of the Emmc card to send the command to. |
[in] | BusWidth | The bus width to work. |
EFI_SUCCESS | The operation is done correctly. |
Others | The operation fails. |
EFI_STATUS EmmcPeimWaitTrbEnv | ( | IN UINTN | Bar, |
IN EMMC_TRB * | Trb | ||
) |
Wait for the env to be ready for execute specified TRB.
[in] | Bar | The mmio base address of the slot to be accessed. |
[in] | Trb | The pointer to the EMMC_TRB instance. |
EFI_SUCCESS | The env is ready for TRB execution. |
EFI_TIMEOUT | The env is not ready for TRB execution in time. |
Others | Some erros happen. |
EFI_STATUS EmmcPeimWaitTrbResult | ( | IN UINTN | Bar, |
IN EMMC_TRB * | Trb | ||
) |
Wait for the TRB execution result.
[in] | Bar | The mmio base address of the slot to be accessed. |
[in] | Trb | The pointer to the EMMC_TRB instance. |
EFI_SUCCESS | The TRB is executed successfully. |
Others | Some erros happen when executing this request. |