summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLuke Wang <[email protected]>2025-03-25 16:29:14 +0800
committerPeng Fan <[email protected]>2025-04-11 11:51:04 +0800
commit7550bfdbf41b721f750a62b87a42a3329a2e2f81 (patch)
tree3c8389415634fd77ea9a7f5f0f13c418613875e1 /include
parentd99f8d2d749c0e1b352766281f5f5d71fa845f76 (diff)
mmc: mmc_boot: Support Sandisk and Micron eMMC BOOT/RPMB hardware partition resizing
Current mmc bootpart-resize command only support Samsung eMMC BOOT/RPMB hardware partition resizing. Add Sandisk and Micron eMMC BOOT/RPMB hardware partition resizing support. The commands and parameters for resizing partitions are different for each manufacturer. Select the corresponding function according to CID. Signed-off-by: Luke Wang <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Peng Fan <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/mmc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index 233a1d69afd..52cacfd0eab 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -79,6 +79,10 @@ struct bd_info;
#define IS_SD(x) ((x)->version & SD_VERSION_SD)
#define IS_MMC(x) ((x)->version & MMC_VERSION_MMC)
+#define CID_MANFID_MICRON 0x13
+#define CID_MANFID_SAMSUNG 0x15
+#define CID_MANFID_SANDISK 0x45
+
#define MMC_DATA_READ 1
#define MMC_DATA_WRITE 2
@@ -112,6 +116,7 @@ struct bd_info;
#define MMC_CMD62_ARG1 0xefac62ec
#define MMC_CMD62_ARG2 0xcbaea7
+#define MMC_CMD62_ARG_SANDISK 0x254ddec4
#define SD_CMD_SEND_RELATIVE_ADDR 3
#define SD_CMD_SWITCH_FUNC 6
@@ -205,6 +210,7 @@ static inline bool mmc_is_tuning_cmd(uint cmdidx)
/*
* EXT_CSD fields
*/
+#define EXT_CSD_BOOT_SIZE_MULT_MICRON 125 /* R/W, vendor specific field */
#define EXT_CSD_ENH_START_ADDR 136 /* R/W */
#define EXT_CSD_ENH_SIZE_MULT 140 /* R/W */
#define EXT_CSD_GP_SIZE_MULT 143 /* R/W */