Skip to content
Snippets Groups Projects
  • Marek Vasut's avatar
    1d4b3b2f
    cmd: mmc: Consider GP partitions in mmc hwpartition user enh start - · 1d4b3b2f
    Marek Vasut authored and Jaehoon Chung's avatar Jaehoon Chung committed
    
    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: default avatarMarek Vasut <marex@denx.de>
    Cc: Fabio Estevam <festevam@gmail.com>
    Cc: Jaehoon Chung <jh80.chung@samsung.com>
    Cc: Peng Fan <peng.fan@nxp.com>
    Cc: Stefano Babic <sbabic@denx.de>
    Reviewed-by: default avatarFabio Estevam <festevam@gmail.com>
    Reviewed-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
    1d4b3b2f
    History
    cmd: mmc: Consider GP partitions in mmc hwpartition user enh start -
    Marek Vasut authored and Jaehoon Chung's avatar Jaehoon Chung committed
    
    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: default avatarMarek Vasut <marex@denx.de>
    Cc: Fabio Estevam <festevam@gmail.com>
    Cc: Jaehoon Chung <jh80.chung@samsung.com>
    Cc: Peng Fan <peng.fan@nxp.com>
    Cc: Stefano Babic <sbabic@denx.de>
    Reviewed-by: default avatarFabio Estevam <festevam@gmail.com>
    Reviewed-by: default avatarJaehoon Chung <jh80.chung@samsung.com>