[PATCH] cmd: mmc: allow use of hardware parittion names for mmc partconf
Tim Harvey
tharvey at gateworks.com
Fri Apr 26 17:14:01 CEST 2024
On Thu, Apr 25, 2024 at 9:07 PM Marek Vasut <marex at denx.de> wrote:
>
> On 4/26/24 2:14 AM, Tim Harvey wrote:
> > eMMC devices have hardware partitions such as user, boot0, and boot1.
> > Allow these names to be displayed when reading the mmc PARTITION_CONFIG
> > field via 'mmc partconf'. Additionally allow a name to be specified when
> > setting the PARTITION_CONFIG.
> >
> > Before:
> > u-boot=> mmc partconf 2 1 1 0 && mmc partconf 2
> > EXT_CSD[179], PARTITION_CONFIG:
> > BOOT_ACK: 0x1
> > BOOT_PARTITION_ENABLE: 0x2
> > PARTITION_ACCESS: 0x0
> >
> > After:
> > u-boot=> mmc partconf 2 1 1 0 && mmc partconf 2
> > EXT_CSD[179], PARTITION_CONFIG:
> > BOOT_ACK: 0x1
> > BOOT_PARTITION_ENABLE: 0x1 (boot0)
> > PARTITION_ACCESS: 0x0
> > u-boot=> mmc partconf 2 1 boot1 0 && mmc partconf 2
> > EXT_CSD[179], PARTITION_CONFIG:
> > BOOT_ACK: 0x1
> > BOOT_PARTITION_ENABLE: 0x2 (boot1)
> > PARTITION_ACCESS: 0x0
> >
> > Signed-off-by: Tim Harvey <tharvey at gateworks.com>
> > ---
> > cmd/mmc.c | 25 ++++++++++++++++++++++---
> > 1 file changed, 22 insertions(+), 3 deletions(-)
> >
> > diff --git a/cmd/mmc.c b/cmd/mmc.c
> > index 2d5430a53079..26692a8e349b 100644
> > --- a/cmd/mmc.c
> > +++ b/cmd/mmc.c
> > @@ -14,6 +14,18 @@
> > #include <part.h>
> > #include <sparse_format.h>
> > #include <image-sparse.h>
> > +#include <linux/ctype.h>
> > +
> > +static const char *mmc_partnames[] = {
> > + "user",
> > + "boot0",
> > + "boot1",
> > + "",
>
> Shouldn't these be 'gp' partitions here ?
>
He Marek,
Do you mean that 3-6 should be named 'gp1', 'gp2' etc? I couldn't find
if those values were possible or have meaning.
Best Regards,
Tim
More information about the U-Boot
mailing list