summaryrefslogtreecommitdiff
path: root/src/flash/nor/cfi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/flash/nor/cfi.c')
-rw-r--r--src/flash/nor/cfi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/flash/nor/cfi.c b/src/flash/nor/cfi.c
index 92b553b5..4ef41b9a 100644
--- a/src/flash/nor/cfi.c
+++ b/src/flash/nor/cfi.c
@@ -852,6 +852,17 @@ static int cfi_intel_protect(struct flash_bank *bank, int set, int first, int la
*/
if ((!set) && (!(pri_ext->feature_support & 0x20)))
{
+ /* FIX!!! this code path is broken!!!
+ *
+ * The correct approach is:
+ *
+ * 1. read out current protection status
+ *
+ * 2. override read out protection status w/unprotected.
+ *
+ * 3. re-protect what should be protected.
+ *
+ */
for (i = 0; i < bank->num_sectors; i++)
{
if (bank->sectors[i].is_protected == 1)