TianoCore EDK2 master
|
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/TimerLib.h>
#include "Mmc.h"
Go to the source code of this file.
Data Structures | |
union | OCR_RESPONSE |
Macros | |
#define | MAX_RETRY_COUNT 1000 |
#define | CMD_RETRY_COUNT 20 |
#define | RCA_SHIFT_OFFSET 16 |
#define | EMMC_CARD_SIZE 512 |
#define | EMMC_ECSD_SIZE_OFFSET 53 |
#define | EXTCSD_BUS_WIDTH 183 |
#define | EXTCSD_HS_TIMING 185 |
#define | EMMC_TIMING_BACKWARD 0 |
#define | EMMC_TIMING_HS 1 |
#define | EMMC_TIMING_HS200 2 |
#define | EMMC_TIMING_HS400 3 |
#define | EMMC_BUS_WIDTH_1BIT 0 |
#define | EMMC_BUS_WIDTH_4BIT 1 |
#define | EMMC_BUS_WIDTH_8BIT 2 |
#define | EMMC_BUS_WIDTH_DDR_4BIT 5 |
#define | EMMC_BUS_WIDTH_DDR_8BIT 6 |
#define | EMMC_SWITCH_ERROR (1 << 7) |
#define | SD_BUS_WIDTH_1BIT (1 << 0) |
#define | SD_BUS_WIDTH_4BIT (1 << 2) |
#define | SD_CCC_SWITCH (1 << 10) |
#define | DEVICE_STATE(x) (((x) >> 9) & 0xf) |
Typedefs | |
typedef enum _EMMC_DEVICE_STATE | EMMC_DEVICE_STATE |
Functions | |
STATIC EFI_STATUS EFIAPI | EmmcGetDeviceState (IN MMC_HOST_INSTANCE *MmcHostInstance, OUT EMMC_DEVICE_STATE *State) |
STATIC EFI_STATUS EFIAPI | EmmcSetEXTCSD (IN MMC_HOST_INSTANCE *MmcHostInstance, UINT32 ExtCmdIndex, UINT32 Value) |
STATIC EFI_STATUS EFIAPI | EmmcIdentificationMode (IN MMC_HOST_INSTANCE *MmcHostInstance, IN OCR_RESPONSE Response) |
STATIC EFI_STATUS | InitializeEmmcDevice (IN MMC_HOST_INSTANCE *MmcHostInstance) |
STATIC UINT32 | CreateSwitchCmdArgument (IN UINT32 Mode, IN UINT8 Group, IN UINT8 Value) |
STATIC EFI_STATUS | InitializeSdMmcDevice (IN MMC_HOST_INSTANCE *MmcHostInstance) |
STATIC EFI_STATUS EFIAPI | MmcIdentificationMode (IN MMC_HOST_INSTANCE *MmcHostInstance) |
EFI_STATUS | InitializeMmcDevice (IN MMC_HOST_INSTANCE *MmcHostInstance) |
Variables | |
UINT32 | mEmmcRcaCount = 0 |
Copyright (c) 2011-2015, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file MmcIdentification.c.
#define CMD_RETRY_COUNT 20 |
Definition at line 21 of file MmcIdentification.c.
#define DEVICE_STATE | ( | x | ) | (((x) >> 9) & 0xf) |
Definition at line 47 of file MmcIdentification.c.
#define EMMC_BUS_WIDTH_1BIT 0 |
Definition at line 34 of file MmcIdentification.c.
#define EMMC_BUS_WIDTH_4BIT 1 |
Definition at line 35 of file MmcIdentification.c.
#define EMMC_BUS_WIDTH_8BIT 2 |
Definition at line 36 of file MmcIdentification.c.
#define EMMC_BUS_WIDTH_DDR_4BIT 5 |
Definition at line 37 of file MmcIdentification.c.
#define EMMC_BUS_WIDTH_DDR_8BIT 6 |
Definition at line 38 of file MmcIdentification.c.
#define EMMC_CARD_SIZE 512 |
Definition at line 23 of file MmcIdentification.c.
#define EMMC_ECSD_SIZE_OFFSET 53 |
Definition at line 24 of file MmcIdentification.c.
#define EMMC_SWITCH_ERROR (1 << 7) |
Definition at line 40 of file MmcIdentification.c.
#define EMMC_TIMING_BACKWARD 0 |
Definition at line 29 of file MmcIdentification.c.
#define EMMC_TIMING_HS 1 |
Definition at line 30 of file MmcIdentification.c.
#define EMMC_TIMING_HS200 2 |
Definition at line 31 of file MmcIdentification.c.
#define EMMC_TIMING_HS400 3 |
Definition at line 32 of file MmcIdentification.c.
#define EXTCSD_BUS_WIDTH 183 |
Definition at line 26 of file MmcIdentification.c.
#define EXTCSD_HS_TIMING 185 |
Definition at line 27 of file MmcIdentification.c.
#define MAX_RETRY_COUNT 1000 |
Definition at line 20 of file MmcIdentification.c.
#define RCA_SHIFT_OFFSET 16 |
Definition at line 22 of file MmcIdentification.c.
#define SD_BUS_WIDTH_1BIT (1 << 0) |
Definition at line 42 of file MmcIdentification.c.
#define SD_BUS_WIDTH_4BIT (1 << 2) |
Definition at line 43 of file MmcIdentification.c.
#define SD_CCC_SWITCH (1 << 10) |
Definition at line 45 of file MmcIdentification.c.
enum _EMMC_DEVICE_STATE |
Definition at line 48 of file MmcIdentification.c.
Definition at line 328 of file MmcIdentification.c.
STATIC EFI_STATUS EFIAPI EmmcGetDeviceState | ( | IN MMC_HOST_INSTANCE * | MmcHostInstance, |
OUT EMMC_DEVICE_STATE * | State | ||
) |
Definition at line 67 of file MmcIdentification.c.
STATIC EFI_STATUS EFIAPI EmmcIdentificationMode | ( | IN MMC_HOST_INSTANCE * | MmcHostInstance, |
IN OCR_RESPONSE | Response | ||
) |
Definition at line 141 of file MmcIdentification.c.
STATIC EFI_STATUS EFIAPI EmmcSetEXTCSD | ( | IN MMC_HOST_INSTANCE * | MmcHostInstance, |
UINT32 | ExtCmdIndex, | ||
UINT32 | Value | ||
) |
Definition at line 106 of file MmcIdentification.c.
STATIC EFI_STATUS InitializeEmmcDevice | ( | IN MMC_HOST_INSTANCE * | MmcHostInstance | ) |
Definition at line 259 of file MmcIdentification.c.
EFI_STATUS InitializeMmcDevice | ( | IN MMC_HOST_INSTANCE * | MmcHostInstance | ) |
Definition at line 785 of file MmcIdentification.c.
STATIC EFI_STATUS InitializeSdMmcDevice | ( | IN MMC_HOST_INSTANCE * | MmcHostInstance | ) |
Definition at line 345 of file MmcIdentification.c.
STATIC EFI_STATUS EFIAPI MmcIdentificationMode | ( | IN MMC_HOST_INSTANCE * | MmcHostInstance | ) |
Definition at line 542 of file MmcIdentification.c.
UINT32 mEmmcRcaCount = 0 |
Definition at line 62 of file MmcIdentification.c.