aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c1
-rw-r--r--arch/arm/mach-omap2/board-flash.c4
-rw-r--r--arch/arm/mach-omap2/common-board-devices.c6
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c10
-rw-r--r--arch/arm/plat-omap/include/plat/nand.h6
6 files changed, 6 insertions, 23 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index ceb581e2b1da..c938984480ed 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -162,9 +162,7 @@ static struct mtd_partition cm_t35_nand_partitions[] = {
162static struct omap_nand_platform_data cm_t35_nand_data = { 162static struct omap_nand_platform_data cm_t35_nand_data = {
163 .parts = cm_t35_nand_partitions, 163 .parts = cm_t35_nand_partitions,
164 .nr_parts = ARRAY_SIZE(cm_t35_nand_partitions), 164 .nr_parts = ARRAY_SIZE(cm_t35_nand_partitions),
165 .dma_channel = -1, /* disable DMA in OMAP NAND driver */
166 .cs = 0, 165 .cs = 0,
167
168}; 166};
169 167
170static void __init cm_t35_init_nand(void) 168static void __init cm_t35_init_nand(void)
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index c3a9fd35034a..a617a72ef781 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -236,7 +236,6 @@ static struct mtd_partition cm_t3517_nand_partitions[] = {
236static struct omap_nand_platform_data cm_t3517_nand_data = { 236static struct omap_nand_platform_data cm_t3517_nand_data = {
237 .parts = cm_t3517_nand_partitions, 237 .parts = cm_t3517_nand_partitions,
238 .nr_parts = ARRAY_SIZE(cm_t3517_nand_partitions), 238 .nr_parts = ARRAY_SIZE(cm_t3517_nand_partitions),
239 .dma_channel = -1, /* disable DMA in OMAP NAND driver */
240 .cs = 0, 239 .cs = 0,
241}; 240};
242 241
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index 729892fdcf2e..aa1b0cbe19d2 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -132,11 +132,7 @@ static struct gpmc_timings nand_timings = {
132}; 132};
133 133
134static struct omap_nand_platform_data board_nand_data = { 134static struct omap_nand_platform_data board_nand_data = {
135 .nand_setup = NULL,
136 .gpmc_t = &nand_timings, 135 .gpmc_t = &nand_timings,
137 .dma_channel = -1, /* disable DMA in OMAP NAND driver */
138 .dev_ready = NULL,
139 .devsize = 0, /* '0' for 8-bit, '1' for 16-bit device */
140}; 136};
141 137
142void 138void
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index 94ccf464677b..0043fa8e3703 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -115,9 +115,7 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
115#endif 115#endif
116 116
117#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) 117#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
118static struct omap_nand_platform_data nand_data = { 118static struct omap_nand_platform_data nand_data;
119 .dma_channel = -1, /* disable DMA in OMAP NAND driver */
120};
121 119
122void __init omap_nand_flash_init(int options, struct mtd_partition *parts, 120void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
123 int nr_parts) 121 int nr_parts)
@@ -148,7 +146,7 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
148 nand_data.cs = nandcs; 146 nand_data.cs = nandcs;
149 nand_data.parts = parts; 147 nand_data.parts = parts;
150 nand_data.nr_parts = nr_parts; 148 nand_data.nr_parts = nr_parts;
151 nand_data.options = options; 149 nand_data.devsize = options;
152 150
153 printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); 151 printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
154 if (gpmc_nand_init(&nand_data) < 0) 152 if (gpmc_nand_init(&nand_data) < 0)
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index c1791d08ae56..8ad210bda9a9 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -20,8 +20,6 @@
20#include <plat/board.h> 20#include <plat/board.h>
21#include <plat/gpmc.h> 21#include <plat/gpmc.h>
22 22
23static struct omap_nand_platform_data *gpmc_nand_data;
24
25static struct resource gpmc_nand_resource = { 23static struct resource gpmc_nand_resource = {
26 .flags = IORESOURCE_MEM, 24 .flags = IORESOURCE_MEM,
27}; 25};
@@ -33,7 +31,7 @@ static struct platform_device gpmc_nand_device = {
33 .resource = &gpmc_nand_resource, 31 .resource = &gpmc_nand_resource,
34}; 32};
35 33
36static int omap2_nand_gpmc_retime(void) 34static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data)
37{ 35{
38 struct gpmc_timings t; 36 struct gpmc_timings t;
39 int err; 37 int err;
@@ -83,13 +81,11 @@ static int omap2_nand_gpmc_retime(void)
83 return 0; 81 return 0;
84} 82}
85 83
86int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data) 84int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data)
87{ 85{
88 int err = 0; 86 int err = 0;
89 struct device *dev = &gpmc_nand_device.dev; 87 struct device *dev = &gpmc_nand_device.dev;
90 88
91 gpmc_nand_data = _nand_data;
92 gpmc_nand_data->nand_setup = omap2_nand_gpmc_retime;
93 gpmc_nand_device.dev.platform_data = gpmc_nand_data; 89 gpmc_nand_device.dev.platform_data = gpmc_nand_data;
94 90
95 err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE, 91 err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE,
@@ -100,7 +96,7 @@ int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data)
100 } 96 }
101 97
102 /* Set timings in GPMC */ 98 /* Set timings in GPMC */
103 err = omap2_nand_gpmc_retime(); 99 err = omap2_nand_gpmc_retime(gpmc_nand_data);
104 if (err < 0) { 100 if (err < 0) {
105 dev_err(dev, "Unable to set gpmc timings: %d\n", err); 101 dev_err(dev, "Unable to set gpmc timings: %d\n", err);
106 return err; 102 return err;
diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h
index d86d1ecf0068..67fc5060183e 100644
--- a/arch/arm/plat-omap/include/plat/nand.h
+++ b/arch/arm/plat-omap/include/plat/nand.h
@@ -19,15 +19,11 @@ enum nand_io {
19}; 19};
20 20
21struct omap_nand_platform_data { 21struct omap_nand_platform_data {
22 unsigned int options;
23 int cs; 22 int cs;
24 int gpio_irq;
25 struct mtd_partition *parts; 23 struct mtd_partition *parts;
26 struct gpmc_timings *gpmc_t; 24 struct gpmc_timings *gpmc_t;
27 int nr_parts; 25 int nr_parts;
28 int (*nand_setup)(void); 26 bool dev_ready;
29 int (*dev_ready)(struct omap_nand_platform_data *);
30 int dma_channel;
31 int gpmc_irq; 27 int gpmc_irq;
32 enum nand_io xfer_type; 28 enum nand_io xfer_type;
33 unsigned long phys_base; 29 unsigned long phys_base;