diff options
author | Tony Lindgren <tony@atomide.com> | 2007-12-11 16:50:17 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2008-02-08 13:38:00 -0500 |
commit | 78be63252bc9065dd0a12c106135655b7d4db1ec (patch) | |
tree | c31f30ea519dd11c80124aa7da9cc654e80e444f /arch/arm/mach-omap1/board-h2.c | |
parent | 85d05fb3fde692fdaa6b1f84c33fee718abebf0f (diff) |
ARM: OMAP1: Make omap1 boards to use omap_nand_platform_data
This patch adds omap_nand_platform data based on a patch
by Shahrom Sharif-Kashani <sshahrom@micron.com>, and makes
omap1 boards to use omap_nand_platform_data instead of
nand_platform_data used earlier.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-h2.c')
-rw-r--r-- | arch/arm/mach-omap1/board-h2.c | 16 |
1 files changed, 6 insertions, 10 deletions
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 | |||
145 | static struct mtd_partition h2_nand_partitions[] = { | 144 | static 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 */ |
182 | static struct nand_platform_data h2_nand_data = { | 181 | static 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 | ||
203 | static struct resource h2_smc91x_resources[] = { | 201 | static struct resource h2_smc91x_resources[] = { |
204 | [0] = { | 202 | [0] = { |
@@ -335,7 +333,7 @@ static struct platform_device h2_mcbsp1_device = { | |||
335 | 333 | ||
336 | static struct platform_device *h2_devices[] __initdata = { | 334 | static 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 | ||
411 | static struct omap_board_config_kernel h2_config[] __initdata = { | 409 | static 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 | ||
420 | static int h2_nand_dev_ready(struct nand_platform_data *data) | 418 | static 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); |