Skip to contentSkip to conversation

OMAP3: Add support for NAND on ZOOM2/LDP boards

PATCH In review vimal singh 1 participant 1 message Sep 10, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 2/3 OMAP3: Add support for NAND on ZOOM2/LDP boards

Sorry I clicked on -send- button without $SUBJECT. Correcting this time.

-vimal

From: Vimal Singh <[email protected]>

Adding NAND support for ZOOM2 and LDP board. I have tested it for ZOOM2 boards, someone can verify it for LDP, hopefully it should not have any problem.

The size of the U-Boot environment partition was increased to 1.25MB.

Vikram: Changed ldp name to zoom.
Future boards will be called Zoom2/3/4 etc. LDP is a Zoom1. Somhow the LDP name got stuck to that.

In v-3: Corrected prototype of 'unlock' function pointer in structure
'omap_nand_platform_data'.

---
 arch/arm/mach-omap2/Makefile                 |    2
 arch/arm/mach-omap2/board-ldp.c              |    2
 arch/arm/mach-omap2/board-zoom-flash.c       |  196 +++++++++++++++++++++++++++
 arch/arm/mach-omap2/board-zoom2.c            |    2
 arch/arm/plat-omap/include/mach/board-zoom.h |   36 ++++
 arch/arm/plat-omap/include/mach/nand.h       |    2
 6 files changed, 240 insertions(+)
arch/arm/mach-omap2/Makefile +2 -0
Index: linux-omap-2.6/arch/arm/mach-omap2/Makefile
===================================================================
@@ -59,6 +59,7 @@ obj-$(CONFIG_MACH_OMAP_APOLLON)		+= boar
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)		+= board-omap3beagle.o \
 					   mmc-twl4030.o
 obj-$(CONFIG_MACH_OMAP_LDP)		+= board-ldp.o \
+					   board-zoom-flash.o \
 					   mmc-twl4030.o
 obj-$(CONFIG_MACH_OVERO)		+= board-overo.o \
 					   mmc-twl4030.o
@@ -74,6 +75,7 @@ obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-
 					   board-rx51-peripherals.o \
 					   mmc-twl4030.o
 obj-$(CONFIG_MACH_OMAP_ZOOM2)		+= board-zoom2.o \
+					   board-zoom-flash.o \
 					   mmc-twl4030.o \
 					   board-zoom-debugboard.o
 
arch/arm/mach-omap2/board-ldp.c +2 -0
Index: linux-omap-2.6/arch/arm/mach-omap2/board-ldp.c
===================================================================
@@ -42,6 +42,7 @@
 #include <mach/control.h>
 #include <mach/usb.h>
 #include <mach/keypad.h>
+#include <mach/board-zoom.h>
 
 #include "mmc-twl4030.h"
 
@@ -381,6 +382,7 @@ static void __init omap_ldp_init(void)
 	ads7846_dev_init();
 	omap_serial_init();
 	usb_musb_init();
+	zoom_flash_init();
 
 	twl4030_mmc_init(mmc);
 	/* link regulators to MMC adapters */
arch/arm/mach-omap2/board-zoom-flash.c new file +196 -0

196 lines not on this page · raw message

arch/arm/mach-omap2/board-zoom2.c +2 -0
Index: linux-omap-2.6/arch/arm/mach-omap2/board-zoom2.c
===================================================================
@@ -20,6 +20,7 @@
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 
+#include <mach/board-zoom.h>
 #include <mach/common.h>
 #include <mach/usb.h>
 #include <mach/keypad.h>
@@ -267,6 +268,7 @@ static void __init omap_zoom2_init(void)
 	omap_serial_init();
 	omap_zoom2_debugboard_init();
 	usb_musb_init();
+	zoom_flash_init();
 }
 
 static void __init omap_zoom2_map_io(void)
arch/arm/plat-omap/include/mach/board-zoom.h new file +36 -0
Index: linux-omap-2.6/arch/arm/plat-omap/include/mach/board-zoom.h
===================================================================
@@ -0,0 +1,36 @@
+/*
+ * arch/arm/plat-omap/include/mach/board-ldp.h
+ *
+ * Hardware definitions for TI OMAP3 LDP/ZOOM2.
+ *
+ * Copyright (C) 2008-09 Texas Instruments Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
+ * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __ASM_ARCH_OMAP_LDP_H
+#define __ASM_ARCH_OMAP_LDP_H
+
+extern void zoom_flash_init(void);
+
+#define LDP3430_NAND_CS               0
+
+#endif /* __ASM_ARCH_OMAP_LDP_H */
arch/arm/plat-omap/include/mach/nand.h +2 -0
Index: linux-omap-2.6/arch/arm/plat-omap/include/mach/nand.h
===================================================================
@@ -18,6 +18,8 @@ struct omap_nand_platform_data {
 	int			nr_parts;
 	int			(*nand_setup)(void __iomem *);
 	int			(*dev_ready)(struct omap_nand_platform_data *);
+	int			(*unlock)(struct mtd_info *,
+						loff_t, size_t, int len);
 	int			dma_channel;
 	void __iomem		*gpmc_cs_baseaddr;
 	void __iomem		*gpmc_baseaddr;