mmc-utils: Merge the lsmmc tool into mmc-utils
The lsmmc tools contains an extensive parser of the CID, CSD, SCR registers from userspace. The utility works as-is and uses sysfs to read the register values. The original code is created by Sebastian Rasmussen and still lives in an attachment in the mail archive of linux-mmc. It need to be merged into mmc-utils repository, which is convenient for testing MMC device from userspace. Change since v3: - Remove the unused EXT_CSD parser in lsmmc.c file. Signed-off-by: Sebastian Rasmussen <sebras@gmail.com> Signed-off-by: Chris Ball <chris@printf.net> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
This commit is contained in:
1 parent
44f94b9258
commit
4af1749d23
4 files changed
+2429
No files matched your search
@@ -4,6 +4,7 @@ CFLAGS ?= -g -O2
|
||||
objects = \
|
||||
mmc.o \
|
||||
mmc_cmds.o \
|
||||
lsmmc.o \
|
||||
3rdparty/hmac_sha/hmac_sha2.o \
|
||||
3rdparty/hmac_sha/sha2.o
|
||||
|
||||
|
||||
@@ -175,6 +175,24 @@ static struct Command commands[] = {
|
||||
"NOTE! The cache is an optional feature on devices >= eMMC4.5.",
|
||||
NULL
|
||||
},
|
||||
{ do_read_csd, -1,
|
||||
"csd read", "<device path>\n"
|
||||
"Print CSD data from <device path>.\n"
|
||||
"The device path should specify the csd file directory.",
|
||||
NULL
|
||||
},
|
||||
{ do_read_cid, -1,
|
||||
"cid read", "<device path>\n"
|
||||
"Print CID data from <device path>.\n"
|
||||
"The device path should specify the cid file directory.",
|
||||
NULL
|
||||
},
|
||||
{ do_read_scr, -1,
|
||||
"scr read", "<device path>\n"
|
||||
"Print SCR data from <device path>.\n"
|
||||
"The device path should specify the scr file directory.",
|
||||
NULL
|
||||
},
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
@@ -36,3 +36,6 @@ int do_rpmb_read_block(int nargs, char **argv);
|
||||
int do_rpmb_write_block(int nargs, char **argv);
|
||||
int do_cache_en(int nargs, char **argv);
|
||||
int do_cache_dis(int nargs, char **argv);
|
||||
int do_read_scr(int argc, char **argv);
|
||||
int do_read_cid(int argc, char **argv);
|
||||
int do_read_csd(int argc, char **argv);
|
||||
Reference in new issue
Block a user