summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Nelson <eric@nelint.com>2015-12-07 07:50:01 -0700
committerYe Li <ye.li@nxp.com>2016-08-09 20:07:48 +0800
commite70669851349407f2bc841aaf7a0b7fc079bd8c3 (patch)
treef81ac396a300d04ca25f2bb3da1a8fe67ddd9c75 /include
parentced0fbbd84ddf43f8d06db1bff6e0f4b5258537e (diff)
downloadu-boot-imx-e70669851349407f2bc841aaf7a0b7fc079bd8c3.zip
u-boot-imx-e70669851349407f2bc841aaf7a0b7fc079bd8c3.tar.gz
u-boot-imx-e70669851349407f2bc841aaf7a0b7fc079bd8c3.tar.bz2
mmc: update MMC_ERASE argument to match Linux kernel.
Table 41 of the JEDEC standard for eMMC says that bit 31 of the command argument is obsolete when issuing the ERASE command (CMD38) on page 115 of this document: http://www.jedec.org/sites/default/files/docs/jesd84-B45.pdf The SD Card Association Physical Layer Simplified Specification also makes no mention of the use of bit 31. https://www.sdcard.org/downloads/pls/part1_410.pdf The Linux kernel distinguishes between secure (bit 31 set) and non-secure erase, and this patch copies the macro names from include/linux/mmc/core.h. Tested-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Eric Nelson <eric@nelint.com> Tested-by: Hector Palacios <hector.palacios@digi.com> (cherry picked from commit 1aa2d074a7acda61eb43e654ced21c139703633c)
Diffstat (limited to 'include')
-rw-r--r--include/mmc.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/mmc.h b/include/mmc.h
index 2ad0f19..7f717c4 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -123,7 +123,12 @@
#define OCR_VOLTAGE_MASK 0x007FFF80
#define OCR_ACCESS_MODE 0x60000000
-#define SECURE_ERASE 0x80000000
+#define MMC_ERASE_ARG 0x00000000
+#define MMC_SECURE_ERASE_ARG 0x80000000
+#define MMC_TRIM_ARG 0x00000001
+#define MMC_DISCARD_ARG 0x00000003
+#define MMC_SECURE_TRIM1_ARG 0x80000001
+#define MMC_SECURE_TRIM2_ARG 0x80008000
#define MMC_STATUS_MASK (~0x0206BF7F)
#define MMC_STATUS_SWITCH_ERROR (1 << 7)