• Joakim Tjernlund's avatar
    mtd: CFI cmdset_0002: enable erase-suspend-program · 2695eab9
    Joakim Tjernlund authored
    Erase-suspend for writing is required to avoid blocking applications
    that wish to write some data (to a NOR block other than the one being
    erased). Particularly, it solves some huge delays that an application
    (which writes to a UBIFS) will experience if UBI attaches to empty NOR
    flash. In this case the UBI background thread will erase a lot of blocks
    and the application can be blocked for minutes because of the "MTD/CFI
    chip lock".
    
    This feature has been disabled for years. Maybe this was because the old
    code turned it on for erase-suspend read-only chips also
    (cfip->EraseSuspend & 0x1). This is wrong and corrected now.
    
    This patch was tweaked by Norbert van Bolhuis.
    Signed-off-by: default avatarNorbert van Bolhuis <nvbolhuis@aimvalley.nl>
    Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
    Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
    2695eab9
cfi_cmdset_0002.c 51.2 KB