diff options
author | Håvard Skinnemoen <hskinnemoen@atmel.com> | 2006-09-22 05:07:08 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-09-22 05:07:08 -0400 |
commit | 187ef15268e638603dea55a91fdfa29feaed6d13 (patch) | |
tree | a3895b43f90ed87ae54e3b066468ac2c8fdf31ee /include | |
parent | e478bec0ba0a83a48a0f6982934b6de079e7e6b3 (diff) |
[MTD] Unlock NOR flash automatically where necessary
Introduce the MTD_STUPID_LOCK flag which indicates that the flash chip is
always locked after power-up, so all sectors need to be unlocked before it
is usable.
If this flag is set, and the chip provides an unlock() operation,
mtd_add_device will unlock the whole MTD device if it's writeable. This
means that non-writeable partitions will stay locked.
Set MTD_STUPID_LOCK in fixup_use_atmel_lock() so that these chips will work
as expected.
Signed-off-by: Håvard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/mtd/mtd-abi.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index 1da3f7fa7993..b0a67b7ffdcd 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h | |||
@@ -34,6 +34,7 @@ struct mtd_oob_buf { | |||
34 | #define MTD_WRITEABLE 0x400 /* Device is writeable */ | 34 | #define MTD_WRITEABLE 0x400 /* Device is writeable */ |
35 | #define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ | 35 | #define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ |
36 | #define MTD_NO_ERASE 0x1000 /* No erase necessary */ | 36 | #define MTD_NO_ERASE 0x1000 /* No erase necessary */ |
37 | #define MTD_STUPID_LOCK 0x2000 /* Always locked after reset */ | ||
37 | 38 | ||
38 | // Some common devices / combinations of capabilities | 39 | // Some common devices / combinations of capabilities |
39 | #define MTD_CAP_ROM 0 | 40 | #define MTD_CAP_ROM 0 |