
Hi Stefan,
Some of your recent cfi flash driver enhancements have made flash protect/unprotect work on our NOR based platforms (S29GL512). Good news so far, but as a consequence fw_setenv is woking no more: MTD erase error on /dev/mtd5: Input/output error Error: can't write fw_env to flash
Also flash_unlock from mtd_utils is not doing the trick: Could not unlock MTD device: /dev/mtd5
Unprotecting flash in u-boot before booting linux makes
this work, but
this is probably no good idea.
So what is the recommended workflow for fw_setenv on
protected flash?
Linux support for this enhanced sector protection (PPB) has just been accepted into mainline Linux. You need include this patch if you are working with an older kernel version:
http://patchwork.ozlabs.org/patch/213602/
And you also need to enable this feature in your dts file as described in the patch description.
Ah, thanks a lot.
So the recommended workflow (with patch and dts changes applied) would be: flash_unlock fw_setenv flash_lock ?
Cheers Dirk