aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-omap3touchbook.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3touchbook.c')
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c25
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 69d431bd05db..663c62d271e8 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
109static struct resource omap3touchbook_nand_resource = {
110 .flags = IORESOURCE_MEM,
111};
112
113static 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
125static struct omap2_hsmmc_info mmc[] = { 108static 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}