From 187ef15268e638603dea55a91fdfa29feaed6d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Skinnemoen?= Date: Fri, 22 Sep 2006 10:07:08 +0100 Subject: [MTD] Unlock NOR flash automatically where necessary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Andrew Morton Signed-off-by: David Woodhouse --- include/mtd/mtd-abi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index 1da3f7fa799..b0a67b7ffdc 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h @@ -34,6 +34,7 @@ struct mtd_oob_buf { #define MTD_WRITEABLE 0x400 /* Device is writeable */ #define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ #define MTD_NO_ERASE 0x1000 /* No erase necessary */ +#define MTD_STUPID_LOCK 0x2000 /* Always locked after reset */ // Some common devices / combinations of capabilities #define MTD_CAP_ROM 0 -- cgit v1.2.3 From 25f0c659fe64832d8ee06aa623fffaad708dcf8b Mon Sep 17 00:00:00 2001 From: Amol Lad Date: Thu, 21 Sep 2006 18:12:43 +0530 Subject: ioremap balanced with iounmap for drivers/mtd subsystem ioremap must be balanced by an iounmap and failing to do so can result in a memory leak. Tested (compilation only) with: - allmodconfig - Modifying drivers/mtd/maps/Kconfig and drivers/mtd/nand/Kconfig to make sure that the changed file is compiling without warning Signed-off-by: Amol Lad Signed-off-by: David Woodhouse --- include/linux/utsrelease.h | 1 + 1 file changed, 1 insertion(+) create mode 100644 include/linux/utsrelease.h (limited to 'include') diff --git a/include/linux/utsrelease.h b/include/linux/utsrelease.h new file mode 100644 index 00000000000..7fe1de0ad4c --- /dev/null +++ b/include/linux/utsrelease.h @@ -0,0 +1 @@ +#define UTS_RELEASE "2.6.18" -- cgit v1.2.3 From 734a56285dbeedc6cc10aef6f700eeab7c65ea9f Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Fri, 22 Sep 2006 18:41:20 +0100 Subject: Remove accidentally-added include/linux/utsrelease.h Signed-off-by: David Woodhouse --- include/linux/utsrelease.h | 1 - 1 file changed, 1 deletion(-) delete mode 100644 include/linux/utsrelease.h (limited to 'include') diff --git a/include/linux/utsrelease.h b/include/linux/utsrelease.h deleted file mode 100644 index 7fe1de0ad4c..00000000000 --- a/include/linux/utsrelease.h +++ /dev/null @@ -1 +0,0 @@ -#define UTS_RELEASE "2.6.18" -- cgit v1.2.3