From 0ed10653d529abbaf37929323926981f16d03a08 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 10 Dec 2007 14:02:43 -0800 Subject: [PATCH] ARM: OMAP: Make omap1 boards to use omap_nand_platform_data Make omap1 boards to use omap_nand_platform_data Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/board-fsample.c | 5 +++-- arch/arm/mach-omap1/board-h2.c | 5 +++-- arch/arm/mach-omap1/board-h3.c | 5 +++-- arch/arm/mach-omap1/board-perseus2.c | 5 +++-- include/asm-arm/arch-omap/nand.h | 8 +++++--- include/asm-arm/mach/flash.h | 14 -------------- 6 files changed, 17 insertions(+), 25 deletions(-) diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index eaf9ef5a06a..6e73b9ab588 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -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); } diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 1ba59bb2a0f..61053b6557e 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -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); } diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 092c8144a60..ebd976b702e 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -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); } diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index 1b39b6bb6f6..f23102d3274 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -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); } diff --git a/include/asm-arm/arch-omap/nand.h b/include/asm-arm/arch-omap/nand.h index 5dd4e8688c5..17ae26e3535 100644 --- a/include/asm-arm/arch-omap/nand.h +++ b/include/asm-arm/arch-omap/nand.h @@ -11,12 +11,14 @@ #include 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; }; diff --git a/include/asm-arm/mach/flash.h b/include/asm-arm/mach/flash.h index 664b708d257..05b029ef637 100644 --- a/include/asm-arm/mach/flash.h +++ b/include/asm-arm/mach/flash.h @@ -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 -- 2.41.1