summaryrefslogtreecommitdiffstats
path: root/commands/mmc_extcsd.c
Commit message (Collapse)AuthorAgeFilesLines
* commands: mmc_extcsd: Make use of devpath_to_name()Andrey Smirnov2018-06-251-3/+2
| | | | | Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mmc_extcsd command: Add cmd option to set bkops-enableChristoph Fritz2018-06-201-3/+23
| | | | | | | | This patch is for convenience to set bkops-enable (EXT_CSD_BKOPS_EN[163]) on devices which have it not yet activated. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: mmc_extcsd: Add support to write multibyte registersTeresa Remmet2018-06-081-17/+27
| | | | | | | | | It has been possible to write only the first byte of a multibyte register. Updated the command to write the complete value of a multibyte register at once. Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Reviewed-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: drop unused parameter from mci_switch()Uwe Kleine-König2018-01-221-1/+1
| | | | | | | | | | | | | | | | | | | The SWITCH command has two purposes: a) switch the command set b) Write to the EXT_CSD register If the access field (bits [25:24]) in the argument are b00, we're in case a), otherwise in b). As mci_switch() always passes MMC_SWITCH_MODE_WRITE_BYTE (0b3) in the access field, only case b) is relevant here. According to the eMMC specification[1] the command set field is ignored in case b) and so the respective parameter (that is unused already now) can be dropped. [1] Embedded Multi-Media Card (e•MMC) Electrical Standard (5.1), February 2015; paragraph 6.6.1 Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mmc_extcsd command: reworkSascha Hauer2017-07-061-1185/+1598
| | | | | | | | | | | | | | | | | | This patch is a rework of the mmc_extcsd command: - Always print registers. Previously we never printed registers that were already present in an older version of the spec - Put register names, access type and width into an array indexed by the register number - Print multibyte registers only once with the resulting value, and not bytewise. There's still more to cleanup, like for example we want to write multibyte registers once with the complete value, not bytewise. Anyway, this is a start. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* mmc_extcsd command: Fix multiline printsSascha Hauer2017-07-061-15/+14
| | | | | | | | The multiline prints lack the indention at the beginning of the second line. Add these. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* commands/mmc_extcsd: Relicense under GPLv2+Sascha Hauer2017-03-011-1/+1
| | | | | | | | GPLv3 is incompatible with the projects license. Relicense file under GPLv2+ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Daniel Schultz <d.schultz@phytec.de>
* commands: mmc_extcsd: Fix incorrect usage of sprintfAndrey Smirnov2016-04-281-33/+46
| | | | | | | | | | In a number of places print_field_ge_v7() and print_field() function would call sprintf() without providing is with appropriate output buffer (str is initialized to NULL). Replace the sprintf() with basprintf() to fix that. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* stdio: rename getc to getcharSascha Hauer2016-04-151-2/+2
| | | | | | | The function we have implemented as getc has the semantics of the standard function getchar, so rename it accorgingly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: Add MMC ext. CSD register toolDaniel Schultz2015-09-241-0/+2042
This tools can read/write to the extended CSD register of MMC devices. Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>