Hi Marek, On Mon, Jan 17, 2022 at 6:54 PM Marek Vasut <ma...@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 <ma...@denx.de> > Cc: Fabio Estevam <feste...@gmail.com> > Cc: Jaehoon Chung <jh80.ch...@samsung.com> > Cc: Peng Fan <peng....@nxp.com> > Cc: Stefano Babic <sba...@denx.de>
Reviewed-by: Fabio Estevam <feste...@gmail.com>