Skip to content
  • Loic Poulain's avatar
    mmc: erase: Use TRIM erase when available · 67642c12
    Loic Poulain authored and Jaehoon Chung's avatar Jaehoon Chung committed
    
    
    The default erase command applies on erase group unit, and
    simply round down to erase group size. When the start block
    is not aligned to erase group size (e.g. erasing partition)
    it causes unwanted erasing of the previous blocks, part of
    the same erase group (e.g. owned by other logical partition,
    or by the partition table itself).
    
    To prevent this issue, a simple solution is to use TRIM as
    argument of the Erase command, which is usually supported
    with eMMC > 4.0, and allow to apply erase operation to write
    blocks instead of erase group
    
    Signed-off-by: default avatarLoic Poulain <loic.poulain@linaro.org>
    Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
    67642c12