Commit 0ed10653 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: Make omap1 boards to use omap_nand_platform_data

Make omap1 boards to use omap_nand_platform_data
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent ac3f2360
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <asm/arch/gpio.h> #include <asm/arch/gpio.h>
#include <asm/arch/mux.h> #include <asm/arch/mux.h>
#include <asm/arch/fpga.h> #include <asm/arch/fpga.h>
#include <asm/arch/nand.h>
#include <asm/arch/keypad.h> #include <asm/arch/keypad.h>
#include <asm/arch/common.h> #include <asm/arch/common.h>
#include <asm/arch/board.h> #include <asm/arch/board.h>
...@@ -134,7 +135,7 @@ static struct platform_device nor_device = { ...@@ -134,7 +135,7 @@ static struct platform_device nor_device = {
.resource = &nor_resource, .resource = &nor_resource,
}; };
static struct nand_platform_data nand_data = { static struct omap_nand_platform_data nand_data = {
.options = NAND_SAMSUNG_LP_OPTIONS, .options = NAND_SAMSUNG_LP_OPTIONS,
}; };
...@@ -202,7 +203,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -202,7 +203,7 @@ static struct platform_device *devices[] __initdata = {
#define P2_NAND_RB_GPIO_PIN 62 #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); return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN);
} }
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <asm/arch/gpio-switch.h> #include <asm/arch/gpio-switch.h>
#include <asm/arch/mux.h> #include <asm/arch/mux.h>
#include <asm/arch/tc.h> #include <asm/arch/tc.h>
#include <asm/arch/nand.h>
#include <asm/arch/irda.h> #include <asm/arch/irda.h>
#include <asm/arch/usb.h> #include <asm/arch/usb.h>
#include <asm/arch/keypad.h> #include <asm/arch/keypad.h>
...@@ -180,7 +181,7 @@ static struct mtd_partition h2_nand_partitions[] = { ...@@ -180,7 +181,7 @@ static struct mtd_partition h2_nand_partitions[] = {
}; };
/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */ /* 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, .options = NAND_SAMSUNG_LP_OPTIONS,
.parts = h2_nand_partitions, .parts = h2_nand_partitions,
.nr_parts = ARRAY_SIZE(h2_nand_partitions), .nr_parts = ARRAY_SIZE(h2_nand_partitions),
...@@ -496,7 +497,7 @@ static struct omap_gpio_switch h2_gpio_switches[] __initdata = { ...@@ -496,7 +497,7 @@ static struct omap_gpio_switch h2_gpio_switches[] __initdata = {
#define H2_NAND_RB_GPIO_PIN 62 #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); return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN);
} }
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <asm/arch/irqs.h> #include <asm/arch/irqs.h>
#include <asm/arch/mux.h> #include <asm/arch/mux.h>
#include <asm/arch/tc.h> #include <asm/arch/tc.h>
#include <asm/arch/nand.h>
#include <asm/arch/irda.h> #include <asm/arch/irda.h>
#include <asm/arch/usb.h> #include <asm/arch/usb.h>
#include <asm/arch/keypad.h> #include <asm/arch/keypad.h>
...@@ -185,7 +186,7 @@ static struct mtd_partition nand_partitions[] = { ...@@ -185,7 +186,7 @@ static struct mtd_partition nand_partitions[] = {
}; };
/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */ /* 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, .options = NAND_SAMSUNG_LP_OPTIONS,
.parts = nand_partitions, .parts = nand_partitions,
.nr_parts = ARRAY_SIZE(nand_partitions), .nr_parts = ARRAY_SIZE(nand_partitions),
...@@ -561,7 +562,7 @@ static struct omap_gpio_switch h3_gpio_switches[] __initdata = { ...@@ -561,7 +562,7 @@ static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
#define H3_NAND_RB_GPIO_PIN 10 #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); return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN);
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <asm/arch/gpio.h> #include <asm/arch/gpio.h>
#include <asm/arch/mux.h> #include <asm/arch/mux.h>
#include <asm/arch/fpga.h> #include <asm/arch/fpga.h>
#include <asm/arch/nand.h>
#include <asm/arch/keypad.h> #include <asm/arch/keypad.h>
#include <asm/arch/common.h> #include <asm/arch/common.h>
#include <asm/arch/board.h> #include <asm/arch/board.h>
...@@ -133,7 +134,7 @@ static struct platform_device nor_device = { ...@@ -133,7 +134,7 @@ static struct platform_device nor_device = {
.resource = &nor_resource, .resource = &nor_resource,
}; };
static struct nand_platform_data nand_data = { static struct omap_nand_platform_data nand_data = {
.options = NAND_SAMSUNG_LP_OPTIONS, .options = NAND_SAMSUNG_LP_OPTIONS,
}; };
...@@ -202,7 +203,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -202,7 +203,7 @@ static struct platform_device *devices[] __initdata = {
#define P2_NAND_RB_GPIO_PIN 62 #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); return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN);
} }
......
...@@ -11,12 +11,14 @@ ...@@ -11,12 +11,14 @@
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
struct omap_nand_platform_data { struct omap_nand_platform_data {
unsigned int options;
int cs; int cs;
int gpio_irq; int gpio_irq;
struct mtd_partition *parts; struct mtd_partition *parts;
int nr_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; int dma_channel;
void __iomem *gpmc_cs_baseaddr; void __iomem *gpmc_cs_baseaddr;
void __iomem *gpmc_baseaddr; void __iomem *gpmc_baseaddr;
}; };
...@@ -36,18 +36,4 @@ struct flash_platform_data { ...@@ -36,18 +36,4 @@ struct flash_platform_data {
unsigned int nr_parts; 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 #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment