mci: implement command to switch a mmc device to enhanced mode
The command structure allows adding more subcommands and is designed to
match the Linux program mmc from the mmc-utils. So later more commands
can easily be added if need be.

Compared to mmc-utils'

	mmc enh_area set <-y|-n|-c> <start KiB> <length KiB> <device>

the command that is implemented here (

	mmc enh_area [-c] <device>

) is easier to use (because you don't have to check the maximal allowed
size by reading some registers and calculate the available size from
them (which then must be calculated back to register values by the mmc
command)) but less flexible as it doesn't allow all the crazy
possibilities specified in the eMMC standard (yet?) but just creates an
enhanced area with maximal size.

In the future something like

	mmc enh_area -s 30k <device>

could be used to not use the maximal but an explicit size.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 4159407 commit f3db31188849c0f7f603789d125eb60e5f139061
@Uwe Kleine-König Uwe Kleine-König authored on 9 Sep 2019
Sascha Hauer committed on 12 Sep 2019
Showing 4 changed files
View
commands/Kconfig
View
commands/Makefile
View
commands/mmc.c 0 → 100644
View
include/mci.h