|
#define | MMC_TRACE(txt) DEBUG((DEBUG_BLKIO, "MMC: " txt "\n")) |
|
#define | MMC_IOBLOCKS_READ 0 |
|
#define | MMC_IOBLOCKS_WRITE 1 |
|
#define | MMC_OCR_POWERUP 0x80000000 |
|
#define | MMC_OCR_ACCESS_MASK 0x3 /* bit[30-29] */ |
|
#define | MMC_OCR_ACCESS_BYTE 0x1 /* bit[29] */ |
|
#define | MMC_OCR_ACCESS_SECTOR 0x2 /* bit[30] */ |
|
#define | MMC_CSD_GET_CCC(Response) (Response[2] >> 20) |
|
#define | MMC_CSD_GET_TRANSPEED(Response) (Response[3] & 0xFF) |
|
#define | MMC_CSD_GET_READBLLEN(Response) ((Response[2] >> 16) & 0xF) |
|
#define | MMC_CSD_GET_WRITEBLLEN(Response) ((Response[0] >> 22) & 0xF) |
|
#define | MMC_CSD_GET_FILEFORMAT(Response) ((Response[0] >> 10) & 0x3) |
|
#define | MMC_CSD_GET_FILEFORMATGRP(Response) ((Response[0] >> 15) & 0x1) |
|
#define | MMC_CSD_GET_DEVICESIZE(csd) (((Response[1] >> 30) & 0x3) | ((Response[2] & 0x3FF) << 2)) |
|
#define | HC_MMC_CSD_GET_DEVICESIZE(Response) ((Response[1] >> 16) | ((Response[2] & 0x40) << 16)); |
|
#define | MMC_CSD_GET_DEVICESIZEMULT(csd) ((Response[1] >> 15) & 0x7) |
|
#define | MMC_R0_READY_FOR_DATA (1 << 8) |
|
#define | MMC_R0_CURRENTSTATE(Response) ((Response[0] >> 9) & 0xF) |
|
#define | MMC_R0_STATE_IDLE 0 |
|
#define | MMC_R0_STATE_READY 1 |
|
#define | MMC_R0_STATE_IDENT 2 |
|
#define | MMC_R0_STATE_STDBY 3 |
|
#define | MMC_R0_STATE_TRAN 4 |
|
#define | MMC_R0_STATE_DATA 5 |
|
#define | EMMC_CMD6_ARG_ACCESS(x) (((x) & 0x3) << 24) |
|
#define | EMMC_CMD6_ARG_INDEX(x) (((x) & 0xFF) << 16) |
|
#define | EMMC_CMD6_ARG_VALUE(x) (((x) & 0xFF) << 8) |
|
#define | EMMC_CMD6_ARG_CMD_SET(x) (((x) & 0x7) << 0) |
|
#define | SWITCH_CMD_DATA_LENGTH 64 |
|
#define | SD_HIGH_SPEED_SUPPORTED 0x20000 |
|
#define | SD_DEFAULT_SPEED 25000000 |
|
#define | SD_HIGH_SPEED 50000000 |
|
#define | SWITCH_CMD_SUCCESS_MASK 0x0f000000 |
|
#define | SD_CARD_CAPACITY 0x00000002 |
|
#define | BUSWIDTH_4 4 |
|
#define | MMC_HOST_INSTANCE_SIGNATURE SIGNATURE_32('m', 'm', 'c', 'h') |
|
#define | MMC_HOST_INSTANCE_FROM_BLOCK_IO_THIS(a) CR (a, MMC_HOST_INSTANCE, BlockIo, MMC_HOST_INSTANCE_SIGNATURE) |
|
#define | MMC_HOST_INSTANCE_FROM_LINK(a) CR (a, MMC_HOST_INSTANCE, Link, MMC_HOST_INSTANCE_SIGNATURE) |
|
|
EFI_STATUS EFIAPI | MmcGetDriverName (IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName) |
|
EFI_STATUS EFIAPI | MmcGetControllerName (IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName) |
|
EFI_STATUS EFIAPI | MmcReset (IN EFI_BLOCK_IO_PROTOCOL *This, IN BOOLEAN ExtendedVerification) |
|
EFI_STATUS EFIAPI | MmcReadBlocks (IN EFI_BLOCK_IO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA Lba, IN UINTN BufferSize, OUT VOID *Buffer) |
|
EFI_STATUS EFIAPI | MmcWriteBlocks (IN EFI_BLOCK_IO_PROTOCOL *This, IN UINT32 MediaId, IN EFI_LBA Lba, IN UINTN BufferSize, IN VOID *Buffer) |
|
EFI_STATUS EFIAPI | MmcFlushBlocks (IN EFI_BLOCK_IO_PROTOCOL *This) |
|
EFI_STATUS | MmcNotifyState (IN MMC_HOST_INSTANCE *MmcHostInstance, IN MMC_STATE State) |
|
EFI_STATUS | InitializeMmcDevice (IN MMC_HOST_INSTANCE *MmcHost) |
|
VOID EFIAPI | CheckCardsCallback (IN EFI_EVENT Event, IN VOID *Context) |
|
VOID | PrintCSD (IN UINT32 *Csd) |
|
VOID | PrintRCA (IN UINT32 Rca) |
|
VOID | PrintOCR (IN UINT32 Ocr) |
|
VOID | PrintResponseR1 (IN UINT32 Response) |
|
VOID | PrintCID (IN UINT32 *Cid) |
|
Main Header file for the MMC DXE driver
Copyright (c) 2011-2015, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Mmc.h.
Retrieves a Unicode string that is the user readable name of the controller that is being managed by a driver.
This function retrieves the user readable name of the controller specified by ControllerHandle and ChildHandle in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the controller name is returned in ControllerName, and EFI_SUCCESS is returned. If the driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle, then EFI_UNSUPPORTED is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned.
- Parameters
-
This | A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or EFI_COMPONENT_NAME_PROTOCOL instance. |
ControllerHandle | The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned. |
ChildHandle | The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller. |
Language | A pointer to a Null-terminated ASCII string array indicating the language. This is the language of the driver name that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in RFC 4646 or ISO 639-2 language code format. |
ControllerName | A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This. |
- Return values
-
EFI_SUCCESS | The Unicode string for the user readable name in the language specified by Language for the driver specified by This was returned in DriverName. |
EFI_INVALID_PARAMETER | ControllerHandle is not a valid EFI_HANDLE. |
EFI_INVALID_PARAMETER | ChildHandle is not NULL and it is not a valid EFI_HANDLE. |
EFI_INVALID_PARAMETER | Language is NULL. |
EFI_INVALID_PARAMETER | ControllerName is NULL. |
EFI_UNSUPPORTED | The driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle. |
EFI_UNSUPPORTED | The driver specified by This does not support the language specified by Language. |
Definition at line 147 of file ComponentName.c.
Retrieves a Unicode string that is the user readable name of the driver.
This function retrieves the user readable name of a driver in the form of a Unicode string. If the driver specified by This has a user readable name in the language specified by Language, then a pointer to the driver name is returned in DriverName, and EFI_SUCCESS is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned.
- Parameters
-
This | A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or EFI_COMPONENT_NAME_PROTOCOL instance. |
Language | A pointer to a Null-terminated ASCII string array indicating the language. This is the language of the driver name that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in RFC 4646 or ISO 639-2 language code format. |
DriverName | A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language. |
- Return values
-
EFI_SUCCESS | The Unicode string for the Driver specified by This and the language specified by Language was returned in DriverName. |
EFI_INVALID_PARAMETER | Language is NULL. |
EFI_INVALID_PARAMETER | DriverName is NULL. |
EFI_UNSUPPORTED | The driver specified by This does not support the language specified by Language. |
Definition at line 72 of file ComponentName.c.