X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fmmc.h;h=cda9a19ce0aab545faf5bc70ced71e34f0a48ad3;hb=29155e735203b28951d0e836f13773defa6e6118;hp=2ad0f191c3bcd3b6ea73c2ef1d74086aeecf7568;hpb=02ebe6f702ec8d025926b0ea7c2088e302c5a302;p=u-boot diff --git a/include/mmc.h b/include/mmc.h index 2ad0f191c3..cda9a19ce0 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -55,13 +55,12 @@ #define MMC_MODE_4BIT (1 << 2) #define MMC_MODE_8BIT (1 << 3) #define MMC_MODE_SPI (1 << 4) -#define MMC_MODE_HC (1 << 5) -#define MMC_MODE_DDR_52MHz (1 << 6) +#define MMC_MODE_DDR_52MHz (1 << 5) #define SD_DATA_4BIT 0x00040000 #define IS_SD(x) ((x)->version & SD_VERSION_SD) -#define IS_MMC(x) ((x)->version & SD_VERSION_MMC) +#define IS_MMC(x) ((x)->version & MMC_VERSION_MMC) #define MMC_DATA_READ 1 #define MMC_DATA_WRITE 2 @@ -70,8 +69,7 @@ #define UNUSABLE_ERR -17 /* Unusable Card */ #define COMM_ERR -18 /* Communications Error */ #define TIMEOUT -19 -#define IN_PROGRESS -20 /* operation is in progress */ -#define SWITCH_ERR -21 /* Card reports failure to switch mode */ +#define SWITCH_ERR -20 /* Card reports failure to switch mode */ #define MMC_CMD_GO_IDLE_STATE 0 #define MMC_CMD_SEND_OP_COND 1 @@ -268,6 +266,28 @@ #define MMC_NUM_BOOT_PARTITION 2 #define MMC_PART_RPMB 3 /* RPMB partition number */ +/* Driver model support */ + +/** + * struct mmc_uclass_priv - Holds information about a device used by the uclass + */ +struct mmc_uclass_priv { + struct mmc *mmc; +}; + +/** + * mmc_get_mmc_dev() - get the MMC struct pointer for a device + * + * Provided that the device is already probed and ready for use, this value + * will be available. + * + * @dev: Device + * @return associated mmc struct pointer if available, else NULL + */ +struct mmc *mmc_get_mmc_dev(struct udevice *dev); + +/* End of driver model support */ + struct mmc_cid { unsigned long psn; unsigned short oid; @@ -356,7 +376,6 @@ struct mmc { char op_cond_pending; /* 1 if we are waiting on an op_cond command */ char init_in_progress; /* 1 if we have done mmc_start_init() */ char preinit; /* start init as early as possible */ - uint op_cond_response; /* the response byte from the last op_cond */ int ddr_mode; };