SD : Updated CMD 6 implememtation.
For setting high speed in SD card, First CMD 6 (Switch) is send to check if card supports High Speed and Second command is send to switch card to high speed mode. In current inplementation, CMD 6 was sent only once to switch the card into HS mode without checking if card supports HS or not, which is not as per specification and also we are not setting the HS i.e. 50000000 but directly asking the card to switch to 26000000 which is incorrect as SD card supports either 25000000 or 50000000. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Reviewed-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
committed by
Leif Lindholm
parent
3d43616632
commit
ea21f1d98d
@@ -64,6 +64,14 @@
|
||||
#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 BUSWIDTH_4 4
|
||||
|
||||
typedef enum {
|
||||
UNKNOWN_CARD,
|
||||
MMC_CARD, //MMC card
|
||||
|
Reference in New Issue
Block a user