summaryrefslogtreecommitdiffstats
path: root/commands/mmc_extcsd.c
Commit message (Collapse)AuthorAgeFilesLines
* mmc: fix calculation of Max Enhanced AreaSchoyswohl, Roland2023-04-051-1/+1
| | | | | | | | | According extcsd documentation, the HC_ERASE_GRP_SIZE must be multiplied by HC_ERASE_GRP_SIZE and not added. Signed-off-by: Roland Schoyswohl roland.schoyswohl@ife-doors.com Link: https://lore.barebox.org/AM6PR04MB472829B69D627CA15218927EA2879@AM6PR04MB4728.eurprd04.prod.outlook.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: mmc_extcsd: print_field: fix layoutJuergen Borleis2020-09-141-1/+1
| | | | | Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: mmc_extcsd: print_field: fix 32 bit overflowJuergen Borleis2020-09-141-8/+15
| | | | | Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/*: Replace license and copyright boilerplate by SPDX identfiersUwe Kleine-König2020-04-271-16/+4
| | | | | | | | | | | | | While at it also drop references to the non-existing CREDITS file and do some small rearrangements for some uniform formatting. (SPDX-License-Identifier first, then copyright texts and then an empty line.) The advantage is that these specifiers are machine-parseable which helps license conformance. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* mci: provide wrapper for mci_get_device_by_name ∘ devpath_to_nameUwe Kleine-König2019-09-121-3/+3
| | | | | | | | Also convert the only user of mci_get_device_by_name to this new wrapper. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: mmc_extcsd: describe missing bitAhmad Fatoum2019-08-301-2/+9
| | | | | | | | | | The EXT_CSD_EXCEPTION_EVENTS_STATUS array entry is wrongly duplicated. Replace the index by the correct field at byte offset 58[1]. [1]: See http://webshop.atlantiksysteme.de/temp/FLEXXONeMMC4.5pSLCSPECV1.2.pdf Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: mmc_extcsd: fix extcsd value meaningsMarco Felsch2019-06-181-4/+4
| | | | | | | | | As specified by the JEDEC Standard No. 84-A441 the RESET_BOOT_BUS_WIDTH (Bit[2]) is specified the other way around. Also the BOOT_MODE is a two bit register. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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>