diff options
author | Sukumar Ghorai <s-ghorai@ti.com> | 2010-07-09 05:14:46 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-08-02 08:41:17 -0400 |
commit | f450d86790ebf72ac93c7ea5addd6fa278aae64c (patch) | |
tree | 9ac542aca70b6845edad0ca026afc358e76bd97c /arch/arm/mach-omap2/board-omap3touchbook.c | |
parent | 2c01946c6b9ebaa5a89710bc42ca224a7f52f227 (diff) |
omap3 nand: fix issue in board file to detect nand
Board file modified for not to provide gpmc phys_base address to nand driver.
The gpmc_nand_init funciton is now used to detect the nand and required to
adopt _prob function as in nand/omap2.c
Signed-off-by: Sukumar Ghorai <s-ghorai@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3touchbook.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3touchbook.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 2f5f8233dd5b..288f9d5c7291 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -54,9 +54,6 @@ | |||
54 | 54 | ||
55 | #include <asm/setup.h> | 55 | #include <asm/setup.h> |
56 | 56 | ||
57 | #define GPMC_CS0_BASE 0x60 | ||
58 | #define GPMC_CS_SIZE 0x30 | ||
59 | |||
60 | #define NAND_BLOCK_SIZE SZ_128K | 57 | #define NAND_BLOCK_SIZE SZ_128K |
61 | 58 | ||
62 | #define OMAP3_AC_GPIO 136 | 59 | #define OMAP3_AC_GPIO 136 |
@@ -106,20 +103,6 @@ static struct omap_nand_platform_data omap3touchbook_nand_data = { | |||
106 | .dev_ready = NULL, | 103 | .dev_ready = NULL, |
107 | }; | 104 | }; |
108 | 105 | ||
109 | static struct resource omap3touchbook_nand_resource = { | ||
110 | .flags = IORESOURCE_MEM, | ||
111 | }; | ||
112 | |||
113 | static struct platform_device omap3touchbook_nand_device = { | ||
114 | .name = "omap2-nand", | ||
115 | .id = -1, | ||
116 | .dev = { | ||
117 | .platform_data = &omap3touchbook_nand_data, | ||
118 | }, | ||
119 | .num_resources = 1, | ||
120 | .resource = &omap3touchbook_nand_resource, | ||
121 | }; | ||
122 | |||
123 | #include "sdram-micron-mt46h32m32lf-6.h" | 106 | #include "sdram-micron-mt46h32m32lf-6.h" |
124 | 107 | ||
125 | static struct omap2_hsmmc_info mmc[] = { | 108 | static struct omap2_hsmmc_info mmc[] = { |
@@ -458,8 +441,6 @@ static void __init omap3touchbook_flash_init(void) | |||
458 | u8 cs = 0; | 441 | u8 cs = 0; |
459 | u8 nandcs = GPMC_CS_NUM + 1; | 442 | u8 nandcs = GPMC_CS_NUM + 1; |
460 | 443 | ||
461 | u32 gpmc_base_add = OMAP34XX_GPMC_VIRT; | ||
462 | |||
463 | /* find out the chip-select on which NAND exists */ | 444 | /* find out the chip-select on which NAND exists */ |
464 | while (cs < GPMC_CS_NUM) { | 445 | while (cs < GPMC_CS_NUM) { |
465 | u32 ret = 0; | 446 | u32 ret = 0; |
@@ -481,13 +462,9 @@ static void __init omap3touchbook_flash_init(void) | |||
481 | 462 | ||
482 | if (nandcs < GPMC_CS_NUM) { | 463 | if (nandcs < GPMC_CS_NUM) { |
483 | omap3touchbook_nand_data.cs = nandcs; | 464 | omap3touchbook_nand_data.cs = nandcs; |
484 | omap3touchbook_nand_data.gpmc_cs_baseaddr = (void *) | ||
485 | (gpmc_base_add + GPMC_CS0_BASE + nandcs * GPMC_CS_SIZE); | ||
486 | omap3touchbook_nand_data.gpmc_baseaddr = | ||
487 | (void *) (gpmc_base_add); | ||
488 | 465 | ||
489 | printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); | 466 | printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); |
490 | if (platform_device_register(&omap3touchbook_nand_device) < 0) | 467 | if (gpmc_nand_init(&omap3touchbook_nand_data) < 0) |
491 | printk(KERN_ERR "Unable to register NAND device\n"); | 468 | printk(KERN_ERR "Unable to register NAND device\n"); |
492 | } | 469 | } |
493 | } | 470 | } |