mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] misc mtd patches for 2.6.32
@ 2009-10-05 21:14 Mike Frysinger
  2009-10-05 21:14 ` [PATCH 1/3] mtd: m25p80: disable SST software protection bits by default Mike Frysinger
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mike Frysinger @ 2009-10-05 21:14 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mtd, David Woodhouse

David picked up the rest of my patches, but here's some that didn't make
it into his merge for 2.6.32.  The SST isn't critical, but it'd be nice
to have.  The gpio-addr-flash ones fix build errors in randconfig setups
as reported by some people due to missing depends/incomplete includes.

These can also be found in my 'for-mtd' branch in my Blackfin repo:
	git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin.git for-mtd

Graf Yang (1):
  mtd: m25p80: disable SST software protection bits by default

Mike Frysinger (2):
  mtd/maps: gpio-addr-flash: pull in linux/ headers rather than asm/
  mtd/maps: gpio-addr-flash: depend on GPIO arch support

 drivers/mtd/devices/m25p80.c       |    7 ++++---
 drivers/mtd/maps/Kconfig           |    1 +
 drivers/mtd/maps/gpio-addr-flash.c |    5 ++---
 3 files changed, 7 insertions(+), 6 deletions(-)


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

* [PATCH 1/3] mtd: m25p80: disable SST software protection bits by default
  2009-10-05 21:14 [PATCH 0/3] misc mtd patches for 2.6.32 Mike Frysinger
@ 2009-10-05 21:14 ` Mike Frysinger
  2009-10-05 21:14 ` [PATCH 2/3] mtd/maps: gpio-addr-flash: pull in linux/ headers rather than asm/ Mike Frysinger
  2009-10-05 21:14 ` [PATCH 3/3] mtd/maps: gpio-addr-flash: depend on GPIO arch support Mike Frysinger
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2009-10-05 21:14 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mtd, David Woodhouse, Graf Yang

From: Graf Yang <graf.yang@analog.com>

The SST SPI flashes is like Atmel SPI flashes in that the software
protection bits are set by default at power up, so clear them at init
time.

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/mtd/devices/m25p80.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 379c316..933267a 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -775,11 +775,12 @@ static int __devinit m25p_probe(struct spi_device *spi)
 	dev_set_drvdata(&spi->dev, flash);
 
 	/*
-	 * Atmel serial flash tend to power up
-	 * with the software protection bits set
+	 * Atmel and SST serial flash tend to power
+	 * up with the software protection bits set
 	 */
 
-	if (info->jedec_id >> 16 == 0x1f) {
+	if (info->jedec_id >> 16 == 0x1f ||
+	    info->jedec_id >> 16 == 0xbf) {
 		write_enable(flash);
 		write_sr(flash, 0);
 	}
-- 
1.6.5.rc2


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

* [PATCH 2/3] mtd/maps: gpio-addr-flash: pull in linux/ headers rather than asm/
  2009-10-05 21:14 [PATCH 0/3] misc mtd patches for 2.6.32 Mike Frysinger
  2009-10-05 21:14 ` [PATCH 1/3] mtd: m25p80: disable SST software protection bits by default Mike Frysinger
@ 2009-10-05 21:14 ` Mike Frysinger
  2009-10-05 21:14 ` [PATCH 3/3] mtd/maps: gpio-addr-flash: depend on GPIO arch support Mike Frysinger
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2009-10-05 21:14 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mtd, David Woodhouse

Now that there are linux/ versions of gpio.h and io.h, include those
rather than hitting the asm/ versions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/mtd/maps/gpio-addr-flash.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c
index 44ef9a4..1ad5caf 100644
--- a/drivers/mtd/maps/gpio-addr-flash.c
+++ b/drivers/mtd/maps/gpio-addr-flash.c
@@ -13,7 +13,9 @@
  * Licensed under the GPL-2 or later.
  */
 
+#include <linux/gpio.h>
 #include <linux/init.h>
+#include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/mtd/mtd.h>
@@ -23,9 +25,6 @@
 #include <linux/platform_device.h>
 #include <linux/types.h>
 
-#include <asm/gpio.h>
-#include <asm/io.h>
-
 #define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); })
 
 #define DRIVER_NAME "gpio-addr-flash"
-- 
1.6.5.rc2


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

* [PATCH 3/3] mtd/maps: gpio-addr-flash: depend on GPIO arch support
  2009-10-05 21:14 [PATCH 0/3] misc mtd patches for 2.6.32 Mike Frysinger
  2009-10-05 21:14 ` [PATCH 1/3] mtd: m25p80: disable SST software protection bits by default Mike Frysinger
  2009-10-05 21:14 ` [PATCH 2/3] mtd/maps: gpio-addr-flash: pull in linux/ headers rather than asm/ Mike Frysinger
@ 2009-10-05 21:14 ` Mike Frysinger
  2 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2009-10-05 21:14 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-mtd, David Woodhouse

The driver requires gpio functionality, so make sure we depend on that in
the Kconfig menu.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/mtd/maps/Kconfig |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 841e085..14be075 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -486,6 +486,7 @@ config MTD_BFIN_ASYNC
 
 config MTD_GPIO_ADDR
 	tristate "GPIO-assisted Flash Chip Support"
+	depends on GENERIC_GPIO || GPIOLIB
 	depends on MTD_COMPLEX_MAPPINGS
 	select MTD_PARTITIONS
 	help
-- 
1.6.5.rc2


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

end of thread, other threads:[~2009-10-05 21:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-05 21:14 [PATCH 0/3] misc mtd patches for 2.6.32 Mike Frysinger
2009-10-05 21:14 ` [PATCH 1/3] mtd: m25p80: disable SST software protection bits by default Mike Frysinger
2009-10-05 21:14 ` [PATCH 2/3] mtd/maps: gpio-addr-flash: pull in linux/ headers rather than asm/ Mike Frysinger
2009-10-05 21:14 ` [PATCH 3/3] mtd/maps: gpio-addr-flash: depend on GPIO arch support Mike Frysinger

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

all inboxes | Powered by JetHome®