Commit Graph
62 Commits
Author SHA1 Message Date
Shankar Athanikar fd41dca5b1 mmc_cmds: Display BARRIER_CTRL Status when printing EXT_CSD
The status of BARRIER_CTRL can be read from this byte: EXT_CSD[31](R/W)
Signed-off-by: Shankar Athanikar <shankar.ma@samsung.com>
Reviewed-by: <mohanraj.v@samsung.com>
Link: https://lore.kernel.org/r/20211224111917.707440-1-shankar.ma@samsung.com
[Ulf: Cleaned up whitespace and corrected sob-tag]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2022-01-25 18:29:56 +01:00
Quentin Schulz 3969aa4804 mmc_cmds: add HS400 data rates
JEDEC 5.1 JESD84-B50.1 DEVICE_TYPE [196] specifies that bit 6 is for
"HS400 Dual Data Rate e•MMC at 200 MHz – 1.8 V I/O" and bit 7 for
"HS400 Dual Data Rate e•MMC at 200 MHz – 1.2 V I/O" so let's add those.

Cc: Quentin Schulz <foss+kernel@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Link: https://lore.kernel.org/r/20211202161910.3944640-1-quentin.schulz@theobroma-systems.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-12-20 11:04:18 +01:00
Oleh Kravchenko a1b233c2a3 mmc-utils: Use printf() to extract and print fw version
This patch also fixes a compile error with a newer version of GCC:
error: '__builtin_strncpy' output may be truncated copying 8 bytes from
a string of length 511 [-Werror=stringop-truncation]

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Fixes: 0eea71e4f2 (mmc-utils: Fix for Firmware Version string printing)
Link: https://lore.kernel.org/r/20211130142715.11014-1-oleg@kaa.org.ua
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-12-02 15:23:52 +01:00
Bean Huo ad3fb9fe14 mmc-utils: Add note for CMDQ_MODE_EN runtime value
Since the Linux kernel commit 70b52f090805 ("mmc: block: Disable CMDQ on
the ioctl path"), CMDQ in CMDQ_MODE_EN[15] is disabled before reading EXT_CSD.
Therefore, it is more accurate to use sysfs node to check CMDQ_MODE_EN value.
Add a note print to highlight.

Signed-off-by: Bean Huo <beanhuo@micron.com>
Acked-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20211114204331.39555-3-huobean@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-11-15 15:59:55 +01:00
Kimito Sakata 0eea71e4f2 mmc-utils: Fix for Firmware Version string printing
Added a local buffer to create a NULL terminated string to print the
Firmware Version instead of attempting to print directly from
ext_csd buffer. The last byte of the Firmware Version field may not
be NULL and the next field may also not be which may cause it to
print garbage.

Tested on x86 platform.

Signed-off-by: Kimito Sakata <kimito.sakata@oracle.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Fixes: 89cd01ed86 (mmc_utils: add ffu support)
Link: https://lore.kernel.org/r/20210713053458.1441-1-oracleks043021@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-08-24 10:57:33 +02:00
Kimito Sakata 43282e80e1 mmc-utils: Add eMMC erase command support
we have been using this erase feature for a while, but it is
still not merged into the upstream mmc-utils. Especially, for
the customer, every time when they update the mmc-utils, they
should re-install this patch again, let's try to make this
erase command upstreamed in the mmc-utils.

We need to send 3 MMC commands and it is important that they
stay in sequence. Therefore we are using MMC_IOC_MULTI_CMD.

Co-developed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Kimito Sakata <kimito.sakata@oracle.com>
Reviewed-by: Kenneth Gibbons <kenny.gibbons@oracle.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20210506191041.1178-1-oracleks043021@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-05-11 12:45:55 +02:00
Stephane Fillod e9654ebc4a Various fixes
These warnings were mainly found using cppcheck.

Signed-off-by: Stephane Fillod <f8cfe@free.fr>
Reviewed-by: Michael Heimpold <mhei@heimpold.de>
Link: https://lore.kernel.org/r/1254580747.16828401.1547561163645.JavaMail.root@zimbra64-e11.priv.proxad.net
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-03-30 15:28:34 +02:00
Fabrice Fontaine 520f54eb94 mmc_cmds.c: fix build with gcc 4.9
Fix following error with gcc 4.9:

mmc_cmds.c:1918:9: error: missing braces around initializer [-Werror=missing-braces]
  struct rpmb_frame frame_status = {0};

Fixes:
 - http://autobuild.buildroot.org/results/bf3b6f9f6ef39b99842b3c92495b7bf359c68158

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Link: https://lore.kernel.org/r/20190928185107.21125-1-fontaine.fabrice@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-03-30 15:17:07 +02:00
Lars Pedersen ad6890a2dd mmc-utils: Add AUTO_EN support in the BKOPS_EN
This patch adds support to enable auto(AUTO_EN) and
manual(MANUAL_EN) in BKOPS_EN register. Auto bkops
can only be used on eMMC 5.0 or newer.

Signed-off-by: Lars Pedersen <lapeddk@gmail.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20191111110051.16490-1-lapeddk@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-03-30 15:12:23 +02:00
Julius Werner be4cac34ea mmc-utils: Expand 'writeprotect boot'
This patch updates 'mmc writeprotect boot set' with a few more optional
parameters, so that it can be used to enable permanent write-protection
and so that the two boot partitions can be protected independently. It
also splits protection information output by 'mmc writeprotect boot get'
by partition.

(Note: eMMC boot partitions are named "Area 1" and "Area 2" by the eMMC
spec, but mmcblk0boot0 and mmcblk0boot1 by Linux. To avoid confusion
between the two numbering schemes, this patch uses 0 and 1 throughout,
even when defining EXT_CSD register bits.)

Signed-off-by: Julius Werner <jwerner@chromium.org>
Link: https://lore.kernel.org/r/20200316202221.107714-1-jwerner@chromium.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-03-30 15:09:25 +02:00
Patrick Oppenlander 5b3e56f708 mmc-utils: Fix scaling of cache size
JESD84-B51 7.4.30 CACHE_SIZE [252:249] states that "the size is
indicated as multiple of kilobits". This is also supported by Table 39,
"e.MMC internal sizes and related Units / Granularities" which lists
"32Kb (=4KB)" as the cache size granularity for 4KiB native devices.

Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20200401221453.267360-1-patrick.oppenlander@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-03-30 15:05:57 +02:00
John Ernberg 271bdfc6f2 rpmb: Zero-init MMC_IOC_MULTI_CMD structures
On our board we would occationally see what looked like a
kernel hang while doing RPMB operations, some additional
printk debugging revealed that in the trouble case data
such as this was being sent to the kernel:

    [  109.076981] idata[0]->ic->opcode = 0x19
    [  109.077027] idata[0]->ic->arg = 0x0
    [  109.080954] idata[0]->ic->write_flag = 0x1
    [  109.084691] idata[0]->ic->is_acmd = 0x0
    [  109.089007] idata[0]->ic->flags = 0xb5
    [  109.092949] idata[0]->ic->blocks = 0x1
    [  109.096865] idata[0]->ic->blksz = 0x200
    [  109.100791] idata[0]->ic->postsleep_min_us = 0x7473696e
    [  109.104745] idata[0]->ic->postsleep_max_us = 0x34383370
    [  109.110167] idata[0]->ic->data_timeout_ns = 0x7265632d
    [  109.115494] idata[0]->ic->data_ptr = 00000000e7ddd4cd
    [  109.120832] idata[0]->rpmb = 00000000ffab5640
    [  109.126077] idata[1]->ic->opcode = 0x12
    [  109.130622] idata[1]->ic->arg = 0x0
    [  109.135451] idata[1]->ic->write_flag = 0x0
    [  109.139153] idata[1]->ic->is_acmd = 0x0
    [  109.143437] idata[1]->ic->flags = 0xb5
    [  109.147553] idata[1]->ic->blocks = 0x1
    [  109.151420] idata[1]->ic->blksz = 0x200
    [  109.155251] idata[1]->ic->postsleep_min_us = 0x652d6873
    [  109.159166] idata[1]->ic->postsleep_max_us = 0x35353264
    [  109.164561] idata[1]->ic->data_timeout_ns = 0x632d3931
    [  109.169915] idata[1]->ic->data_ptr = 00000000bc641ed4
    [  109.175152] idata[1]->rpmb = 00000000ffab5640

Therefor, zero-init the MMC_IOC_MULTI_CMD structures to
avoid the obscene sleep values.

Signed-off-by: John Ernberg <john.ernberg@actia.se>
Link: https://lore.kernel.org/r/20201216093146.6218-1-john.ernberg@actia.se
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-03-30 15:02:54 +02:00
Shivamurthy Shastri (sshivamurthy) 1b8b13beb4 mmc-utils: let FFU mode use CMD23 and CMD25
As per specification, the host can use either CMD24 or CMD25 in
closed-ended or open-ended way.
CMD25 is better option as it can flash the firmware image in one go.

Signed-off-by: Shivamurthy Shastri <sshivamurthy@micron.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Tested-by: Bean Huo <beanhuo@micron.com>
Link: https://lore.kernel.org/r/MN2PR08MB63973BF8F3C6959487BF5707B86A9@MN2PR08MB6397.namprd08.prod.outlook.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2021-03-30 14:55:52 +02:00
Jungseung Lee d40ec535b9 mmc-utils: feature spec 5.0+, add secure removal type fields to Extended CSD
Display secure removal type when printing Extended CSD
Example:
	# mmc extcsd read /dev/mmcblk0
	...
        Secure Removal Type [SECURE_REMOVAL_TYPE]: 0x39
         information is configured to be removed using a vendor defined
         Supported Secure Removal Type:
          information removed by an erase of the physical memory
          information removed using a vendor defined

Signed-off-by: Jungseung Lee <js07.lee@samsung.com>
Reviewed-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Chris Ball <chris@printf.net>
2019-08-08 18:42:38 -04:00
Nikita Maslov aef913e31b mmc-utils: use MMC_IOC_MULTI_CMD for RPMB access
On some systems which use MMC as a main storage device
it is possible that RPMB commands are mixed with
generic MMC access commands which invalidates RPMB.

This patch uses MMC_IOC_MULTI_CMD.

Signed-off-by: Clément Péron <peron.clem@gmail.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Chris Ball <chris@printf.net>
2018-12-14 20:11:14 -05:00
Wolfram Sang 485b05ec40 use proper type for RPMB blocks_cnt
The JEDEC standard is confusing. The number of max blocks for reading
RPMB is determined by CMD23 which can hold an unsigned int and not only
u16. It is true that the current maximum is 64K of blocks, yet this may
be extended in the future. Let's not apply a limit here which should be
checked by the card.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Chris Ball <chris@printf.net>
2018-12-08 00:51:37 -05:00
jason.zeng b4fe0c8c0e fix ENH_START_ADDR overflow
Fix enh_start_addr overflow when converting emmc enh_area which will
cause do_enh_area_set failure.

Signed-off-by: jason.zeng <jasonzvz@gmail.com>
Signed-off-by: Chris Ball <chris@printf.net>
2018-03-27 02:17:10 -04:00
Uwe Kleine-König 247191a0f7 mmc-utils: remove unused #includes
I didn't find any functions used for which the documentation specifies to
use (at least) one of the dropped headers.

The only Linux specific header <linux/fs.h> is needed for BLKGETSIZE,
document that.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Chris Ball <chris@printf.net>
2018-02-16 20:19:43 -05:00
Uwe Kleine-König a1a6120c34 mmc-utils: move offsetof from mmc.h to only user
offsetof isn't mmc specific, so remove it from mmc.h. As there is only a
single user define it there.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Chris Ball <chris@printf.net>
2018-02-16 20:19:40 -05:00
Uwe Kleine-König fcef164b23 mmc-utils: drop macro CHECK
This macro saves a few lines of code but is harder to read than the
equivalent code spelled out. IMHO the latter is more important, so
expand the macro everywhere and drop it.

While touching this also unbreak the strings used there for better
grepability.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Chris Ball <chris@printf.net>
2018-02-16 20:17:09 -05:00
Alexander Stein 37c86e60c0 mmc-utils: Check for ext_csd_rev only once
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Chris Ball <chris@printf.net>
2017-03-20 09:58:49 -04:00
Alexander Stein c22a92f948 mmc-utils: feature spec 5.0+, Pre EOL information
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Chris Ball <chris@printf.net>
2017-03-20 09:58:40 -04:00
Boris Schmidt 34a954b87c mmc-utils: feature spec 5.0+, device life time estimation for MLC and pSLC mode
Signed-off-by: Boris Schmidt <boris.schmidt@siemens.com>
2017-03-16 12:10:37 -04:00
Tomas Melin 2cb6695e8d Add missing -c for write_reliability
Fixes upstream-merge in 752072dafe
Write_reliability -c addition from patch was missing.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Chris Ball <chris@printf.net>
2016-09-01 11:49:01 -04:00
Tomas Melin e094e28d56 Fix return value check from set_partitioning_setting_completed()
Test was wrong way around. Function returns non-zero value on fail.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Chris Ball <chris@printf.net>
2016-08-29 12:03:17 -04:00
Tomas Melin 752072dafe Add -c option for partitioning commands
Adding 'continue' option to:
gp create
enh_area set
write_reliability set

Partitioning commands are connected, register PARTITION_SETTING_COMPLETED
should not be written until all settings have been done.
The continue option enables writing more than one partitioning setting before
sealing settings.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Chris Ball <chris@printf.net>
2016-08-29 12:03:14 -04:00
Tomas Melin 55380d9748 Register being set is other than mentioned in printed message.
Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Chris Ball <chris@printf.net>
2016-08-29 12:03:06 -04:00
Tomas Melin 3c02759595 Fix reported offset for enhanced user area start address
Block-addressed devices should have address multiplied with sector size.

Clarify with comment how is_blockaddressed() is calculated.

Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Chris Ball <chris@printf.net>
2016-08-29 12:02:59 -04:00
Adrian Hunter a3d3331e68 mmc-utils: Add Command Queue fields to Extended CSD
Display Command Queue information when printing Extended CSD
Example:

	# mmc extcsd read /dev/mmcblk0 | grep CMDQ
	Command Queue Support [CMDQ_SUPPORT]: 0x01
	Command Queue Depth [CMDQ_DEPTH]: 16
	Command Enabled [CMDQ_MODE_EN]: 0x01

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
2016-06-23 16:28:08 -04:00
Al Cooper 0ca049f251 mmc-utils: Add ability to configure write protect on an eMMC device
Add commands to get and set write protect modes for the specified
areas of the user partition. The ability to set permanent write
protect is #ifdef'd with "DANGEROUS_COMMANDS_ENABLED" because
it has the ability to make the eMMC device and possibly the system
permanently unusable.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Chris Ball <chris@printf.net>
2016-06-07 16:55:09 -04:00
Markus Schuetterle bb779acfc3 mmc-utils: Add disable partition boot to 'mmc bootpart enable'
Modified 'bootpart enable' function to disable partition boot
by setting the <partition> parameter to 0.

Signed-off-by: Markus Schuetterle <markus.schuetterle@intel.com>
Signed-off-by: Chris Ball <chris@printf.net>
2016-05-11 09:33:01 -04:00
Avi Shchislowski 89cd01ed86 mmc_utils: add ffu support
Adding support for field firmware update over multiple command ioctl.
As multiple command ioctl is supported only from kernel 4.4, this patch
should be used against kernel 4.4 and above.

Known issues:
- There is no support for Multiple Block write commands (CMD25) in existing
  IOCTL implementation
- In case MODE_OPERATION_CODES field is not supported by the device
  manual reset of the device/platform is required.
  The reset issue discussed in another email thread - " [RFC 0/6] mmc:
  Field Firmware Update"

Signed-off-by: Yaniv Agman <yaniv.agman@sandisk.com>
Signed-off-by: Avi Shchislowski <avi.shchislowski@sandisk.com>
Signed-off-by: Chris Ball <chris@printf.net>
2016-03-08 14:22:41 -05:00
Marcus Folkesson 928ff072be mmc_utils: gp create: only allow partition [1-4] to be selected
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
2015-11-18 15:06:16 -05:00
Al Cooper d0b46442b5 mmc-utils: add ability to enable/disable optional eMMC cache
The MMC4.5 specification added an optional cache for eMMC devices.
This change will add the ability to enable/disable the cache.

Signed-off-by: Al Cooper <acooperx@gmail.com>
Signed-off-by: Chris Ball <chris@printf.net>
2015-05-01 08:38:26 -04:00
Al Cooper 64c2de8b14 mmc-utils: Add command to set the boot bus conditions
This was added because some eMMC devices had the boot bus conditions
set incorrectly causing them to hang on boot.

Signed-off-by: Al Cooper <acooperx@gmail.com>
Signed-off-by: Chris Ball <chris@printf.net>
2015-05-01 08:38:17 -04:00
Balaji T K 7891236d62 mmc-utils: add support to create gp partition
create gp partition if needed with enhanced / extended attribute.

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Chris Ball <chris@printf.net>
2015-05-01 08:38:06 -04:00
Balaji T K 4afc8c8168 mmc-utils: add check for max enhanced user area
In addition to user area, General purpose partition can be
be marked with enhanced attribute, retain enhanced attributes of
gp partition while creating enhanced user area and add
check for max enhanced area of the device.

Signed-off-by: Balaji T K <balajitk@ti.com>
Signed-off-by: Chris Ball <chris@printf.net>
2015-05-01 08:38:00 -04:00
Roman Peniaev c6cb053ec5 mmc-utils: RPMB: add support for 4 rpmb operations
mmc rpmb write-key <rpmb device> <key file>
  Program authentication key which is 32 bytes length and stored in the specified file.
  Also you can specify '-' instead of key file path and utility will read the key from stdin.
  BEWARE: key can be programmed only once!
  Example:
    $ echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | mmc rpmb write-key /dev/mmcblk0rpmb -

mmc rpmb read-counter <rpmb device>
  Counter value for the <rpmb device> will be read to stdout.

mmc rpmb read-block <rpmb device> <address> <blocks count> <output file> [key file]
  Blocks of 256 bytes will be read from <rpmb device> to output file or stdout if '-'
  is specified instead of regular path. If key is specified - read data will be verified.
  Instead of regular path you can specify '-' and key will be read from stdin.
  Example:
    $ echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | \
        mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block -
  or read the block without verification
    $ mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block

mmc rpmb write-block <rpmb device> <address> <256 byte data file> <key file>
  Block of 256 bytes will be written from data file to <rpmb device>.
  Also you can specify '-' instead of key file path or data file and utility will read the
  data from stdin.
  Example:
    $ (awk 'BEGIN {while (c++<256) printf "a"}' | echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH) | \
      mmc rpmb write-block /dev/mmcblk0rpmb 0x02 - -

Signed-off-by: Roman Pen <r.peniaev@gmail.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
Cc: Ben Gardiner <bengardiner@nanometrics.ca>,
Signed-off-by: Chris Ball <chris@printf.net>
2014-08-12 10:30:02 -04:00
Oliver Metz 11f2ceabc4 Don't use u8 for fields with more than 1 byte
Signed-off-by: Oliver Metz <oliver@freetz.org>
Reviewed-by: Ben Gardiner <ben.l.gardiner@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-09-25 22:28:32 -04:00
Oliver Metz 22f2641fe6 Add defines for ext_csd field MAX_ENH_SIZE_MULT
Signed-off-by: Oliver Metz <oliver@freetz.org>
Reviewed-by: Ben Gardiner <ben.l.gardiner@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-09-25 22:24:56 -04:00
Ben Gardiner 196d0d2958 support setting the OTP write reliability settings
Signed-off-by: Ben Gardiner <ben.l.gardiner@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-09-25 22:12:00 -04:00
Ben Gardiner 4da1c0dc8b pretty print write reliability settings
Signed-off-by: Ben Gardiner <ben.l.gardiner@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-09-25 22:11:55 -04:00
Ben Gardiner e6e84e96ac extract PARTITION_SETTING_COMPLETE function
Extract a function which sets the OTP PARTITION_SETTING_COMPLETE
bit; once this bit is set there are many other parameters in
EXT_CSD which can no longer be set.

Multiple OTP partition settings can be achieved by calling 'set'
commands with '-n' on all except for the last.

Signed-off-by: Ben Gardiner <ben.l.gardiner@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-09-25 22:11:46 -04:00
Ben Gardiner d91d3698c6 support setting the OTP enhanced user area parameters
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-06-27 11:11:05 -04:00
Ben Gardiner f82e27a1b1 print KiB sizes for some fields
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-06-27 11:11:05 -04:00
Ben Gardiner 4e85023654 report if card is block-addressed and effect on ENH_START_ADDR
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-06-27 11:11:05 -04:00
Ben Gardiner 68f490b54b fix printing ENH_START_ADDR
The enhanced user area start field is 4 bytes long
according to the eMMC 4.41 spec.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-06-27 11:11:05 -04:00
Ben Gardiner 27c357db04 Support SEND_STATUS command
mmc status get </path/to/mmcblkX>

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-06-27 11:11:05 -04:00
Ben Gardiner a6cd98de8b extract definitions for PARTITION_SETTING_COMPLETED and pretty-print
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-06-27 11:11:05 -04:00
Ben Gardiner 82bd9504b1 extract definitions for EXT_CSD register EXT_CSD_PARTITIONING_SUPPORT
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-06-27 11:11:05 -04:00