]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Make omap1 boards to use omap_nand_platform_data
authorTony Lindgren <tony@atomide.com>
Mon, 10 Dec 2007 22:02:43 +0000 (14:02 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 10 Dec 2007 22:02:43 +0000 (14:02 -0800)
Make omap1 boards to use omap_nand_platform_data

Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-perseus2.c
include/asm-arm/arch-omap/nand.h
include/asm-arm/mach/flash.h

index eaf9ef5a06af4df6cddff6eaa570677315078a26..6e73b9ab58844c69ac738689e16d9446a0c25ef7 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/fpga.h>
+#include <asm/arch/nand.h>
 #include <asm/arch/keypad.h>
 #include <asm/arch/common.h>
 #include <asm/arch/board.h>
@@ -134,7 +135,7 @@ static struct platform_device nor_device = {
        .resource       = &nor_resource,
 };
 
-static struct nand_platform_data nand_data = {
+static struct omap_nand_platform_data nand_data = {
        .options        = NAND_SAMSUNG_LP_OPTIONS,
 };
 
@@ -202,7 +203,7 @@ static struct platform_device *devices[] __initdata = {
 
 #define P2_NAND_RB_GPIO_PIN    62
 
-static int nand_dev_ready(struct nand_platform_data *data)
+static int nand_dev_ready(struct omap_nand_platform_data *data)
 {
        return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN);
 }
index 1ba59bb2a0f36598e1959be9077b38077bd3571a..61053b6557e7483b78fc6e1e1e97601278ef45f5 100644 (file)
@@ -42,6 +42,7 @@
 #include <asm/arch/gpio-switch.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/tc.h>
+#include <asm/arch/nand.h>
 #include <asm/arch/irda.h>
 #include <asm/arch/usb.h>
 #include <asm/arch/keypad.h>
@@ -180,7 +181,7 @@ static struct mtd_partition h2_nand_partitions[] = {
 };
 
 /* dip switches control NAND chip access:  8 bit, 16 bit, or neither */
-static struct nand_platform_data h2_nand_data = {
+static struct omap_nand_platform_data h2_nand_data = {
        .options        = NAND_SAMSUNG_LP_OPTIONS,
        .parts          = h2_nand_partitions,
        .nr_parts       = ARRAY_SIZE(h2_nand_partitions),
@@ -496,7 +497,7 @@ static struct omap_gpio_switch h2_gpio_switches[] __initdata = {
 
 #define H2_NAND_RB_GPIO_PIN    62
 
-static int h2_nand_dev_ready(struct nand_platform_data *data)
+static int h2_nand_dev_ready(struct omap_nand_platform_data *data)
 {
        return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN);
 }
index 092c8144a60aa0d7658b915e3a0d92701988349b..ebd976b702ec9372d5abfcc783c0e1e3ac40e1b5 100644 (file)
@@ -46,6 +46,7 @@
 #include <asm/arch/irqs.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/tc.h>
+#include <asm/arch/nand.h>
 #include <asm/arch/irda.h>
 #include <asm/arch/usb.h>
 #include <asm/arch/keypad.h>
@@ -185,7 +186,7 @@ static struct mtd_partition nand_partitions[] = {
 };
 
 /* dip switches control NAND chip access:  8 bit, 16 bit, or neither */
-static struct nand_platform_data nand_data = {
+static struct omap_nand_platform_data nand_data = {
        .options        = NAND_SAMSUNG_LP_OPTIONS,
        .parts          = nand_partitions,
        .nr_parts       = ARRAY_SIZE(nand_partitions),
@@ -561,7 +562,7 @@ static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
 
 #define H3_NAND_RB_GPIO_PIN    10
 
-static int nand_dev_ready(struct nand_platform_data *data)
+static int nand_dev_ready(struct omap_nand_platform_data *data)
 {
        return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN);
 }
index 1b39b6bb6f6375ebb67ec24e55412006c6d86236..f23102d3274d8fbc1e72bec2a896629cecaa0607 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/fpga.h>
+#include <asm/arch/nand.h>
 #include <asm/arch/keypad.h>
 #include <asm/arch/common.h>
 #include <asm/arch/board.h>
@@ -133,7 +134,7 @@ static struct platform_device nor_device = {
        .resource       = &nor_resource,
 };
 
-static struct nand_platform_data nand_data = {
+static struct omap_nand_platform_data nand_data = {
        .options        = NAND_SAMSUNG_LP_OPTIONS,
 };
 
@@ -202,7 +203,7 @@ static struct platform_device *devices[] __initdata = {
 
 #define P2_NAND_RB_GPIO_PIN    62
 
-static int nand_dev_ready(struct nand_platform_data *data)
+static int nand_dev_ready(struct omap_nand_platform_data *data)
 {
        return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN);
 }
index 5dd4e8688c55c56ffdc46a7d0cacd0642f1255f0..17ae26e353534beff5e20b626fa9c992e703d7ad 100644 (file)
 #include <linux/mtd/partitions.h>
 
 struct omap_nand_platform_data {
+       unsigned int            options;
        int                     cs;
        int                     gpio_irq;
        struct mtd_partition    *parts;
        int                     nr_parts;
-       int                     (*nand_setup)(void __iomem *);
+       int                     (*nand_setup)(void __iomem *);
+       int                     (*dev_ready)(struct omap_nand_platform_data *);
        int                     dma_channel;
-       void __iomem            *gpmc_cs_baseaddr;
-       void __iomem            *gpmc_baseaddr;
+       void __iomem            *gpmc_cs_baseaddr;
+       void __iomem            *gpmc_baseaddr;
 };
index 664b708d2576689a80a6bb5199cb247cebfb6ffd..05b029ef6371c6203b1471897490bebce8920815 100644 (file)
@@ -36,18 +36,4 @@ struct flash_platform_data {
        unsigned int    nr_parts;
 };
 
-/**
- * struct nand_platform_data - platform data describing NAND flash banks
- * @dev_ready: tests if the NAND flash is ready (READY signal is high)
- * @options:   bitmask for nand_chip.options
- * @parts:     optional array of mtd_partitions for static partitioning
- * @nr_parts:  number of mtd_partitions for static partitoning
- */
-struct nand_platform_data {
-       int             (*dev_ready)(struct nand_platform_data *data);
-       unsigned int    options;
-       struct mtd_partition *parts;
-       unsigned int    nr_parts;
-};
-
 #endif