Commit Graph
18 Commits
Author SHA1 Message Date
Oleg Matcovschi 294bf86972 mmc-utils: Remove dependency on linux/major.h.
We require only MMC_BLOCK_MAJOR which is constant.

Signed-off-by: Oleg Matcovschi <olegm@lab126.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-06-27 11:11:04 -04:00
Mario Schuknecht 8c0c40d477 mmc-utils: small fixes of output
Improve "extcsd read" output of the registers.
Right-shift by 3 of EXT_CSD_BOOT_CFG_EN bits.
Expand the EXT_CSD_BOOT_CFG_ACC bit mask to 0x7.
Add case 3 RPMB partition.

Signed-off-by: Mario Schuknecht <mario.schuknecht@dresearch-fe.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-06-27 10:34:27 -04:00
Yaniv Gardi 21bb473fc5 Add method for triggering Sanitize command
This patch adds a method to trigger Sanitize command to MMC.
The Sanitize command is used for deleting the unmapped memory region
of the MMC device.

Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Acked-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-05-26 13:27:05 -04:00
Yaniv Gardi 1fc81f3a41 mmc-utils: adding support for Android compilation
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-05-26 13:22:32 -04:00
Chris Ball f74dfe23cd Support enable/disable of eMMC H/W Reset function
(Note: one-time programmable fuse.)

$ mmc hwreset enable /dev/mmcblk0
$ mmc hwreset disable /dev/mmcblk0
2012-10-19 17:28:08 -04:00
Chris Ball bf4ae7d4e9 Add .gitignore for binaries 2012-10-19 16:13:43 -04:00
Chris Ball 6599780fda Improve/clarify usage descriptions 2012-09-21 18:19:25 +08:00
Chris Ball d4faeabb78 Turn on gcc optimization (-O2)
This is required by distros that use Fortify.
2012-09-21 18:16:22 +08:00
Jaehoon Chung 8649651b74 Add method for enabling bkops via one-time fuse.
This patch added the method to enable the bkops.
In ext_csd register, BKOPS_EN bit is one-time programable.
So if you want to use the bkops, use the this command.

$ mmc bkops enable /dev/mmcblk0

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewd-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-09-21 18:15:23 +08:00
Saugata Das b7e2599c67 Add support for disabling 512B emulation
In this patch, we add a utility to disable emulation mode in eMMC-4.5.
This is done to increase the data sector size to 4KB.

Signed-off-by: Saugata Das <saugata.das@linaro.org>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-05-17 09:31:12 -04:00
Chris Ball 8ba4466a4a Fix usage strings after command renaming 2012-05-17 09:21:36 -04:00
Giuseppe CAVALLARO 7bd1320b2c Add new "bootpart enable" command to enable boot partitions
This adds a new option to enable the boot from eMMC
by writing to the 179 ext_csd register.

The example below shows as to enable the mmcblk0boot0
partition and also set/reset the ACK bit).

$ ./mmc bootpart enable 1 1 /dev/mmcblk0boot0
$ ./mmc extcsd read /dev/mmcblk0boot0 | grep PARTITION_CON
Boot configuration bytes [PARTITION_CONFIG: 0x49]

Reported-by: Youssef TRIKI <youssef.triki@st.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-05-17 09:21:33 -04:00
Chris Ball b9c7a17fce Rename extcsd read/write to writeprotect get/set
This leaves "extcsd read" pointing to Giuseppe's code.  Also, abstract
out the writeprotect code so that there's only one shared implementation
in print_writeprotect_status(), used by both "extcsd read" and
"writeprotect get".

Signed-off-by: Chris Ball <cjb@laptop.org>
2012-02-20 12:34:25 -05:00
Giuseppe CAVALLARO a5bf4a2030 improve the parsing of the EXT_CSD registers
This patch enhances the debug information reported
for the mmc card by parsing the extended CSD registers
obviously according to all the current specifications.

I have no HW to test eMMC 4.5 at this moment. In any case,
the patch supports JEDEC Standard No. 84-B45.
No issues on JESD84-A441 and older specs raised on my side.

This patch indeed want to start providing a full parsing
of the all EXT_CSD registers in the following layout:

Name [FIELD: <value>]

Voluntarily, I added the FIELD because it can actually help on
searching though the SPEC in case of doubts.
In fact, in this stage, not all the register bits are yet parsed.
Currently this has been done for a small subset of registers
(e.g. 173, 160 ...) where IMO it's quite useful for an end-user
to get some details. I do hope this will be improved in the near
feature (also for write operations).

P.S. The original patch posted time ago for the Kernel has been
reviewed-by Sebastian Rasmussen, acked-by: Linus Walleij and reported
by Youssef Tiki.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-02-20 12:14:32 -05:00
Chris Ball 7a39ed3893 Remove unneeded dependency on libuuid.
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-02-16 15:41:02 -05:00
Chris Ball 45541d55fa Hook up "mmc extcsd read/write" commands.
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-02-12 12:03:30 -05:00
Johan RUDHOLM a8bfde77e0 Add extcsd write-protect read/write code
This was posted to linux-mmc@ by Johan Rudholm.

Signed-off-by: Chris Ball <cjb@laptop.org>
2012-02-12 11:52:25 -05:00
Goffredo Baroncelli 80d2660fa9 Create "mmc" utility
This commit was made by Chris Ball, but reuses framework code from
Goffredo's btrfs-progs/btrfs.c.

Signed-off-by: Chris Ball <cjb@laptop.org>
2012-02-12 11:43:14 -05:00