Commit 68f490b5 authored by Ben Gardiner's avatar Ben Gardiner Committed by Chris Ball
Browse files

fix printing ENH_START_ADDR



The enhanced user area start field is 4 bytes long
according to the eMMC 4.41 spec.
Signed-off-by: default avatarBen Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 27c357db
...@@ -47,6 +47,10 @@ ...@@ -47,6 +47,10 @@
#define EXT_CSD_RST_N_FUNCTION 162 /* R/W */ #define EXT_CSD_RST_N_FUNCTION 162 /* R/W */
#define EXT_CSD_PARTITIONING_SUPPORT 160 /* RO */ #define EXT_CSD_PARTITIONING_SUPPORT 160 /* RO */
#define EXT_CSD_PARTITION_SETTING_COMPLETED 155 /* R/W */ #define EXT_CSD_PARTITION_SETTING_COMPLETED 155 /* R/W */
#define EXT_CSD_ENH_START_ADDR_3 139
#define EXT_CSD_ENH_START_ADDR_2 138
#define EXT_CSD_ENH_START_ADDR_1 137
#define EXT_CSD_ENH_START_ADDR_0 136
#define EXT_CSD_NATIVE_SECTOR_SIZE 63 /* R */ #define EXT_CSD_NATIVE_SECTOR_SIZE 63 /* R */
#define EXT_CSD_USE_NATIVE_SECTOR 62 /* R/W */ #define EXT_CSD_USE_NATIVE_SECTOR 62 /* R/W */
#define EXT_CSD_DATA_SECTOR_SIZE 61 /* R */ #define EXT_CSD_DATA_SECTOR_SIZE 61 /* R */
......
...@@ -746,9 +746,13 @@ int do_read_extcsd(int nargs, char **argv) ...@@ -746,9 +746,13 @@ int do_read_extcsd(int nargs, char **argv)
printf("Enhanced User Data Area Size" printf("Enhanced User Data Area Size"
" [ENH_SIZE_MULT]: 0x%06x\n", (ext_csd[142] << 16) | " [ENH_SIZE_MULT]: 0x%06x\n", (ext_csd[142] << 16) |
(ext_csd[141] << 8) | ext_csd[140]); (ext_csd[141] << 8) | ext_csd[140]);
reg = (ext_csd[EXT_CSD_ENH_START_ADDR_3] << 24) |
(ext_csd[EXT_CSD_ENH_START_ADDR_2] << 16) |
(ext_csd[EXT_CSD_ENH_START_ADDR_1] << 8) |
ext_csd[EXT_CSD_ENH_START_ADDR_0];
printf("Enhanced User Data Start Address" printf("Enhanced User Data Start Address"
" [ENH_START_ADDR]: 0x%06x\n", (ext_csd[139] << 16) | " [ENH_START_ADDR]: 0x%06x\n", reg);
(ext_csd[138] << 8) | ext_csd[137]);
/* A441]: reserved [135] */ /* A441]: reserved [135] */
printf("Bad Block Management mode" printf("Bad Block Management mode"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment