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-omap3beagle.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-omap3beagle.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 69b154cdc75d..dc5a7e8790c0 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -48,9 +48,6 @@ | |||
48 | #include "mux.h" | 48 | #include "mux.h" |
49 | #include "hsmmc.h" | 49 | #include "hsmmc.h" |
50 | 50 | ||
51 | #define GPMC_CS0_BASE 0x60 | ||
52 | #define GPMC_CS_SIZE 0x30 | ||
53 | |||
54 | #define NAND_BLOCK_SIZE SZ_128K | 51 | #define NAND_BLOCK_SIZE SZ_128K |
55 | 52 | ||
56 | static struct mtd_partition omap3beagle_nand_partitions[] = { | 53 | static struct mtd_partition omap3beagle_nand_partitions[] = { |
@@ -93,20 +90,6 @@ static struct omap_nand_platform_data omap3beagle_nand_data = { | |||
93 | .dev_ready = NULL, | 90 | .dev_ready = NULL, |
94 | }; | 91 | }; |
95 | 92 | ||
96 | static struct resource omap3beagle_nand_resource = { | ||
97 | .flags = IORESOURCE_MEM, | ||
98 | }; | ||
99 | |||
100 | static struct platform_device omap3beagle_nand_device = { | ||
101 | .name = "omap2-nand", | ||
102 | .id = -1, | ||
103 | .dev = { | ||
104 | .platform_data = &omap3beagle_nand_data, | ||
105 | }, | ||
106 | .num_resources = 1, | ||
107 | .resource = &omap3beagle_nand_resource, | ||
108 | }; | ||
109 | |||
110 | /* DSS */ | 93 | /* DSS */ |
111 | 94 | ||
112 | static int beagle_enable_dvi(struct omap_dss_device *dssdev) | 95 | static int beagle_enable_dvi(struct omap_dss_device *dssdev) |
@@ -424,8 +407,6 @@ static void __init omap3beagle_flash_init(void) | |||
424 | u8 cs = 0; | 407 | u8 cs = 0; |
425 | u8 nandcs = GPMC_CS_NUM + 1; | 408 | u8 nandcs = GPMC_CS_NUM + 1; |
426 | 409 | ||
427 | u32 gpmc_base_add = OMAP34XX_GPMC_VIRT; | ||
428 | |||
429 | /* find out the chip-select on which NAND exists */ | 410 | /* find out the chip-select on which NAND exists */ |
430 | while (cs < GPMC_CS_NUM) { | 411 | while (cs < GPMC_CS_NUM) { |
431 | u32 ret = 0; | 412 | u32 ret = 0; |
@@ -447,12 +428,9 @@ static void __init omap3beagle_flash_init(void) | |||
447 | 428 | ||
448 | if (nandcs < GPMC_CS_NUM) { | 429 | if (nandcs < GPMC_CS_NUM) { |
449 | omap3beagle_nand_data.cs = nandcs; | 430 | omap3beagle_nand_data.cs = nandcs; |
450 | omap3beagle_nand_data.gpmc_cs_baseaddr = (void *) | ||
451 | (gpmc_base_add + GPMC_CS0_BASE + nandcs * GPMC_CS_SIZE); | ||
452 | omap3beagle_nand_data.gpmc_baseaddr = (void *) (gpmc_base_add); | ||
453 | 431 | ||
454 | printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); | 432 | printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); |
455 | if (platform_device_register(&omap3beagle_nand_device) < 0) | 433 | if (gpmc_nand_init(&omap3beagle_nand_data) < 0) |
456 | printk(KERN_ERR "Unable to register NAND device\n"); | 434 | printk(KERN_ERR "Unable to register NAND device\n"); |
457 | } | 435 | } |
458 | } | 436 | } |