aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap1/board-fsample.c5
-rw-r--r--arch/arm/mach-omap1/board-h2.c16
-rw-r--r--arch/arm/mach-omap1/board-h3.c5
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c5
-rw-r--r--include/asm-arm/arch-omap/nand.h24
5 files changed, 39 insertions, 16 deletions
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index f550b19e1ecd..4f4640ba2a97 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -30,6 +30,7 @@
30#include <asm/arch/gpio.h> 30#include <asm/arch/gpio.h>
31#include <asm/arch/mux.h> 31#include <asm/arch/mux.h>
32#include <asm/arch/fpga.h> 32#include <asm/arch/fpga.h>
33#include <asm/arch/nand.h>
33#include <asm/arch/keypad.h> 34#include <asm/arch/keypad.h>
34#include <asm/arch/common.h> 35#include <asm/arch/common.h>
35#include <asm/arch/board.h> 36#include <asm/arch/board.h>
@@ -134,7 +135,7 @@ static struct platform_device nor_device = {
134 .resource = &nor_resource, 135 .resource = &nor_resource,
135}; 136};
136 137
137static struct nand_platform_data nand_data = { 138static struct omap_nand_platform_data nand_data = {
138 .options = NAND_SAMSUNG_LP_OPTIONS, 139 .options = NAND_SAMSUNG_LP_OPTIONS,
139}; 140};
140 141
@@ -202,7 +203,7 @@ static struct platform_device *devices[] __initdata = {
202 203
203#define P2_NAND_RB_GPIO_PIN 62 204#define P2_NAND_RB_GPIO_PIN 62
204 205
205static int nand_dev_ready(struct nand_platform_data *data) 206static int nand_dev_ready(struct omap_nand_platform_data *data)
206{ 207{
207 return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN); 208 return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN);
208} 209}
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index bfa04fa25524..1a69002e3f80 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -39,6 +39,7 @@
39 39
40#include <asm/arch/mux.h> 40#include <asm/arch/mux.h>
41#include <asm/arch/tc.h> 41#include <asm/arch/tc.h>
42#include <asm/arch/nand.h>
42#include <asm/arch/irda.h> 43#include <asm/arch/irda.h>
43#include <asm/arch/usb.h> 44#include <asm/arch/usb.h>
44#include <asm/arch/keypad.h> 45#include <asm/arch/keypad.h>
@@ -140,8 +141,6 @@ static struct platform_device h2_nor_device = {
140 .resource = &h2_nor_resource, 141 .resource = &h2_nor_resource,
141}; 142};
142 143
143#if 0 /* REVISIT: Enable when nand_platform_data is applied */
144
145static struct mtd_partition h2_nand_partitions[] = { 144static struct mtd_partition h2_nand_partitions[] = {
146#if 0 145#if 0
147 /* REVISIT: enable these partitions if you make NAND BOOT 146 /* REVISIT: enable these partitions if you make NAND BOOT
@@ -179,7 +178,7 @@ static struct mtd_partition h2_nand_partitions[] = {
179}; 178};
180 179
181/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */ 180/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */
182static struct nand_platform_data h2_nand_data = { 181static struct omap_nand_platform_data h2_nand_data = {
183 .options = NAND_SAMSUNG_LP_OPTIONS, 182 .options = NAND_SAMSUNG_LP_OPTIONS,
184 .parts = h2_nand_partitions, 183 .parts = h2_nand_partitions,
185 .nr_parts = ARRAY_SIZE(h2_nand_partitions), 184 .nr_parts = ARRAY_SIZE(h2_nand_partitions),
@@ -198,7 +197,6 @@ static struct platform_device h2_nand_device = {
198 .num_resources = 1, 197 .num_resources = 1,
199 .resource = &h2_nand_resource, 198 .resource = &h2_nand_resource,
200}; 199};
201#endif
202 200
203static struct resource h2_smc91x_resources[] = { 201static struct resource h2_smc91x_resources[] = {
204 [0] = { 202 [0] = {
@@ -335,7 +333,7 @@ static struct platform_device h2_mcbsp1_device = {
335 333
336static struct platform_device *h2_devices[] __initdata = { 334static struct platform_device *h2_devices[] __initdata = {
337 &h2_nor_device, 335 &h2_nor_device,
338 //&h2_nand_device, 336 &h2_nand_device,
339 &h2_smc91x_device, 337 &h2_smc91x_device,
340 &h2_irda_device, 338 &h2_irda_device,
341 &h2_kp_device, 339 &h2_kp_device,
@@ -409,15 +407,15 @@ static struct omap_lcd_config h2_lcd_config __initdata = {
409}; 407};
410 408
411static struct omap_board_config_kernel h2_config[] __initdata = { 409static struct omap_board_config_kernel h2_config[] __initdata = {
412 { OMAP_TAG_USB, &h2_usb_config }, 410 { OMAP_TAG_USB, &h2_usb_config },
413 { OMAP_TAG_MMC, &h2_mmc_config }, 411 { OMAP_TAG_MMC, &h2_mmc_config },
414 { OMAP_TAG_UART, &h2_uart_config }, 412 { OMAP_TAG_UART, &h2_uart_config },
415 { OMAP_TAG_LCD, &h2_lcd_config }, 413 { OMAP_TAG_LCD, &h2_lcd_config },
416}; 414};
417 415
418#define H2_NAND_RB_GPIO_PIN 62 416#define H2_NAND_RB_GPIO_PIN 62
419 417
420static int h2_nand_dev_ready(struct nand_platform_data *data) 418static int h2_nand_dev_ready(struct omap_nand_platform_data *data)
421{ 419{
422 return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN); 420 return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN);
423} 421}
@@ -436,12 +434,10 @@ static void __init h2_init(void)
436 h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys(); 434 h2_nor_resource.end = h2_nor_resource.start = omap_cs3_phys();
437 h2_nor_resource.end += SZ_32M - 1; 435 h2_nor_resource.end += SZ_32M - 1;
438 436
439#if 0 /* REVISIT: Enable when nand_platform_data is applied */
440 h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS; 437 h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS;
441 h2_nand_resource.end += SZ_4K - 1; 438 h2_nand_resource.end += SZ_4K - 1;
442 if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN))) 439 if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN)))
443 h2_nand_data.dev_ready = h2_nand_dev_ready; 440 h2_nand_data.dev_ready = h2_nand_dev_ready;
444#endif
445 441
446 omap_cfg_reg(L3_1610_FLASH_CS2B_OE); 442 omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
447 omap_cfg_reg(M8_1610_FLASH_CS2B_WE); 443 omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 056519860565..c4a7141bb78c 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -42,6 +42,7 @@
42#include <asm/arch/irqs.h> 42#include <asm/arch/irqs.h>
43#include <asm/arch/mux.h> 43#include <asm/arch/mux.h>
44#include <asm/arch/tc.h> 44#include <asm/arch/tc.h>
45#include <asm/arch/nand.h>
45#include <asm/arch/irda.h> 46#include <asm/arch/irda.h>
46#include <asm/arch/usb.h> 47#include <asm/arch/usb.h>
47#include <asm/arch/keypad.h> 48#include <asm/arch/keypad.h>
@@ -179,7 +180,7 @@ static struct mtd_partition nand_partitions[] = {
179}; 180};
180 181
181/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */ 182/* dip switches control NAND chip access: 8 bit, 16 bit, or neither */
182static struct nand_platform_data nand_data = { 183static struct omap_nand_platform_data nand_data = {
183 .options = NAND_SAMSUNG_LP_OPTIONS, 184 .options = NAND_SAMSUNG_LP_OPTIONS,
184 .parts = nand_partitions, 185 .parts = nand_partitions,
185 .nr_parts = ARRAY_SIZE(nand_partitions), 186 .nr_parts = ARRAY_SIZE(nand_partitions),
@@ -472,7 +473,7 @@ static struct i2c_board_info __initdata h3_i2c_board_info[] = {
472 473
473#define H3_NAND_RB_GPIO_PIN 10 474#define H3_NAND_RB_GPIO_PIN 10
474 475
475static int nand_dev_ready(struct nand_platform_data *data) 476static int nand_dev_ready(struct omap_nand_platform_data *data)
476{ 477{
477 return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN); 478 return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN);
478} 479}
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 534dcfb9d263..e79749df434b 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -30,6 +30,7 @@
30#include <asm/arch/gpio.h> 30#include <asm/arch/gpio.h>
31#include <asm/arch/mux.h> 31#include <asm/arch/mux.h>
32#include <asm/arch/fpga.h> 32#include <asm/arch/fpga.h>
33#include <asm/arch/nand.h>
33#include <asm/arch/keypad.h> 34#include <asm/arch/keypad.h>
34#include <asm/arch/common.h> 35#include <asm/arch/common.h>
35#include <asm/arch/board.h> 36#include <asm/arch/board.h>
@@ -133,7 +134,7 @@ static struct platform_device nor_device = {
133 .resource = &nor_resource, 134 .resource = &nor_resource,
134}; 135};
135 136
136static struct nand_platform_data nand_data = { 137static struct omap_nand_platform_data nand_data = {
137 .options = NAND_SAMSUNG_LP_OPTIONS, 138 .options = NAND_SAMSUNG_LP_OPTIONS,
138}; 139};
139 140
@@ -202,7 +203,7 @@ static struct platform_device *devices[] __initdata = {
202 203
203#define P2_NAND_RB_GPIO_PIN 62 204#define P2_NAND_RB_GPIO_PIN 62
204 205
205static int nand_dev_ready(struct nand_platform_data *data) 206static int nand_dev_ready(struct omap_nand_platform_data *data)
206{ 207{
207 return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN); 208 return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN);
208} 209}
diff --git a/include/asm-arm/arch-omap/nand.h b/include/asm-arm/arch-omap/nand.h
new file mode 100644
index 000000000000..17ae26e35353
--- /dev/null
+++ b/include/asm-arm/arch-omap/nand.h
@@ -0,0 +1,24 @@
1/*
2 * include/asm-arm/arch-omap/nand.h
3 *
4 * Copyright (C) 2006 Micron Technology Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#include <linux/mtd/partitions.h>
12
13struct omap_nand_platform_data {
14 unsigned int options;
15 int cs;
16 int gpio_irq;
17 struct mtd_partition *parts;
18 int nr_parts;
19 int (*nand_setup)(void __iomem *);
20 int (*dev_ready)(struct omap_nand_platform_data *);
21 int dma_channel;
22 void __iomem *gpmc_cs_baseaddr;
23 void __iomem *gpmc_baseaddr;
24};