[PATCH] cmd: mmc: Consider GP partitions in mmc hwpartition user enh start -

Fabio Estevam festevam at gmail.com
Thu Jan 20 12:14:06 CET 2022


Hi Marek,

On Mon, Jan 17, 2022 at 6:54 PM Marek Vasut <marex at denx.de> wrote:
>
> In case the eMMC contains any GP partitions or user sets up new GP
> partitions, the size of these GP partitions reduce the size of the
> USER partition. Subtract the size of those GP partitions from the
> calculated size of USER partition when using `user enh start -`.
>
> The following test used to fail before:
> ```
> u-boot=> mmc hwpartition gp1 524288 enh user enh 0 - wrrel on check
> Partition configuration:
>         User Enhanced Start: 0 Bytes
>         User Enhanced Size: 1.8 GiB
>         User partition write reliability: on
>         GP1 Capacity: 256 MiB ENH
>         No GP2 partition
>         No GP3 partition
>         No GP4 partition
> Total enhanced size exceeds maximum (261 > 229)
> Failed!
> ```
> The test now passes:
> ```
> u-boot=> mmc hwpartition gp1 524288 enh user enh 0 - wrrel on check
> Partition configuration:
>         User Enhanced Start: 0 Bytes
>         User Enhanced Size: 1.5 GiB
>         User partition write reliability: on
>         GP1 Capacity: 256 MiB ENH
>         No GP2 partition
>         No GP3 partition
>         No GP4 partition
> ```
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Fabio Estevam <festevam at gmail.com>
> Cc: Jaehoon Chung <jh80.chung at samsung.com>
> Cc: Peng Fan <peng.fan at nxp.com>
> Cc: Stefano Babic <sbabic at denx.de>

Reviewed-by: Fabio Estevam <festevam at gmail.com>


More information about the U-Boot mailing list