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(-)
From: Graf Yang <[email protected]>
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 <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
---
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
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 <[email protected]>
---
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
The driver requires gpio functionality, so make sure we depend on that in
the Kconfig menu.
Signed-off-by: Mike Frysinger <[email protected]>
---
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