TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | _EMMC_COMMAND_BLOCK |
struct | _EMMC_STATUS_BLOCK |
struct | _EMMC_COMMAND_PACKET |
struct | EMMC_HC_ADMA_DESC_LINE |
struct | EMMC_HC_SLOT_CAP |
Typedefs | |
typedef struct _EMMC_COMMAND_BLOCK | EMMC_COMMAND_BLOCK |
typedef struct _EMMC_STATUS_BLOCK | EMMC_STATUS_BLOCK |
typedef struct _EMMC_COMMAND_PACKET | EMMC_COMMAND_PACKET |
Functions | |
EFI_STATUS | EmmcPeimHcReset (IN UINTN Bar) |
EFI_STATUS | EmmcPeimHcEnableInterrupt (IN UINTN Bar) |
EFI_STATUS | EmmcPeimHcGetCapability (IN UINTN Bar, OUT EMMC_HC_SLOT_CAP *Capability) |
EFI_STATUS | EmmcPeimHcCardDetect (IN UINTN Bar) |
EFI_STATUS | EmmcPeimHcInitHost (IN UINTN Bar) |
EFI_STATUS | EmmcPeimSwitch (IN EMMC_PEIM_HC_SLOT *Slot, IN UINT8 Access, IN UINT8 Index, IN UINT8 Value, IN UINT8 CmdSet) |
EFI_STATUS | EmmcPeimSetBlkCount (IN EMMC_PEIM_HC_SLOT *Slot, IN UINT16 BlockCount) |
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) |
EFI_STATUS | EmmcPeimIdentification (IN EMMC_PEIM_HC_SLOT *Slot) |
VOID | EmmcPeimFreeTrb (IN EMMC_TRB *Trb) |
Copyright (c) 2015, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EmmcHci.h.
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 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 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 EmmcPeimHcReset | ( | IN UINTN | Bar | ) |
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 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 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 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. |