Skip to contentSkip to conversation

commands: Add MMC ext. CSD register tool

PATCH Applied Daniel Schultz 2 participants 2 messages Sep 7, 2015 – Sep 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v4 4/4 commands: Add MMC ext. CSD register tool

This tools can read/write to the extended CSD register of MMC devices.

---

Changes:
v2:
Changed patch order

v3:
Splitted output in different functions to reduce the indentation. Minimized strings and optimized printfs.
Refactored main function

v4:
Stripped strings

 commands/Kconfig      |   16 +
 commands/Makefile     |    1 +
 commands/mmc_extcsd.c | 2042 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 2059 insertions(+)
 create mode 100644 commands/mmc_extcsd.c
commands/Kconfig +16 -0
index 630cb12..0853ffd 100644
@@ -242,6 +242,22 @@ config CMD_VERSION
 
 	  barebox 2014.05.0-00142-gb289373 #177 Mon May 12 20:35:55 CEST 2014
 
+config CMD_MMC_EXTCSD
+	tristate
+	prompt "read/write eMMC ext. CSD register"
+	depends on MCI
+	help
+	  Read or write the extended CSD register of a MMC device.
+
+	  Usage: mmc_extcsd dev [-r | -i index [-r | -v value -y]]
+
+	  Options:
+		  -i      field index of the register
+		  -r      print the register as raw data
+		  -v      value which will be written
+		  -y      don't request when writing to one time programmable fields
+		  __CAUTION__: this could damage the device!
+
 # end Information commands
 endmenu
 
commands/Makefile +1 -0
index 3d594c3..d985341 100644
@@ -114,3 +114,4 @@ obj-$(CONFIG_CMD_STATE)		+= state.o
 obj-$(CONFIG_CMD_DHCP)		+= dhcp.o
 obj-$(CONFIG_CMD_DHRYSTONE)	+= dhrystone.o
 obj-$(CONFIG_CMD_SPD_DECODE)	+= spd_decode.o
+obj-$(CONFIG_CMD_MMC_EXTCSD)	+= mmc_extcsd.o
commands/mmc_extcsd.c new file +2042 -0

2,042 lines not on this page · raw message

Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 3 lines · Daniel Schultz

This tools can read/write to the extended CSD register of MMC devices.

Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox