public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] MTD: Intel StrataFlash P33 is locked on bootup
@ 2008-01-29 18:36 Haavard Skinnemoen
  2008-01-30  2:13 ` Jared Hulbert
  0 siblings, 1 reply; 8+ messages in thread
From: Haavard Skinnemoen @ 2008-01-29 18:36 UTC (permalink / raw)
  To: David Woodhouse, linux-mtd; +Cc: Haavard Skinnemoen, Paolo.Santos

Add appropriate fixups for all the devices listed in the Intel P33
data sheet.

Thanks to Paolo Santos for reporting this issue and testing the patch.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
---
 drivers/mtd/chips/cfi_cmdset_0001.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 1707f98..b723af1 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -246,6 +246,12 @@ static struct cfi_fixup cfi_fixup_table[] = {
 	{ CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct, NULL },
 	{ CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb, NULL },
 	{ MANUFACTURER_INTEL, 0x891c,	      fixup_use_powerup_lock, NULL, },
+	{ MANUFACTURER_INTEL, 0x881d,	      fixup_use_powerup_lock, NULL, },
+	{ MANUFACTURER_INTEL, 0x881e,	      fixup_use_powerup_lock, NULL, },
+	{ MANUFACTURER_INTEL, 0x891f,	      fixup_use_powerup_lock, NULL, },
+	{ MANUFACTURER_INTEL, 0x8820,	      fixup_use_powerup_lock, NULL, },
+	{ MANUFACTURER_INTEL, 0x8821,	      fixup_use_powerup_lock, NULL, },
+	{ MANUFACTURER_INTEL, 0x8922,	      fixup_use_powerup_lock, NULL, },
 	{ 0, 0, NULL, NULL }
 };
 
-- 
1.5.3.8

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] MTD: Intel StrataFlash P33 is locked on bootup
  2008-01-29 18:36 [PATCH] MTD: Intel StrataFlash P33 is locked on bootup Haavard Skinnemoen
@ 2008-01-30  2:13 ` Jared Hulbert
  2008-01-30  2:32   ` Nicolas Pitre
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jared Hulbert @ 2008-01-30  2:13 UTC (permalink / raw)
  To: Haavard Skinnemoen, Nicolas Pitre, Justin Treon
  Cc: linux-mtd, David Woodhouse, Paolo.Santos

> Add appropriate fixups for all the devices listed in the Intel P33
> data sheet.

Please don't merge this patch.

We worked on a patch that will unlock _all_ intel parts that have this
behavior in a more acceptable way.  It was discussed back in November.

I thought Justin had finished running this through review but I don't
see it now.  So I thought you had Acked this patch Nicolas, I can't
find where.  Was I mistaken?


Anyway I added it to my freshly updated git tree
"git://git.infradead.org/users/jehulber/mtd.git" (with a possibly
unearned Acked-by: Nicolas Pitre)


For visual review only....
__________________________________________________________

From: Justin Treon <justin_treon@yahoo.com>
[MTD] Unlocking all Intel flash that is locked on power up.

Patch for unlocking all Intel flash that has instant locking on power up.
The patch has been tested on Intel M18, P30 and J3D Strata Flash.
  1.    The automatic unlocking can be disabled for a particular partition
         in the map or the command line.
     a. For the bit mask in the map it should look like:
         .mask_flags   = MTD_POWERUP_LOCK,
     b. For the command line parsing it should look like:
         mtdparts=0x80000(bootloader)lk
  2.    This will only unlock parts with instant individual block locking.
         Intel parts with legacy unlocking will not be unlocked.

Signed-off-by: Justin Treon <justin_treon@yahoo.com>
---
drivers/mtd/chips/cfi_cmdset_0001.c |   20 +++++++++++++-------
drivers/mtd/cmdlinepart.c           |    9 ++++++++-
drivers/mtd/mtdcore.c               |    2 +-
include/mtd/mtd-abi.h               |    2 +-
4 files changed, 23 insertions(+), 10 deletions(-)

diff -r c105f44cf785 drivers/mtd/chips/cfi_cmdset_0001.c
--- a/drivers/mtd/chips/cfi_cmdset_0001.c	Thu Nov 08 15:36:57 2007 -0800
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c	Tue Nov 13 22:47:40 2007 -0800
@@ -226,10 +226,16 @@ static void fixup_use_write_buffers(stru
 /*
  * Some chips power-up with all sectors locked by default.
  */
-static void fixup_use_powerup_lock(struct mtd_info *mtd, void *param)
-{
-	printk(KERN_INFO "Using auto-unlock on power-up/resume\n" );
-	mtd->flags |= MTD_STUPID_LOCK;
+static void fixup_unlock_powerup_lock(struct mtd_info *mtd, void *param)
+{
+	struct map_info *map = mtd->priv;
+	struct cfi_private *cfi = map->fldrv_priv;
+	struct cfi_pri_intelext *cfip = cfi->cmdset_priv;
+
+	if (cfip->FeatureSupport&32) {
+		printk(KERN_INFO "Using auto-unlock on power-up/resume\n" );
+		mtd->flags |= MTD_POWERUP_LOCK;
+	}
 }

 static struct cfi_fixup cfi_fixup_table[] = {
@@ -244,7 +250,7 @@ static struct cfi_fixup cfi_fixup_table[
 #endif
 	{ CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct, NULL },
 	{ CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb, NULL },
-	{ MANUFACTURER_INTEL, 0x891c,	      fixup_use_powerup_lock, NULL, },
+	{ MANUFACTURER_INTEL, CFI_ID_ANY, fixup_unlock_powerup_lock, NULL, },
 	{ 0, 0, NULL, NULL }
 };

@@ -2273,7 +2279,7 @@ static int cfi_intelext_suspend(struct m
 	struct flchip *chip;
 	int ret = 0;

-	if ((mtd->flags & MTD_STUPID_LOCK)
+	if ((mtd->flags & MTD_POWERUP_LOCK)
 	    && extp && (extp->FeatureSupport & (1 << 5)))
 		cfi_intelext_save_locks(mtd);

@@ -2384,7 +2390,7 @@ static void cfi_intelext_resume(struct m
 		spin_unlock(chip->mutex);
 	}

-	if ((mtd->flags & MTD_STUPID_LOCK)
+	if ((mtd->flags & MTD_POWERUP_LOCK)
 	    && extp && (extp->FeatureSupport & (1 << 5)))
 		cfi_intelext_restore_locks(mtd);
 }
diff -r c105f44cf785 drivers/mtd/cmdlinepart.c
--- a/drivers/mtd/cmdlinepart.c	Thu Nov 08 15:36:57 2007 -0800
+++ b/drivers/mtd/cmdlinepart.c	Thu Nov 15 17:18:11 2007 -0800
@@ -9,7 +9,7 @@
  *
  * mtdparts=<mtddef>[;<mtddef]
  * <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
- * <partdef> := <size>[@offset][<name>][ro]
+ * <partdef> := <size>[@offset][<name>][ro][lk]
  * <mtd-id>  := unique name used in mapping driver/device (mtd->name)
  * <size>    := standard linux memsize OR "-" to denote all remaining space
  * <name>    := '(' NAME ')'
@@ -140,6 +140,13 @@ static struct mtd_partition * newpart(ch
         if (strncmp(s, "ro", 2) == 0)
 	{
 		mask_flags |= MTD_WRITEABLE;
+		s += 2;
+        }
+
+        /* if lk is found do NOT unlock the MTD partition*/
+        if (strncmp(s, "lk", 2) == 0)
+	{
+		mask_flags |= MTD_POWERUP_LOCK;
 		s += 2;
         }

diff -r c105f44cf785 drivers/mtd/mtdcore.c
--- a/drivers/mtd/mtdcore.c	Thu Nov 08 15:36:57 2007 -0800
+++ b/drivers/mtd/mtdcore.c	Tue Nov 13 15:41:00 2007 -0800
@@ -59,7 +59,7 @@ int add_mtd_device(struct mtd_info *mtd)

 			/* Some chips always power up locked. Unlock them now */
 			if ((mtd->flags & MTD_WRITEABLE)
-			    && (mtd->flags & MTD_STUPID_LOCK) && mtd->unlock) {
+			    && (mtd->flags & MTD_POWERUP_LOCK) && mtd->unlock) {
 				if (mtd->unlock(mtd, 0, mtd->size))
 					printk(KERN_WARNING
 					       "%s: unlock failed, "
diff -r c105f44cf785 include/mtd/mtd-abi.h
--- a/include/mtd/mtd-abi.h	Thu Nov 08 15:36:57 2007 -0800
+++ b/include/mtd/mtd-abi.h	Fri Nov 09 10:43:28 2007 -0800
@@ -29,7 +29,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 */
+#define MTD_POWERUP_LOCK	0x2000	/* Always locked after reset */

 // Some common devices / combinations of capabilities
 #define MTD_CAP_ROM		0

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] MTD: Intel StrataFlash P33 is locked on bootup
  2008-01-30  2:13 ` Jared Hulbert
@ 2008-01-30  2:32   ` Nicolas Pitre
  2008-01-30 12:51   ` Haavard Skinnemoen
  2008-01-30 12:53   ` Haavard Skinnemoen
  2 siblings, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2008-01-30  2:32 UTC (permalink / raw)
  To: Jared Hulbert
  Cc: linux-mtd, Paolo.Santos, David Woodhouse, Justin Treon,
	Haavard Skinnemoen

On Tue, 29 Jan 2008, Jared Hulbert wrote:

> > Add appropriate fixups for all the devices listed in the Intel P33
> > data sheet.
> 
> Please don't merge this patch.
> 
> We worked on a patch that will unlock _all_ intel parts that have this
> behavior in a more acceptable way.  It was discussed back in November.
> 
> I thought Justin had finished running this through review but I don't
> see it now.  So I thought you had Acked this patch Nicolas, I can't
> find where.  Was I mistaken?

I did, but the MTD mailing list has a tendency to require moderator 
aproval for some of my emails.

> Anyway I added it to my freshly updated git tree
> "git://git.infradead.org/users/jehulber/mtd.git" (with a possibly
> unearned Acked-by: Nicolas Pitre)

Please consider it was acked.


Nicolas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] MTD: Intel StrataFlash P33 is locked on bootup
  2008-01-30  2:13 ` Jared Hulbert
  2008-01-30  2:32   ` Nicolas Pitre
@ 2008-01-30 12:51   ` Haavard Skinnemoen
  2008-01-30 12:53   ` Haavard Skinnemoen
  2 siblings, 0 replies; 8+ messages in thread
From: Haavard Skinnemoen @ 2008-01-30 12:51 UTC (permalink / raw)
  To: Jared Hulbert
  Cc: David Woodhouse, Paolo.Santos, Nicolas Pitre, Justin Treon,
	linux-mtd

On Tue, 29 Jan 2008 18:13:43 -0800
"Jared Hulbert" <jaredeh@gmail.com> wrote:

> > Add appropriate fixups for all the devices listed in the Intel P33
> > data sheet.  
> 
> Please don't merge this patch.
> 
> We worked on a patch that will unlock _all_ intel parts that have this
> behavior in a more acceptable way.  It was discussed back in November.

Ok, sounds like a better approach. Please ignore my patch.

Haavard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] MTD: Intel StrataFlash P33 is locked on bootup
  2008-01-30  2:13 ` Jared Hulbert
  2008-01-30  2:32   ` Nicolas Pitre
  2008-01-30 12:51   ` Haavard Skinnemoen
@ 2008-01-30 12:53   ` Haavard Skinnemoen
  2008-01-30 17:19     ` Jared Hulbert
  2 siblings, 1 reply; 8+ messages in thread
From: Haavard Skinnemoen @ 2008-01-30 12:53 UTC (permalink / raw)
  To: Jared Hulbert
  Cc: David Woodhouse, Paolo.Santos, Nicolas Pitre, Justin Treon,
	linux-mtd

On Tue, 29 Jan 2008 18:13:43 -0800
"Jared Hulbert" <jaredeh@gmail.com> wrote:

> drivers/mtd/chips/cfi_cmdset_0001.c |   20 +++++++++++++-------
> drivers/mtd/cmdlinepart.c           |    9 ++++++++-
> drivers/mtd/mtdcore.c               |    2 +-
> include/mtd/mtd-abi.h               |    2 +-
> 4 files changed, 23 insertions(+), 10 deletions(-)

Hang on a second though...

> diff -r c105f44cf785 include/mtd/mtd-abi.h
> --- a/include/mtd/mtd-abi.h	Thu Nov 08 15:36:57 2007 -0800
> +++ b/include/mtd/mtd-abi.h	Fri Nov 09 10:43:28 2007 -0800
> @@ -29,7 +29,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 */
> +#define MTD_POWERUP_LOCK	0x2000	/* Always locked after reset */
> 
>  // Some common devices / combinations of capabilities
>  #define MTD_CAP_ROM		0

This will break cfi_cmdset_0002.c, which also uses MTD_STUPID_LOCK.

Haavard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] MTD: Intel StrataFlash P33 is locked on bootup
  2008-01-30 12:53   ` Haavard Skinnemoen
@ 2008-01-30 17:19     ` Jared Hulbert
  2008-01-30 17:22       ` Haavard Skinnemoen
  0 siblings, 1 reply; 8+ messages in thread
From: Jared Hulbert @ 2008-01-30 17:19 UTC (permalink / raw)
  To: Haavard Skinnemoen
  Cc: David Woodhouse, Paolo.Santos, Nicolas Pitre, Justin Treon,
	linux-mtd

> This will break cfi_cmdset_0002.c, which also uses MTD_STUPID_LOCK.

Oh.  That should be fixed ;)  Thanks for catching this.  We need more
inclusive tests.

So if I add this hunk, it should work right?


diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c
b/drivers/mtd/chips/cfi_cmdset_0002.c
index 796bfea..d072e87 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -217,7 +217,7 @@ static void fixup_use_atmel_lock(struct mtd_info
*mtd, void *param)
 {
 	mtd->lock = cfi_atmel_lock;
 	mtd->unlock = cfi_atmel_unlock;
-	mtd->flags |= MTD_STUPID_LOCK;
+	mtd->flags |= MTD_POWERUP_LOCK;
 }

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] MTD: Intel StrataFlash P33 is locked on bootup
  2008-01-30 17:19     ` Jared Hulbert
@ 2008-01-30 17:22       ` Haavard Skinnemoen
  2008-01-30 18:25         ` Jared Hulbert
  0 siblings, 1 reply; 8+ messages in thread
From: Haavard Skinnemoen @ 2008-01-30 17:22 UTC (permalink / raw)
  To: Jared Hulbert
  Cc: David Woodhouse, Paolo.Santos, Nicolas Pitre, Justin Treon,
	linux-mtd

On Wed, 30 Jan 2008 09:19:54 -0800
"Jared Hulbert" <jaredeh@gmail.com> wrote:

> > This will break cfi_cmdset_0002.c, which also uses MTD_STUPID_LOCK.  
> 
> Oh.  That should be fixed ;)  Thanks for catching this.  We need more
> inclusive tests.
> 
> So if I add this hunk, it should work right?

Yeah, that should do it.

Haavard

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] MTD: Intel StrataFlash P33 is locked on bootup
  2008-01-30 17:22       ` Haavard Skinnemoen
@ 2008-01-30 18:25         ` Jared Hulbert
  0 siblings, 0 replies; 8+ messages in thread
From: Jared Hulbert @ 2008-01-30 18:25 UTC (permalink / raw)
  To: Haavard Skinnemoen
  Cc: David Woodhouse, Paolo.Santos, Nicolas Pitre, Justin Treon,
	linux-mtd

> > So if I add this hunk, it should work right?
>
> Yeah, that should do it.

The new patch is in "git://git.infradead.org/users/jehulber/mtd.git"

mailer mangled patch follows for reference.
________________________________________

From: Justin Treon <justin_treon@yahoo.com>
[MTD] Unlocking all Intel flash that is locked on power up.

Patch for unlocking all Intel flash that has instant locking on power up.
The patch has been tested on Intel M18, P30 and J3D Strata Flash.
  1.    The automatic unlocking can be disabled for a particular partition
         in the map or the command line.
     a. For the bit mask in the map it should look like:
         .mask_flags   = MTD_POWERUP_LOCK,
     b. For the command line parsing it should look like:
         mtdparts=0x80000(bootloader)lk
  2.    This will only unlock parts with instant individual block locking.
         Intel parts with legacy unlocking will not be unlocked.

Signed-off-by: Justin Treon <justin_treon@yahoo.com>
Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
Acked-by: Nicolas Pitre <nico@cam.org>
---

drivers/mtd/chips/cfi_cmdset_0001.c |   18 ++++++++++++------
drivers/mtd/chips/cfi_cmdset_0002.c |    2 +-
drivers/mtd/cmdlinepart.c           |    9 ++++++++-
drivers/mtd/mtdcore.c               |    2 +-
include/mtd/mtd-abi.h               |    2 +-
5 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c
b/drivers/mtd/chips/cfi_cmdset_0001.c
index 7b44a57..47794d2 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -269,10 +269,16 @@ static void fixup_use_write_buffers(struct
mtd_info *mtd, void *param)
 /*
  * Some chips power-up with all sectors locked by default.
  */
-static void fixup_use_powerup_lock(struct mtd_info *mtd, void *param)
+static void fixup_unlock_powerup_lock(struct mtd_info *mtd, void *param)
 {
-	printk(KERN_INFO "Using auto-unlock on power-up/resume\n" );
-	mtd->flags |= MTD_STUPID_LOCK;
+	struct map_info *map = mtd->priv;
+	struct cfi_private *cfi = map->fldrv_priv;
+	struct cfi_pri_intelext *cfip = cfi->cmdset_priv;
+
+	if (cfip->FeatureSupport&32) {
+		printk(KERN_INFO "Using auto-unlock on power-up/resume\n" );
+		mtd->flags |= MTD_POWERUP_LOCK;
+	}
 }

 static struct cfi_fixup cfi_fixup_table[] = {
@@ -288,7 +294,7 @@ static struct cfi_fixup cfi_fixup_table[] = {
 #endif
 	{ CFI_MFR_ST, 0x00ba, /* M28W320CT */ fixup_st_m28w320ct, NULL },
 	{ CFI_MFR_ST, 0x00bb, /* M28W320CB */ fixup_st_m28w320cb, NULL },
-	{ MANUFACTURER_INTEL, 0x891c,	      fixup_use_powerup_lock, NULL, },
+	{ MANUFACTURER_INTEL, CFI_ID_ANY, fixup_unlock_powerup_lock, NULL, },
 	{ 0, 0, NULL, NULL }
 };

@@ -2352,7 +2358,7 @@ static int cfi_intelext_suspend(struct mtd_info *mtd)
 	struct flchip *chip;
 	int ret = 0;

-	if ((mtd->flags & MTD_STUPID_LOCK)
+	if ((mtd->flags & MTD_POWERUP_LOCK)
 	    && extp && (extp->FeatureSupport & (1 << 5)))
 		cfi_intelext_save_locks(mtd);

@@ -2463,7 +2469,7 @@ static void cfi_intelext_resume(struct mtd_info *mtd)
 		spin_unlock(chip->mutex);
 	}

-	if ((mtd->flags & MTD_STUPID_LOCK)
+	if ((mtd->flags & MTD_POWERUP_LOCK)
 	    && extp && (extp->FeatureSupport & (1 << 5)))
 		cfi_intelext_restore_locks(mtd);
 }
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c
b/drivers/mtd/chips/cfi_cmdset_0002.c
index 796bfea..d072e87 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -217,7 +217,7 @@ static void fixup_use_atmel_lock(struct mtd_info
*mtd, void *param)
 {
 	mtd->lock = cfi_atmel_lock;
 	mtd->unlock = cfi_atmel_unlock;
-	mtd->flags |= MTD_STUPID_LOCK;
+	mtd->flags |= MTD_POWERUP_LOCK;
 }

 static struct cfi_fixup cfi_fixup_table[] = {
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index 23fab14..b44292a 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -9,7 +9,7 @@
  *
  * mtdparts=<mtddef>[;<mtddef]
  * <mtddef>  := <mtd-id>:<partdef>[,<partdef>]
- * <partdef> := <size>[@offset][<name>][ro]
+ * <partdef> := <size>[@offset][<name>][ro][lk]
  * <mtd-id>  := unique name used in mapping driver/device (mtd->name)
  * <size>    := standard linux memsize OR "-" to denote all remaining space
  * <name>    := '(' NAME ')'
@@ -143,6 +143,13 @@ static struct mtd_partition * newpart(char *s,
 		s += 2;
         }

+        /* if lk is found do NOT unlock the MTD partition*/
+        if (strncmp(s, "lk", 2) == 0)
+	{
+		mask_flags |= MTD_POWERUP_LOCK;
+		s += 2;
+        }
+
 	/* test if more partitions are following */
 	if (*s == ',')
 	{
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 6c2645e..f7e7890 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -61,7 +61,7 @@ int add_mtd_device(struct mtd_info *mtd)

 			/* Some chips always power up locked. Unlock them now */
 			if ((mtd->flags & MTD_WRITEABLE)
-			    && (mtd->flags & MTD_STUPID_LOCK) && mtd->unlock) {
+			    && (mtd->flags & MTD_POWERUP_LOCK) && mtd->unlock) {
 				if (mtd->unlock(mtd, 0, mtd->size))
 					printk(KERN_WARNING
 					       "%s: unlock failed, "
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index f71dac4..615072c 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -29,7 +29,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 */
+#define MTD_POWERUP_LOCK	0x2000	/* Always locked after reset */

 // Some common devices / combinations of capabilities
 #define MTD_CAP_ROM		0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-01-30 18:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-29 18:36 [PATCH] MTD: Intel StrataFlash P33 is locked on bootup Haavard Skinnemoen
2008-01-30  2:13 ` Jared Hulbert
2008-01-30  2:32   ` Nicolas Pitre
2008-01-30 12:51   ` Haavard Skinnemoen
2008-01-30 12:53   ` Haavard Skinnemoen
2008-01-30 17:19     ` Jared Hulbert
2008-01-30 17:22       ` Haavard Skinnemoen
2008-01-30 18:25         ` Jared Hulbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox