Skip to contentSkip to conversation

Add OMAP2 / OMAP3 OneNAND driver

PATCH In review Adrian Hunter 1 participant 2 messages Aug 6, 2008 – Aug 12, 2008 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add OMAP2 / OMAP3 OneNAND driver

This driver had resided in the OMAP tree but is now to be in MTD.

Original authors were:
Jarkko Lavinen <[email protected]> and Juha Yrjola IRQ and DMA support written by Timo Teras

---

drivers/mtd/onenand/Kconfig         |    7 +
drivers/mtd/onenand/Makefile        |    1 +
drivers/mtd/onenand/omap2.c         |  777 +++++++++++++++++++++++++++++++++++
include/asm-arm/arch-omap/onenand.h |    7 +-
4 files changed, 791 insertions(+), 1 deletions(-)

create mode 100644 drivers/mtd/onenand/omap2.c

drivers/mtd/onenand/Kconfig +0 -0
index b94a61b..79fa79e 100644
@@ -27,6 +27,13 @@ config MTD_ONENAND_GENERIC

help
Support for OneNAND flash via platform device driver.

+config MTD_ONENAND_OMAP2
+ tristate "OneNAND on OMAP2/OMAP3 support"
+ depends on MTD_ONENAND && (ARCH_OMAP2 || ARCH_OMAP3)
+ help
+ Support for a OneNAND flash device connected to an OMAP2/OMAP3 CPU
+ via the GPMC memory controller.
+
config MTD_ONENAND_OTP
bool "OneNAND OTP Support"
select HAVE_MTD_OTP

drivers/mtd/onenand/Makefile +0 -0
index 4d2eacf..64b6cc6 100644
@@ -7,6 +7,7 @@ obj-$(CONFIG_MTD_ONENAND)		+= onenand.o
 

# Board specific.
obj-$(CONFIG_MTD_ONENAND_GENERIC) += generic.o
+obj-$(CONFIG_MTD_ONENAND_OMAP2) += omap2.o

# Simulator
obj-$(CONFIG_MTD_ONENAND_SIM) += onenand_sim.o

drivers/mtd/onenand/omap2.c new file +777 -0

777 lines not on this page · raw message

include/asm-arm/arch-omap/onenand.h +0 -0
index 6c959d0..e302371 100644
@@ -16,6 +16,11 @@ struct omap_onenand_platform_data {
	int			gpio_irq;
	struct mtd_partition	*parts;
	int			nr_parts;
-	int                     (*onenand_setup)(void __iomem *);
+	int                     (*onenand_setup)(void __iomem *, int freq);
	int			dma_channel;
};

+
+int omap2_onenand_rephase(void);
+
+#define ONENAND_MAX_PARTITIONS 8
+

Signature · 1 line
1.5.4.3