summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeng Fan <[email protected]>2016-09-01 11:13:38 +0800
committerJaehoon Chung <[email protected]>2016-09-20 06:46:01 +0900
commit3697e5992f89c923aca17d7d9174739da28cb3cd (patch)
tree313951270679bb594c1c8e1d5b3648500d341654 /include
parent65a25b2086a77cfdd9c727d749c18341b1161f71 (diff)
mmc: sd: extracting erase related information from sd status
Add function to read SD_STATUS information. According to the information, get erase_timeout/erase_size/erase_offset. Add a structure sd_ssr to include the erase related information. Signed-off-by: Peng Fan <[email protected]> Cc: Jaehoon Chung <[email protected]> Cc: Simon Glass <[email protected]> Cc: Bin Meng <[email protected]> Cc: Stefan Wahren <[email protected]> Cc: Clemens Gruber <[email protected]> Cc: Kever Yang <[email protected]> Cc: Eric Nelson <[email protected]> Cc: Stephen Warren <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/mmc.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index aa6d5d1d4ff..e815eb3736c 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -11,6 +11,7 @@
#define _MMC_H_
#include <linux/list.h>
+#include <linux/sizes.h>
#include <linux/compiler.h>
#include <part.h>
@@ -102,6 +103,7 @@
#define SD_CMD_SWITCH_UHS18V 11
#define SD_CMD_APP_SET_BUS_WIDTH 6
+#define SD_CMD_APP_SD_STATUS 13
#define SD_CMD_ERASE_WR_BLK_START 32
#define SD_CMD_ERASE_WR_BLK_END 33
#define SD_CMD_APP_SEND_OP_COND 41
@@ -392,6 +394,12 @@ struct mmc_config {
unsigned char part_type;
};
+struct sd_ssr {
+ unsigned int au; /* In sectors */
+ unsigned int erase_timeout; /* In milliseconds */
+ unsigned int erase_offset; /* In milliseconds */
+};
+
/*
* With CONFIG_DM_MMC enabled, struct mmc can be accessed from the MMC device
* with mmc_get_mmc_dev().
@@ -426,6 +434,7 @@ struct mmc {
uint write_bl_len;
uint erase_grp_size; /* in 512-byte sectors */
uint hc_wp_grp_size; /* in 512-byte sectors */
+ struct sd_ssr ssr; /* SD status register */
u64 capacity;
u64 capacity_user;
u64 capacity_boot;