summaryrefslogtreecommitdiff
path: root/include/drivers
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@linaro.org>2016-08-02 20:51:27 +0800
committerHaojian Zhuang <haojian.zhuang@linaro.org>2016-08-12 11:41:00 +0800
commit445b1e704ec5734da9e96a44c9d24f50e3da25c0 (patch)
treebd4b85e10530605090a3bd7f901e19f9468b5d40 /include/drivers
parent3d99b17f60142ef96d39759132d4448e138b6c4e (diff)
emmc: support CMD23
Support CMD23. When CMD23 is used, CMD12 could be avoided. Two scenarios: 1. CMD17 for single block, CMD18 + CMD12 for multiple blocks. 2. CMD23 + CMD18 for both single block and multiple blocks. The emmc_init() should initialize whether CMD23 is supported or not. Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Diffstat (limited to 'include/drivers')
-rw-r--r--include/drivers/emmc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/drivers/emmc.h b/include/drivers/emmc.h
index 61d44959..5f78dcef 100644
--- a/include/drivers/emmc.h
+++ b/include/drivers/emmc.h
@@ -49,6 +49,7 @@
#define EMMC_CMD13 13
#define EMMC_CMD17 17
#define EMMC_CMD18 18
+#define EMMC_CMD23 23
#define EMMC_CMD24 24
#define EMMC_CMD25 25
#define EMMC_CMD35 35
@@ -111,6 +112,8 @@
#define EMMC_STATE_BTST 9
#define EMMC_STATE_SLP 10
+#define EMMC_FLAG_CMD23 (1 << 0)
+
typedef struct emmc_cmd {
unsigned int cmd_idx;
unsigned int cmd_arg;
@@ -177,6 +180,7 @@ size_t emmc_erase_blocks(int lba, size_t size);
size_t emmc_rpmb_read_blocks(int lba, uintptr_t buf, size_t size);
size_t emmc_rpmb_write_blocks(int lba, const uintptr_t buf, size_t size);
size_t emmc_rpmb_erase_blocks(int lba, size_t size);
-void emmc_init(const emmc_ops_t *ops, int clk, int bus_width);
+void emmc_init(const emmc_ops_t *ops, int clk, int bus_width,
+ unsigned int flags);
#endif /* __EMMC_H__ */