]> git.baikalelectronics.ru Git - kernel.git/commit
[MTD] Unlock NOR flash automatically where necessary
authorHåvard Skinnemoen <hskinnemoen@atmel.com>
Fri, 22 Sep 2006 09:07:08 +0000 (10:07 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Fri, 22 Sep 2006 09:07:08 +0000 (10:07 +0100)
commit00a30dd7a98bccbc266c67ff1dddace28add3bd0
treea3895b43f90ed87ae54e3b066468ac2c8fdf31ee
parent4504b8980b45f04e7c033f506d4231add80a393c
[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>
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/mtdcore.c
include/mtd/mtd-abi.h