[PATCH 1/1] MTD Maps: initial driver for using gpios to assist in addressing of parallel flash as is on the tinyboards

Previous thread: [PATCH 1/1] mtd/maps: blackfin async flash maps - fix bug: dont leak resources when initializing in case of errors by Bryan Wu on Friday, August 15, 2008 - 1:34 am. (1 message)

Next thread: linux-next: Tree for August 15 by Stephen Rothwell on Friday, August 15, 2008 - 1:40 am. (5 messages)

From: Mike Frysinger <vapier.adi@gmail.com>

extend driver to handle arbitrary number of gpios

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 drivers/mtd/maps/Kconfig           |    9 +
 drivers/mtd/maps/Makefile          |    1 +
 drivers/mtd/maps/gpio-addr-flash.c |  419 ++++++++++++++++++++++++++++++++++++
 3 files changed, 429 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/maps/gpio-addr-flash.c

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 50bb046..76f05ad 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -520,6 +520,15 @@ config MTD_BFIN_ASYNC
 
 	  If compiled as a module, it will be called bfin-async-flash.
 
+config MTD_GPIO_ADDR
+	tristate "GPIO-assisted Flash Chip Support"
+	select MTD_PARTITIONS
+	help
+	  Map driver which allows flashes to be partially physically addressed
+	  and assisted by GPIOs.
+
+	  If compiled as a module, it will be called gpio-addr-flash.
+
 config MTD_UCLINUX
 	tristate "Generic uClinux RAM/ROM filesystem support"
 	depends on MTD_PARTITIONS && MTD_RAM && !MMU
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index 6cda6df..fdfaa5e 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -65,3 +65,4 @@ obj-$(CONFIG_MTD_PLATRAM)	+= plat-ram.o
 obj-$(CONFIG_MTD_OMAP_NOR)	+= omap_nor.o
 obj-$(CONFIG_MTD_INTEL_VR_NOR)	+= intel_vr_nor.o
 obj-$(CONFIG_MTD_BFIN_ASYNC)	+= bfin-async-flash.o
+obj-$(CONFIG_MTD_GPIO_ADDR)	+= gpio-addr-flash.o
diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c
new file mode 100644
index 0000000..eae74d4
--- /dev/null
+++ b/drivers/mtd/maps/gpio-addr-flash.c
@@ -0,0 +1,419 @@
+/*
+ * drivers/mtd/maps/gpio-addr-flash.c
+ *
+ * Handle the case where a flash device is mostly addressed using physical
+ * line and supplemented by GPIOs.  This way you can hook up say a 8meg flash
+ * to a 2meg memory range and use the ...

You've added that macro twice in MTD code already -- and now you're
adding it twice more (although I suspect only one was intentional).
Where are we with putting it in include/linux/ where it belongs?

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation



--


i havent tried since the last thread on the topic went nowhere.  guess
i could try again.
-mike
--

Previous thread: [PATCH 1/1] mtd/maps: blackfin async flash maps - fix bug: dont leak resources when initializing in case of errors by Bryan Wu on Friday, August 15, 2008 - 1:34 am. (1 message)

Next thread: linux-next: Tree for August 15 by Stephen Rothwell on Friday, August 15, 2008 - 1:40 am. (5 messages)