UPSTREAM: 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 <>
Signed-off-by: Chris Ball <>
Signed-off-by: Baolin Wang <>
(cherry picked from commit 4af1749d23503c25f692a60f23d295d16ddcfb61)
Signed-off-by: Gwendal Grignou <>

TEST=Compiled, Installed on gnawty

Change-Id: Ie29eb36293ca17bbe65c97ac4c9159463f17dc13
Commit-Ready: Gwendal Grignou <>
Tested-by: Gwendal Grignou <>
Reviewed-by: Grant Grundler <>
4 files changed