Skip to contentSkip to conversation

mmc-utils: manpage: Document -c option for partitioning commands

PATCH In review Marius Strobl 3 participants 7 messages Feb 5, 2022 – Feb 8, 2022 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 mmc-utils: manpage: Document -c option for partitioning commands

The 'continue' option was added in commit 752072dafe9c ("Add -c option for partitioning commands).

---
 man/mmc.1 | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
man/mmc.1 +9 -6
index bdb6f09..bccabf3 100644
@@ -30,21 +30,24 @@ This sets the eMMC to be write-protected until next boot.
 Set the eMMC data sector size to 4KB by disabling emulation on
 <device>.
 .TP
-.BR "gp create <-y|-n> <length KiB> <partition> <enh_attr> <ext_attr> <device>"
+.BR "gp create <-y|-n|-c> <length KiB> <partition> <enh_attr> <ext_attr> <device>"
 create general purpose partition for the <device>.
-Dry-run only unless -y is passed.
+Dry-run only unless -y or -c is passed.
+Use -c if more partitioning settings are still to come.
 To set enhanced attribute to general partition being created set <enh_attr> to 1 else set it to 0.
 To set extended attribute to general partition set <ext_attr> to 1,2 else set it to 0.
 NOTE!  This is a one-time programmable (unreversible) change.
 .TP
-.BR "enh_area set <-y|-n> <start KiB> <length KiB> <device>"
+.BR "enh_area set <-y|-n|-c> <start KiB> <length KiB> <device>"
 Enable the enhanced user area for the <device>.
-Dry-run only unless -y is passed.
+Dry-run only unless -y or -c is passed.
+Use -c if more partitioning settings are still to come.
 NOTE!  This is a one-time programmable (unreversible) change.
 .TP
-.BR "write_reliability set <-y|-n> <partition> <device>"
+.BR "write_reliability set <-y|-n|-c> <partition> <device>"
 Enable write reliability per partition for the <device>.
-Dry-run only unless -y is passed.
+Dry-run only unless -y or -c is passed.
+Use -c if more partitioning settings are still to come.
 NOTE!  This is a one-time programmable (unreversible) change.
 .TP
 .BR "status get <device>"
Signature · 1 line
2.31.1
#1 lore raw

PATCH 2/3 mmc-utils: Remove unused MMC_BLOCK_MAJOR

It was added in commit 294bf86972d6 ("mmc-utils: Remove dependency on linux/major.h.") but never actually used, apparently.

---
 mmc.h | 3 ---
 1 file changed, 3 deletions(-)
mmc.h +0 -3
index e9766d7..2ff6e66 100644
@@ -19,9 +19,6 @@
 
 #include <linux/mmc/ioctl.h>
 
-/* From kernel linux/major.h */
-#define MMC_BLOCK_MAJOR			179
-
 /* From kernel linux/mmc/mmc.h */
 #define MMC_SWITCH		6	/* ac	[31:0] See below	R1b */
 #define MMC_SEND_EXT_CSD	8	/* adtc				R1  */
Signature · 1 line
2.31.1
#2 lore raw

RE: [PATCH 2/3] mmc-utils: Remove unused MMC_BLOCK_MAJOR

Quoted 5 lines

It was added in commit 294bf86972d6 ("mmc-utils: Remove dependency on linux/major.h.") but never actually used, apparently.

Looks good to me.

Thanks,
Avri

Quoted 20 lines
---
 mmc.h | 3 ---
 1 file changed, 3 deletions(-)
mmc.h +0 -4
index e9766d7..2ff6e66 100644
@@ -19,9 +19,6 @@
 
 #include <linux/mmc/ioctl.h>
 
-/* From kernel linux/major.h */
-#define MMC_BLOCK_MAJOR                        179
-
 /* From kernel linux/mmc/mmc.h */
 #define MMC_SWITCH             6       /* ac   [31:0] See below        R1b */
 #define MMC_SEND_EXT_CSD       8       /* adtc                         R1  */
--

2.31.1

#3 lore raw

PATCH 3/3 mmc-utils: Display STROBE_SUPPORT when printing EXT_CSD

In reply to Marius Strobl

Support for Enhanced Strobe mode introduced in eMMC 5.1 JESD84-B51 can be determined via EXT_CSD[184]. Along with the identification of HS400 data rates added in commit 3969aa4804ed ("mmc_cmds: add HS400 data rates"), this allows to differentiate support for HS400/HS400ES.

---
 mmc_cmds.c | 3 +++
 1 file changed, 3 insertions(+)
mmc_cmds.c +3 -0
index f024079..508ddad 100644
@@ -1628,6 +1628,9 @@ int do_read_extcsd(int nargs, char **argv)
 	printf("Power class [POWER_CLASS: 0x%02x]\n", ext_csd[187]);
 	printf("High-speed interface timing [HS_TIMING: 0x%02x]\n",
 		ext_csd[185]);
+	if (ext_csd_rev >= 8)
+		printf("Enhanced Strobe mode [STROBE_SUPPORT: 0x%02x]\n",
+			ext_csd[184]);
 	/* bus_width: ext_csd[183] not readable */
 	printf("Erased memory content [ERASED_MEM_CONT: 0x%02x]\n",
 		ext_csd[181]);
Signature · 1 line
2.31.1
#4 lore raw

RE: [PATCH 3/3] mmc-utils: Display STROBE_SUPPORT when printing EXT_CSD

Quoted 6 lines

Support for Enhanced Strobe mode introduced in eMMC 5.1 JESD84-B51 can be determined via EXT_CSD[184]. Along with the identification of HS400 data rates added in commit 3969aa4804ed ("mmc_cmds: add HS400 data rates"), this allows to differentiate support for HS400/HS400ES.

Looks good to me.

Thanks,
Avri

Quoted 20 lines
---
 mmc_cmds.c | 3 +++
 1 file changed, 3 insertions(+)
mmc_cmds.c +3 -1
index f024079..508ddad 100644
@@ -1628,6 +1628,9 @@ int do_read_extcsd(int nargs, char **argv)
        printf("Power class [POWER_CLASS: 0x%02x]\n", ext_csd[187]);
        printf("High-speed interface timing [HS_TIMING: 0x%02x]\n",
                ext_csd[185]);
+       if (ext_csd_rev >= 8)
+               printf("Enhanced Strobe mode [STROBE_SUPPORT: 0x%02x]\n",
+                       ext_csd[184]);
        /* bus_width: ext_csd[183] not readable */
        printf("Erased memory content [ERASED_MEM_CONT: 0x%02x]\n",
                ext_csd[181]);
--

2.31.1

#5 lore raw
In reply to Marius Strobl
Quoted 5 lines

The 'continue' option was added in commit 752072dafe9c ("Add -c option for partitioning commands).

Looks good to me.

A small editorial comment - if you are bundling your patches - a cover letter is usually attached with few words describing the series.

Thanks,
Avri

Quoted 46 lines
---
 man/mmc.1 | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
man/mmc.1 +0 -0
index bdb6f09..bccabf3 100644
@@ -30,21 +30,24 @@ This sets the eMMC to be write-protected until next

boot.
Set the eMMC data sector size to 4KB by disabling emulation on <device>.
.TP
-.BR "gp create <-y|-n> <length KiB> <partition> <enh_attr> <ext_attr> <device>"
+.BR "gp create <-y|-n|-c> <length KiB> <partition> <enh_attr> <ext_attr> <device>"
create general purpose partition for the <device>.

man/mmc.1 +2 -1
-Dry-run only unless -y is passed.
+Dry-run only unless -y or -c is passed.
+Use -c if more partitioning settings are still to come.
 To set enhanced attribute to general partition being created set <enh_attr> to 1

else set it to 0.
To set extended attribute to general partition set <ext_attr> to 1,2 else set it to
0.
NOTE! This is a one-time programmable (unreversible) change.
.TP
-.BR "enh_area set <-y|-n> <start KiB> <length KiB> <device>"
+.BR "enh_area set <-y|-n|-c> <start KiB> <length KiB> <device>"
Enable the enhanced user area for the <device>.

man/mmc.1 +5 -4
-Dry-run only unless -y is passed.
+Dry-run only unless -y or -c is passed.
+Use -c if more partitioning settings are still to come.
 NOTE!  This is a one-time programmable (unreversible) change.
 .TP
-.BR "write_reliability set <-y|-n> <partition> <device>"
+.BR "write_reliability set <-y|-n|-c> <partition> <device>"
 Enable write reliability per partition for the <device>.
-Dry-run only unless -y is passed.
+Dry-run only unless -y or -c is passed.
+Use -c if more partitioning settings are still to come.
 NOTE!  This is a one-time programmable (unreversible) change.
 .TP
 .BR "status get <device>"
--

2.31.1

#6 lore raw
In reply to Marius Strobl
Quoted 5 lines · Marius Strobl

The 'continue' option was added in commit 752072dafe9c ("Add -c option for partitioning commands).

The three patches applied to git.kernel.org/pub/scm//utils/mmc/mmc-utils.git master, thanks!

Kind regards
Uffe

Quoted 42 lines
---
 man/mmc.1 | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
man/mmc.1 +9 -7
index bdb6f09..bccabf3 100644
@@ -30,21 +30,24 @@ This sets the eMMC to be write-protected until next boot.
 Set the eMMC data sector size to 4KB by disabling emulation on
 <device>.
 .TP
-.BR "gp create <-y|-n> <length KiB> <partition> <enh_attr> <ext_attr> <device>"
+.BR "gp create <-y|-n|-c> <length KiB> <partition> <enh_attr> <ext_attr> <device>"
 create general purpose partition for the <device>.
-Dry-run only unless -y is passed.
+Dry-run only unless -y or -c is passed.
+Use -c if more partitioning settings are still to come.
 To set enhanced attribute to general partition being created set <enh_attr> to 1 else set it to 0.
 To set extended attribute to general partition set <ext_attr> to 1,2 else set it to 0.
 NOTE!  This is a one-time programmable (unreversible) change.
 .TP
-.BR "enh_area set <-y|-n> <start KiB> <length KiB> <device>"
+.BR "enh_area set <-y|-n|-c> <start KiB> <length KiB> <device>"
 Enable the enhanced user area for the <device>.
-Dry-run only unless -y is passed.
+Dry-run only unless -y or -c is passed.
+Use -c if more partitioning settings are still to come.
 NOTE!  This is a one-time programmable (unreversible) change.
 .TP
-.BR "write_reliability set <-y|-n> <partition> <device>"
+.BR "write_reliability set <-y|-n|-c> <partition> <device>"
 Enable write reliability per partition for the <device>.
-Dry-run only unless -y is passed.
+Dry-run only unless -y or -c is passed.
+Use -c if more partitioning settings are still to come.
 NOTE!  This is a one-time programmable (unreversible) change.
 .TP
 .BR "status get <device>"
--

2.31.1