diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-07 12:11:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-07 12:11:16 -0500 |
commit | e0d65113a70f1dc514e625cc4e7a7485a4bf72df (patch) | |
tree | 7320a130dc304623f5cf4b5dd8f67fb1776225ca /arch/arm | |
parent | cf5e15fbd72c13977720aa15b7b7e00e1d8fd8f2 (diff) | |
parent | 48e546b7f281f251893baa40769581fd15f085fb (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (226 commits)
mtd: tests: annotate as DANGEROUS in Kconfig
mtd: tests: don't use mtd0 as a default
mtd: clean up usage of MTD_DOCPROBE_ADDRESS
jffs2: add compr=lzo and compr=zlib options
jffs2: implement mount option parsing and compression overriding
mtd: nand: initialize ops.mode
mtd: provide an alias for the redboot module name
mtd: m25p80: don't probe device which has status of 'disabled'
mtd: nand_h1900 never worked
mtd: Add DiskOnChip G3 support
mtd: m25p80: add EON flash EN25Q32B into spi flash id table
mtd: mark block device queue as non-rotational
mtd: r852: make r852_pm_ops static
mtd: m25p80: add support for at25df321a spi data flash
mtd: mxc_nand: preset_v1_v2: unlock all NAND flash blocks
mtd: nand: switch `check_pattern()' to standard `memcmp()'
mtd: nand: invalidate cache on unaligned reads
mtd: nand: do not scan bad blocks with NAND_BBT_NO_OOB set
mtd: nand: wait to set BBT version
mtd: nand: scrub BBT on ECC errors
...
Fix up trivial conflicts:
- arch/arm/mach-at91/board-usb-a9260.c
Merged into board-usb-a926x.c
- drivers/mtd/maps/lantiq-flash.c
add_mtd_partitions -> mtd_device_register vs changed to use
mtd_device_parse_register.
Diffstat (limited to 'arch/arm')
38 files changed, 96 insertions, 168 deletions
diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c index 0487ea10c2d6..4282d96dffa8 100644 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c | |||
@@ -130,19 +130,14 @@ static struct mtd_partition __initdata afeb9260_nand_partition[] = { | |||
130 | }, | 130 | }, |
131 | }; | 131 | }; |
132 | 132 | ||
133 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
134 | { | ||
135 | *num_partitions = ARRAY_SIZE(afeb9260_nand_partition); | ||
136 | return afeb9260_nand_partition; | ||
137 | } | ||
138 | |||
139 | static struct atmel_nand_data __initdata afeb9260_nand_data = { | 133 | static struct atmel_nand_data __initdata afeb9260_nand_data = { |
140 | .ale = 21, | 134 | .ale = 21, |
141 | .cle = 22, | 135 | .cle = 22, |
142 | .rdy_pin = AT91_PIN_PC13, | 136 | .rdy_pin = AT91_PIN_PC13, |
143 | .enable_pin = AT91_PIN_PC14, | 137 | .enable_pin = AT91_PIN_PC14, |
144 | .partition_info = nand_partitions, | ||
145 | .bus_width_16 = 0, | 138 | .bus_width_16 = 0, |
139 | .parts = afeb9260_nand_partition, | ||
140 | .num_parts = ARRAY_SIZE(afeb9260_nand_partition), | ||
146 | }; | 141 | }; |
147 | 142 | ||
148 | 143 | ||
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index 747b2eaa9737..f90cfb32bad2 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -132,19 +132,14 @@ static struct mtd_partition __initdata cam60_nand_partition[] = { | |||
132 | }, | 132 | }, |
133 | }; | 133 | }; |
134 | 134 | ||
135 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
136 | { | ||
137 | *num_partitions = ARRAY_SIZE(cam60_nand_partition); | ||
138 | return cam60_nand_partition; | ||
139 | } | ||
140 | |||
141 | static struct atmel_nand_data __initdata cam60_nand_data = { | 135 | static struct atmel_nand_data __initdata cam60_nand_data = { |
142 | .ale = 21, | 136 | .ale = 21, |
143 | .cle = 22, | 137 | .cle = 22, |
144 | // .det_pin = ... not there | 138 | // .det_pin = ... not there |
145 | .rdy_pin = AT91_PIN_PA9, | 139 | .rdy_pin = AT91_PIN_PA9, |
146 | .enable_pin = AT91_PIN_PA7, | 140 | .enable_pin = AT91_PIN_PA7, |
147 | .partition_info = nand_partitions, | 141 | .parts = cam60_nand_partition, |
142 | .num_parts = ARRAY_SIZE(cam60_nand_partition), | ||
148 | }; | 143 | }; |
149 | 144 | ||
150 | static struct sam9_smc_config __initdata cam60_nand_smc_config = { | 145 | static struct sam9_smc_config __initdata cam60_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c index 062670351a6a..5dffd3be62d2 100644 --- a/arch/arm/mach-at91/board-cap9adk.c +++ b/arch/arm/mach-at91/board-cap9adk.c | |||
@@ -169,19 +169,14 @@ static struct mtd_partition __initdata cap9adk_nand_partitions[] = { | |||
169 | }, | 169 | }, |
170 | }; | 170 | }; |
171 | 171 | ||
172 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
173 | { | ||
174 | *num_partitions = ARRAY_SIZE(cap9adk_nand_partitions); | ||
175 | return cap9adk_nand_partitions; | ||
176 | } | ||
177 | |||
178 | static struct atmel_nand_data __initdata cap9adk_nand_data = { | 172 | static struct atmel_nand_data __initdata cap9adk_nand_data = { |
179 | .ale = 21, | 173 | .ale = 21, |
180 | .cle = 22, | 174 | .cle = 22, |
181 | // .det_pin = ... not connected | 175 | // .det_pin = ... not connected |
182 | // .rdy_pin = ... not connected | 176 | // .rdy_pin = ... not connected |
183 | .enable_pin = AT91_PIN_PD15, | 177 | .enable_pin = AT91_PIN_PD15, |
184 | .partition_info = nand_partitions, | 178 | .parts = cap9adk_nand_partitions, |
179 | .num_parts = ARRAY_SIZE(cap9adk_nand_partitions), | ||
185 | }; | 180 | }; |
186 | 181 | ||
187 | static struct sam9_smc_config __initdata cap9adk_nand_smc_config = { | 182 | static struct sam9_smc_config __initdata cap9adk_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index 15a3f1a87ab0..e61351ffad50 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c | |||
@@ -97,19 +97,14 @@ static struct mtd_partition __initdata kb9202_nand_partition[] = { | |||
97 | }, | 97 | }, |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
101 | { | ||
102 | *num_partitions = ARRAY_SIZE(kb9202_nand_partition); | ||
103 | return kb9202_nand_partition; | ||
104 | } | ||
105 | |||
106 | static struct atmel_nand_data __initdata kb9202_nand_data = { | 100 | static struct atmel_nand_data __initdata kb9202_nand_data = { |
107 | .ale = 22, | 101 | .ale = 22, |
108 | .cle = 21, | 102 | .cle = 21, |
109 | // .det_pin = ... not there | 103 | // .det_pin = ... not there |
110 | .rdy_pin = AT91_PIN_PC29, | 104 | .rdy_pin = AT91_PIN_PC29, |
111 | .enable_pin = AT91_PIN_PC28, | 105 | .enable_pin = AT91_PIN_PC28, |
112 | .partition_info = nand_partitions, | 106 | .parts = kb9202_nand_partition, |
107 | .num_parts = ARRAY_SIZE(kb9202_nand_partition), | ||
113 | }; | 108 | }; |
114 | 109 | ||
115 | static void __init kb9202_board_init(void) | 110 | static void __init kb9202_board_init(void) |
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c index 6094496f7edb..ef816c17dc61 100644 --- a/arch/arm/mach-at91/board-neocore926.c +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -182,19 +182,14 @@ static struct mtd_partition __initdata neocore926_nand_partition[] = { | |||
182 | }, | 182 | }, |
183 | }; | 183 | }; |
184 | 184 | ||
185 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
186 | { | ||
187 | *num_partitions = ARRAY_SIZE(neocore926_nand_partition); | ||
188 | return neocore926_nand_partition; | ||
189 | } | ||
190 | |||
191 | static struct atmel_nand_data __initdata neocore926_nand_data = { | 185 | static struct atmel_nand_data __initdata neocore926_nand_data = { |
192 | .ale = 21, | 186 | .ale = 21, |
193 | .cle = 22, | 187 | .cle = 22, |
194 | .rdy_pin = AT91_PIN_PB19, | 188 | .rdy_pin = AT91_PIN_PB19, |
195 | .rdy_pin_active_low = 1, | 189 | .rdy_pin_active_low = 1, |
196 | .enable_pin = AT91_PIN_PD15, | 190 | .enable_pin = AT91_PIN_PD15, |
197 | .partition_info = nand_partitions, | 191 | .parts = neocore926_nand_partition, |
192 | .num_parts = ARRAY_SIZE(neocore926_nand_partition), | ||
198 | }; | 193 | }; |
199 | 194 | ||
200 | static struct sam9_smc_config __initdata neocore926_nand_smc_config = { | 195 | static struct sam9_smc_config __initdata neocore926_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c index 938cc390bea3..07421bdb88ea 100644 --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c | |||
@@ -130,19 +130,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = { | |||
130 | }, | 130 | }, |
131 | }; | 131 | }; |
132 | 132 | ||
133 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
134 | { | ||
135 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
136 | return ek_nand_partition; | ||
137 | } | ||
138 | |||
139 | static struct atmel_nand_data __initdata ek_nand_data = { | 133 | static struct atmel_nand_data __initdata ek_nand_data = { |
140 | .ale = 21, | 134 | .ale = 21, |
141 | .cle = 22, | 135 | .cle = 22, |
142 | // .det_pin = ... not connected | 136 | // .det_pin = ... not connected |
143 | .rdy_pin = AT91_PIN_PC13, | 137 | .rdy_pin = AT91_PIN_PC13, |
144 | .enable_pin = AT91_PIN_PC14, | 138 | .enable_pin = AT91_PIN_PC14, |
145 | .partition_info = nand_partitions, | 139 | .parts = ek_nand_partition, |
140 | .num_parts = ARRAY_SIZE(ek_nand_partition), | ||
146 | }; | 141 | }; |
147 | 142 | ||
148 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 143 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c index b4ac30e38a9e..80a8c9c6e922 100644 --- a/arch/arm/mach-at91/board-rm9200dk.c +++ b/arch/arm/mach-at91/board-rm9200dk.c | |||
@@ -138,19 +138,14 @@ static struct mtd_partition __initdata dk_nand_partition[] = { | |||
138 | }, | 138 | }, |
139 | }; | 139 | }; |
140 | 140 | ||
141 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
142 | { | ||
143 | *num_partitions = ARRAY_SIZE(dk_nand_partition); | ||
144 | return dk_nand_partition; | ||
145 | } | ||
146 | |||
147 | static struct atmel_nand_data __initdata dk_nand_data = { | 141 | static struct atmel_nand_data __initdata dk_nand_data = { |
148 | .ale = 22, | 142 | .ale = 22, |
149 | .cle = 21, | 143 | .cle = 21, |
150 | .det_pin = AT91_PIN_PB1, | 144 | .det_pin = AT91_PIN_PB1, |
151 | .rdy_pin = AT91_PIN_PC2, | 145 | .rdy_pin = AT91_PIN_PC2, |
152 | // .enable_pin = ... not there | 146 | // .enable_pin = ... not there |
153 | .partition_info = nand_partitions, | 147 | .parts = dk_nand_partition, |
148 | .num_parts = ARRAY_SIZE(dk_nand_partition), | ||
154 | }; | 149 | }; |
155 | 150 | ||
156 | #define DK_FLASH_BASE AT91_CHIPSELECT_0 | 151 | #define DK_FLASH_BASE AT91_CHIPSELECT_0 |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index 2a21e790250e..072d53af98d9 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -131,19 +131,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = { | |||
131 | }, | 131 | }, |
132 | }; | 132 | }; |
133 | 133 | ||
134 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
135 | { | ||
136 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
137 | return ek_nand_partition; | ||
138 | } | ||
139 | |||
140 | static struct atmel_nand_data __initdata ek_nand_data = { | 134 | static struct atmel_nand_data __initdata ek_nand_data = { |
141 | .ale = 21, | 135 | .ale = 21, |
142 | .cle = 22, | 136 | .cle = 22, |
143 | // .det_pin = ... not connected | 137 | // .det_pin = ... not connected |
144 | .rdy_pin = AT91_PIN_PC13, | 138 | .rdy_pin = AT91_PIN_PC13, |
145 | .enable_pin = AT91_PIN_PC14, | 139 | .enable_pin = AT91_PIN_PC14, |
146 | .partition_info = nand_partitions, | 140 | .parts = ek_nand_partition, |
141 | .num_parts = ARRAY_SIZE(ek_nand_partition), | ||
147 | }; | 142 | }; |
148 | 143 | ||
149 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 144 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index 89c8b579bfda..4f10181a0782 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -173,19 +173,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = { | |||
173 | }, | 173 | }, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
177 | { | ||
178 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
179 | return ek_nand_partition; | ||
180 | } | ||
181 | |||
182 | static struct atmel_nand_data __initdata ek_nand_data = { | 176 | static struct atmel_nand_data __initdata ek_nand_data = { |
183 | .ale = 21, | 177 | .ale = 21, |
184 | .cle = 22, | 178 | .cle = 22, |
185 | // .det_pin = ... not connected | 179 | // .det_pin = ... not connected |
186 | .rdy_pin = AT91_PIN_PC13, | 180 | .rdy_pin = AT91_PIN_PC13, |
187 | .enable_pin = AT91_PIN_PC14, | 181 | .enable_pin = AT91_PIN_PC14, |
188 | .partition_info = nand_partitions, | 182 | .parts = ek_nand_partition, |
183 | .num_parts = ARRAY_SIZE(ek_nand_partition), | ||
189 | }; | 184 | }; |
190 | 185 | ||
191 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 186 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 3741f43cdae9..b005b738e8ff 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -179,19 +179,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = { | |||
179 | }, | 179 | }, |
180 | }; | 180 | }; |
181 | 181 | ||
182 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
183 | { | ||
184 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
185 | return ek_nand_partition; | ||
186 | } | ||
187 | |||
188 | static struct atmel_nand_data __initdata ek_nand_data = { | 182 | static struct atmel_nand_data __initdata ek_nand_data = { |
189 | .ale = 22, | 183 | .ale = 22, |
190 | .cle = 21, | 184 | .cle = 21, |
191 | // .det_pin = ... not connected | 185 | // .det_pin = ... not connected |
192 | .rdy_pin = AT91_PIN_PC15, | 186 | .rdy_pin = AT91_PIN_PC15, |
193 | .enable_pin = AT91_PIN_PC14, | 187 | .enable_pin = AT91_PIN_PC14, |
194 | .partition_info = nand_partitions, | 188 | .parts = ek_nand_partition, |
189 | .num_parts = ARRAY_SIZE(ek_nand_partition), | ||
195 | }; | 190 | }; |
196 | 191 | ||
197 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 192 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index a580dd451a41..bccdcf23caa1 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -180,19 +180,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = { | |||
180 | }, | 180 | }, |
181 | }; | 181 | }; |
182 | 182 | ||
183 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
184 | { | ||
185 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
186 | return ek_nand_partition; | ||
187 | } | ||
188 | |||
189 | static struct atmel_nand_data __initdata ek_nand_data = { | 183 | static struct atmel_nand_data __initdata ek_nand_data = { |
190 | .ale = 21, | 184 | .ale = 21, |
191 | .cle = 22, | 185 | .cle = 22, |
192 | // .det_pin = ... not connected | 186 | // .det_pin = ... not connected |
193 | .rdy_pin = AT91_PIN_PA22, | 187 | .rdy_pin = AT91_PIN_PA22, |
194 | .enable_pin = AT91_PIN_PD15, | 188 | .enable_pin = AT91_PIN_PD15, |
195 | .partition_info = nand_partitions, | 189 | .parts = ek_nand_partition, |
190 | .num_parts = ARRAY_SIZE(ek_nand_partition), | ||
196 | }; | 191 | }; |
197 | 192 | ||
198 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 193 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index 8d77c2ff96b2..64fc75c9d0ac 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -157,19 +157,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = { | |||
157 | }, | 157 | }, |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
161 | { | ||
162 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
163 | return ek_nand_partition; | ||
164 | } | ||
165 | |||
166 | /* det_pin is not connected */ | 160 | /* det_pin is not connected */ |
167 | static struct atmel_nand_data __initdata ek_nand_data = { | 161 | static struct atmel_nand_data __initdata ek_nand_data = { |
168 | .ale = 21, | 162 | .ale = 21, |
169 | .cle = 22, | 163 | .cle = 22, |
170 | .rdy_pin = AT91_PIN_PC13, | 164 | .rdy_pin = AT91_PIN_PC13, |
171 | .enable_pin = AT91_PIN_PC14, | 165 | .enable_pin = AT91_PIN_PC14, |
172 | .partition_info = nand_partitions, | 166 | .parts = ek_nand_partition, |
167 | .num_parts = ARRAY_SIZE(ek_nand_partition), | ||
173 | }; | 168 | }; |
174 | 169 | ||
175 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 170 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c index 2d6203ac1a42..92de9127923a 100644 --- a/arch/arm/mach-at91/board-sam9m10g45ek.c +++ b/arch/arm/mach-at91/board-sam9m10g45ek.c | |||
@@ -137,19 +137,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = { | |||
137 | }, | 137 | }, |
138 | }; | 138 | }; |
139 | 139 | ||
140 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
141 | { | ||
142 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
143 | return ek_nand_partition; | ||
144 | } | ||
145 | |||
146 | /* det_pin is not connected */ | 140 | /* det_pin is not connected */ |
147 | static struct atmel_nand_data __initdata ek_nand_data = { | 141 | static struct atmel_nand_data __initdata ek_nand_data = { |
148 | .ale = 21, | 142 | .ale = 21, |
149 | .cle = 22, | 143 | .cle = 22, |
150 | .rdy_pin = AT91_PIN_PC8, | 144 | .rdy_pin = AT91_PIN_PC8, |
151 | .enable_pin = AT91_PIN_PC14, | 145 | .enable_pin = AT91_PIN_PC14, |
152 | .partition_info = nand_partitions, | 146 | .parts = ek_nand_partition, |
147 | .num_parts = ARRAY_SIZE(ek_nand_partition), | ||
153 | }; | 148 | }; |
154 | 149 | ||
155 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 150 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index 39a28effc3df..b2b748239f36 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -88,19 +88,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = { | |||
88 | }, | 88 | }, |
89 | }; | 89 | }; |
90 | 90 | ||
91 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
92 | { | ||
93 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
94 | return ek_nand_partition; | ||
95 | } | ||
96 | |||
97 | static struct atmel_nand_data __initdata ek_nand_data = { | 91 | static struct atmel_nand_data __initdata ek_nand_data = { |
98 | .ale = 21, | 92 | .ale = 21, |
99 | .cle = 22, | 93 | .cle = 22, |
100 | // .det_pin = ... not connected | 94 | // .det_pin = ... not connected |
101 | .rdy_pin = AT91_PIN_PD17, | 95 | .rdy_pin = AT91_PIN_PD17, |
102 | .enable_pin = AT91_PIN_PB6, | 96 | .enable_pin = AT91_PIN_PB6, |
103 | .partition_info = nand_partitions, | 97 | .parts = ek_nand_partition, |
98 | .num_parts = ARRAY_SIZE(ek_nand_partition), | ||
104 | }; | 99 | }; |
105 | 100 | ||
106 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | 101 | static struct sam9_smc_config __initdata ek_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-snapper9260.c b/arch/arm/mach-at91/board-snapper9260.c index c73d25e5faea..0df01c6e2d0c 100644 --- a/arch/arm/mach-at91/board-snapper9260.c +++ b/arch/arm/mach-at91/board-snapper9260.c | |||
@@ -97,18 +97,12 @@ static struct mtd_partition __initdata snapper9260_nand_partitions[] = { | |||
97 | }, | 97 | }, |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static struct mtd_partition * __init | ||
101 | snapper9260_nand_partition_info(int size, int *num_partitions) | ||
102 | { | ||
103 | *num_partitions = ARRAY_SIZE(snapper9260_nand_partitions); | ||
104 | return snapper9260_nand_partitions; | ||
105 | } | ||
106 | |||
107 | static struct atmel_nand_data __initdata snapper9260_nand_data = { | 100 | static struct atmel_nand_data __initdata snapper9260_nand_data = { |
108 | .ale = 21, | 101 | .ale = 21, |
109 | .cle = 22, | 102 | .cle = 22, |
110 | .rdy_pin = AT91_PIN_PC13, | 103 | .rdy_pin = AT91_PIN_PC13, |
111 | .partition_info = snapper9260_nand_partition_info, | 104 | .parts = snapper9260_nand_partitions, |
105 | .num_parts = ARRAY_SIZE(snapper9260_nand_partitions), | ||
112 | .bus_width_16 = 0, | 106 | .bus_width_16 = 0, |
113 | }; | 107 | }; |
114 | 108 | ||
diff --git a/arch/arm/mach-at91/board-usb-a926x.c b/arch/arm/mach-at91/board-usb-a926x.c index 5852d3d9890c..0a20bab21f99 100644 --- a/arch/arm/mach-at91/board-usb-a926x.c +++ b/arch/arm/mach-at91/board-usb-a926x.c | |||
@@ -190,19 +190,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = { | |||
190 | } | 190 | } |
191 | }; | 191 | }; |
192 | 192 | ||
193 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
194 | { | ||
195 | *num_partitions = ARRAY_SIZE(ek_nand_partition); | ||
196 | return ek_nand_partition; | ||
197 | } | ||
198 | |||
199 | static struct atmel_nand_data __initdata ek_nand_data = { | 193 | static struct atmel_nand_data __initdata ek_nand_data = { |
200 | .ale = 21, | 194 | .ale = 21, |
201 | .cle = 22, | 195 | .cle = 22, |
202 | // .det_pin = ... not connected | 196 | // .det_pin = ... not connected |
203 | .rdy_pin = AT91_PIN_PA22, | 197 | .rdy_pin = AT91_PIN_PA22, |
204 | .enable_pin = AT91_PIN_PD15, | 198 | .enable_pin = AT91_PIN_PD15, |
205 | .partition_info = nand_partitions, | 199 | .parts = ek_nand_partition, |
200 | .num_parts = ARRAY_SIZE(ek_nand_partition), | ||
206 | }; | 201 | }; |
207 | 202 | ||
208 | static struct sam9_smc_config __initdata usb_a9260_nand_smc_config = { | 203 | static struct sam9_smc_config __initdata usb_a9260_nand_smc_config = { |
diff --git a/arch/arm/mach-at91/board-yl-9200.c b/arch/arm/mach-at91/board-yl-9200.c index 3c288b396fc4..649b052231f5 100644 --- a/arch/arm/mach-at91/board-yl-9200.c +++ b/arch/arm/mach-at91/board-yl-9200.c | |||
@@ -172,19 +172,14 @@ static struct mtd_partition __initdata yl9200_nand_partition[] = { | |||
172 | } | 172 | } |
173 | }; | 173 | }; |
174 | 174 | ||
175 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
176 | { | ||
177 | *num_partitions = ARRAY_SIZE(yl9200_nand_partition); | ||
178 | return yl9200_nand_partition; | ||
179 | } | ||
180 | |||
181 | static struct atmel_nand_data __initdata yl9200_nand_data = { | 175 | static struct atmel_nand_data __initdata yl9200_nand_data = { |
182 | .ale = 6, | 176 | .ale = 6, |
183 | .cle = 7, | 177 | .cle = 7, |
184 | // .det_pin = ... not connected | 178 | // .det_pin = ... not connected |
185 | .rdy_pin = AT91_PIN_PC14, /* R/!B (Sheet10) */ | 179 | .rdy_pin = AT91_PIN_PC14, /* R/!B (Sheet10) */ |
186 | .enable_pin = AT91_PIN_PC15, /* !CE (Sheet10) */ | 180 | .enable_pin = AT91_PIN_PC15, /* !CE (Sheet10) */ |
187 | .partition_info = nand_partitions, | 181 | .parts = yl9200_nand_partition, |
182 | .num_parts = ARRAY_SIZE(yl9200_nand_partition), | ||
188 | }; | 183 | }; |
189 | 184 | ||
190 | /* | 185 | /* |
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index d07767f4052e..eac92e995bb5 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -117,7 +117,8 @@ struct atmel_nand_data { | |||
117 | u8 ale; /* address line number connected to ALE */ | 117 | u8 ale; /* address line number connected to ALE */ |
118 | u8 cle; /* address line number connected to CLE */ | 118 | u8 cle; /* address line number connected to CLE */ |
119 | u8 bus_width_16; /* buswidth is 16 bit */ | 119 | u8 bus_width_16; /* buswidth is 16 bit */ |
120 | struct mtd_partition* (*partition_info)(int, int*); | 120 | struct mtd_partition *parts; |
121 | unsigned int num_parts; | ||
121 | }; | 122 | }; |
122 | extern void __init at91_add_device_nand(struct atmel_nand_data *data); | 123 | extern void __init at91_add_device_nand(struct atmel_nand_data *data); |
123 | 124 | ||
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 26d94c0b555c..11c3db985285 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c | |||
@@ -377,7 +377,7 @@ static struct davinci_nand_pdata da830_evm_nand_pdata = { | |||
377 | .nr_parts = ARRAY_SIZE(da830_evm_nand_partitions), | 377 | .nr_parts = ARRAY_SIZE(da830_evm_nand_partitions), |
378 | .ecc_mode = NAND_ECC_HW, | 378 | .ecc_mode = NAND_ECC_HW, |
379 | .ecc_bits = 4, | 379 | .ecc_bits = 4, |
380 | .options = NAND_USE_FLASH_BBT, | 380 | .bbt_options = NAND_BBT_USE_FLASH, |
381 | .bbt_td = &da830_evm_nand_bbt_main_descr, | 381 | .bbt_td = &da830_evm_nand_bbt_main_descr, |
382 | .bbt_md = &da830_evm_nand_bbt_mirror_descr, | 382 | .bbt_md = &da830_evm_nand_bbt_mirror_descr, |
383 | .timing = &da830_evm_nandflash_timing, | 383 | .timing = &da830_evm_nandflash_timing, |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index ec21663f8ddc..1d7d24995226 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -256,7 +256,7 @@ static struct davinci_nand_pdata da850_evm_nandflash_data = { | |||
256 | .nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition), | 256 | .nr_parts = ARRAY_SIZE(da850_evm_nandflash_partition), |
257 | .ecc_mode = NAND_ECC_HW, | 257 | .ecc_mode = NAND_ECC_HW, |
258 | .ecc_bits = 4, | 258 | .ecc_bits = 4, |
259 | .options = NAND_USE_FLASH_BBT, | 259 | .bbt_options = NAND_BBT_USE_FLASH, |
260 | .timing = &da850_evm_nandflash_timing, | 260 | .timing = &da850_evm_nandflash_timing, |
261 | }; | 261 | }; |
262 | 262 | ||
diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index 65566280b7c9..4e0e707c313d 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c | |||
@@ -77,7 +77,7 @@ static struct davinci_nand_pdata davinci_nand_data = { | |||
77 | .parts = davinci_nand_partitions, | 77 | .parts = davinci_nand_partitions, |
78 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), | 78 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), |
79 | .ecc_mode = NAND_ECC_HW, | 79 | .ecc_mode = NAND_ECC_HW, |
80 | .options = NAND_USE_FLASH_BBT, | 80 | .bbt_options = NAND_BBT_USE_FLASH, |
81 | .ecc_bits = 4, | 81 | .ecc_bits = 4, |
82 | }; | 82 | }; |
83 | 83 | ||
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c index b307470b071d..ff2d2413279a 100644 --- a/arch/arm/mach-davinci/board-dm355-leopard.c +++ b/arch/arm/mach-davinci/board-dm355-leopard.c | |||
@@ -74,7 +74,7 @@ static struct davinci_nand_pdata davinci_nand_data = { | |||
74 | .parts = davinci_nand_partitions, | 74 | .parts = davinci_nand_partitions, |
75 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), | 75 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), |
76 | .ecc_mode = NAND_ECC_HW_SYNDROME, | 76 | .ecc_mode = NAND_ECC_HW_SYNDROME, |
77 | .options = NAND_USE_FLASH_BBT, | 77 | .bbt_options = NAND_BBT_USE_FLASH, |
78 | }; | 78 | }; |
79 | 79 | ||
80 | static struct resource davinci_nand_resources[] = { | 80 | static struct resource davinci_nand_resources[] = { |
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c index 04c43abcca66..1918ae711428 100644 --- a/arch/arm/mach-davinci/board-dm365-evm.c +++ b/arch/arm/mach-davinci/board-dm365-evm.c | |||
@@ -139,7 +139,7 @@ static struct davinci_nand_pdata davinci_nand_data = { | |||
139 | .parts = davinci_nand_partitions, | 139 | .parts = davinci_nand_partitions, |
140 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), | 140 | .nr_parts = ARRAY_SIZE(davinci_nand_partitions), |
141 | .ecc_mode = NAND_ECC_HW, | 141 | .ecc_mode = NAND_ECC_HW, |
142 | .options = NAND_USE_FLASH_BBT, | 142 | .bbt_options = NAND_BBT_USE_FLASH, |
143 | .ecc_bits = 4, | 143 | .ecc_bits = 4, |
144 | }; | 144 | }; |
145 | 145 | ||
diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 28fafa7819bc..0cf8abf78d33 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c | |||
@@ -151,7 +151,7 @@ static struct davinci_nand_pdata davinci_evm_nandflash_data = { | |||
151 | .parts = davinci_evm_nandflash_partition, | 151 | .parts = davinci_evm_nandflash_partition, |
152 | .nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition), | 152 | .nr_parts = ARRAY_SIZE(davinci_evm_nandflash_partition), |
153 | .ecc_mode = NAND_ECC_HW, | 153 | .ecc_mode = NAND_ECC_HW, |
154 | .options = NAND_USE_FLASH_BBT, | 154 | .bbt_options = NAND_BBT_USE_FLASH, |
155 | .timing = &davinci_evm_nandflash_timing, | 155 | .timing = &davinci_evm_nandflash_timing, |
156 | }; | 156 | }; |
157 | 157 | ||
diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 6efc84cceca0..3cfff555e8f2 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c | |||
@@ -396,7 +396,8 @@ static struct davinci_nand_pdata mityomapl138_nandflash_data = { | |||
396 | .parts = mityomapl138_nandflash_partition, | 396 | .parts = mityomapl138_nandflash_partition, |
397 | .nr_parts = ARRAY_SIZE(mityomapl138_nandflash_partition), | 397 | .nr_parts = ARRAY_SIZE(mityomapl138_nandflash_partition), |
398 | .ecc_mode = NAND_ECC_HW, | 398 | .ecc_mode = NAND_ECC_HW, |
399 | .options = NAND_USE_FLASH_BBT | NAND_BUSWIDTH_16, | 399 | .bbt_options = NAND_BBT_USE_FLASH, |
400 | .options = NAND_BUSWIDTH_16, | ||
400 | .ecc_bits = 1, /* 4 bit mode is not supported with 16 bit NAND */ | 401 | .ecc_bits = 1, /* 4 bit mode is not supported with 16 bit NAND */ |
401 | }; | 402 | }; |
402 | 403 | ||
diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c index 38d6f644d8b9..e5f231aefee4 100644 --- a/arch/arm/mach-davinci/board-neuros-osd2.c +++ b/arch/arm/mach-davinci/board-neuros-osd2.c | |||
@@ -87,7 +87,7 @@ static struct davinci_nand_pdata davinci_ntosd2_nandflash_data = { | |||
87 | .parts = davinci_ntosd2_nandflash_partition, | 87 | .parts = davinci_ntosd2_nandflash_partition, |
88 | .nr_parts = ARRAY_SIZE(davinci_ntosd2_nandflash_partition), | 88 | .nr_parts = ARRAY_SIZE(davinci_ntosd2_nandflash_partition), |
89 | .ecc_mode = NAND_ECC_HW, | 89 | .ecc_mode = NAND_ECC_HW, |
90 | .options = NAND_USE_FLASH_BBT, | 90 | .bbt_options = NAND_BBT_USE_FLASH, |
91 | }; | 91 | }; |
92 | 92 | ||
93 | static struct resource davinci_ntosd2_nandflash_resource[] = { | 93 | static struct resource davinci_ntosd2_nandflash_resource[] = { |
diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c index 90ee7b5aabdc..f69e40a29e02 100644 --- a/arch/arm/mach-davinci/board-tnetv107x-evm.c +++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c | |||
@@ -144,7 +144,7 @@ static struct davinci_nand_pdata nand_config = { | |||
144 | .parts = nand_partitions, | 144 | .parts = nand_partitions, |
145 | .nr_parts = ARRAY_SIZE(nand_partitions), | 145 | .nr_parts = ARRAY_SIZE(nand_partitions), |
146 | .ecc_mode = NAND_ECC_HW, | 146 | .ecc_mode = NAND_ECC_HW, |
147 | .options = NAND_USE_FLASH_BBT, | 147 | .bbt_options = NAND_BBT_USE_FLASH, |
148 | .ecc_bits = 1, | 148 | .ecc_bits = 1, |
149 | }; | 149 | }; |
150 | 150 | ||
diff --git a/arch/arm/mach-davinci/include/mach/nand.h b/arch/arm/mach-davinci/include/mach/nand.h index 025151049f05..1cf555aef896 100644 --- a/arch/arm/mach-davinci/include/mach/nand.h +++ b/arch/arm/mach-davinci/include/mach/nand.h | |||
@@ -74,8 +74,10 @@ struct davinci_nand_pdata { /* platform_data */ | |||
74 | nand_ecc_modes_t ecc_mode; | 74 | nand_ecc_modes_t ecc_mode; |
75 | u8 ecc_bits; | 75 | u8 ecc_bits; |
76 | 76 | ||
77 | /* e.g. NAND_BUSWIDTH_16 or NAND_USE_FLASH_BBT */ | 77 | /* e.g. NAND_BUSWIDTH_16 */ |
78 | unsigned options; | 78 | unsigned options; |
79 | /* e.g. NAND_BBT_USE_FLASH */ | ||
80 | unsigned bbt_options; | ||
79 | 81 | ||
80 | /* Main and mirror bbt descriptor overrides */ | 82 | /* Main and mirror bbt descriptor overrides */ |
81 | struct nand_bbt_descr *bbt_td; | 83 | struct nand_bbt_descr *bbt_td; |
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 1ade3c340507..8b2f1435bcac 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -116,8 +116,9 @@ static struct mtd_partition ts72xx_nand_parts[] = { | |||
116 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | 116 | .mask_flags = MTD_WRITEABLE, /* force read-only */ |
117 | }, { | 117 | }, { |
118 | .name = "Linux", | 118 | .name = "Linux", |
119 | .offset = MTDPART_OFS_APPEND, | 119 | .offset = MTDPART_OFS_RETAIN, |
120 | .size = 0, /* filled in later */ | 120 | .size = TS72XX_REDBOOT_PART_SIZE, |
121 | /* leave so much for last partition */ | ||
121 | }, { | 122 | }, { |
122 | .name = "RedBoot", | 123 | .name = "RedBoot", |
123 | .offset = MTDPART_OFS_APPEND, | 124 | .offset = MTDPART_OFS_APPEND, |
@@ -126,28 +127,14 @@ static struct mtd_partition ts72xx_nand_parts[] = { | |||
126 | }, | 127 | }, |
127 | }; | 128 | }; |
128 | 129 | ||
129 | static void ts72xx_nand_set_parts(uint64_t size, | ||
130 | struct platform_nand_chip *chip) | ||
131 | { | ||
132 | /* Factory TS-72xx boards only come with 32MiB or 128MiB NAND options */ | ||
133 | if (size == SZ_32M || size == SZ_128M) { | ||
134 | /* Set the "Linux" partition size */ | ||
135 | ts72xx_nand_parts[1].size = size - TS72XX_REDBOOT_PART_SIZE; | ||
136 | |||
137 | chip->partitions = ts72xx_nand_parts; | ||
138 | chip->nr_partitions = ARRAY_SIZE(ts72xx_nand_parts); | ||
139 | } else { | ||
140 | pr_warning("Unknown nand disk size:%lluMiB\n", size >> 20); | ||
141 | } | ||
142 | } | ||
143 | |||
144 | static struct platform_nand_data ts72xx_nand_data = { | 130 | static struct platform_nand_data ts72xx_nand_data = { |
145 | .chip = { | 131 | .chip = { |
146 | .nr_chips = 1, | 132 | .nr_chips = 1, |
147 | .chip_offset = 0, | 133 | .chip_offset = 0, |
148 | .chip_delay = 15, | 134 | .chip_delay = 15, |
149 | .part_probe_types = ts72xx_nand_part_probes, | 135 | .part_probe_types = ts72xx_nand_part_probes, |
150 | .set_parts = ts72xx_nand_set_parts, | 136 | .partitions = ts72xx_nand_parts, |
137 | .nr_partitions = ARRAY_SIZE(ts72xx_nand_parts), | ||
151 | }, | 138 | }, |
152 | .ctrl = { | 139 | .ctrl = { |
153 | .cmd_ctrl = ts72xx_nand_hwcontrol, | 140 | .cmd_ctrl = ts72xx_nand_hwcontrol, |
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 06b5ad774604..7a60bbbce7a4 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
@@ -167,8 +167,9 @@ static struct mtd_partition aspenite_nand_partitions[] = { | |||
167 | 167 | ||
168 | static struct pxa3xx_nand_platform_data aspenite_nand_info = { | 168 | static struct pxa3xx_nand_platform_data aspenite_nand_info = { |
169 | .enable_arbiter = 1, | 169 | .enable_arbiter = 1, |
170 | .parts = aspenite_nand_partitions, | 170 | .num_cs = 1, |
171 | .nr_parts = ARRAY_SIZE(aspenite_nand_partitions), | 171 | .parts[0] = aspenite_nand_partitions, |
172 | .nr_parts[0] = ARRAY_SIZE(aspenite_nand_partitions), | ||
172 | }; | 173 | }; |
173 | 174 | ||
174 | static struct i2c_board_info aspenite_i2c_info[] __initdata = { | 175 | static struct i2c_board_info aspenite_i2c_info[] __initdata = { |
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c index 6c75cd35c4c8..b35e2005a348 100644 --- a/arch/arm/mach-orion5x/ts78xx-setup.c +++ b/arch/arm/mach-orion5x/ts78xx-setup.c | |||
@@ -275,7 +275,7 @@ static struct platform_nand_data ts78xx_ts_nand_data = { | |||
275 | .partitions = ts78xx_ts_nand_parts, | 275 | .partitions = ts78xx_ts_nand_parts, |
276 | .nr_partitions = ARRAY_SIZE(ts78xx_ts_nand_parts), | 276 | .nr_partitions = ARRAY_SIZE(ts78xx_ts_nand_parts), |
277 | .chip_delay = 15, | 277 | .chip_delay = 15, |
278 | .options = NAND_USE_FLASH_BBT, | 278 | .bbt_options = NAND_BBT_USE_FLASH, |
279 | }, | 279 | }, |
280 | .ctrl = { | 280 | .ctrl = { |
281 | /* | 281 | /* |
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 3a7387f93c38..e096bba8fd57 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
@@ -424,8 +424,9 @@ static struct mtd_partition cm_x300_nand_partitions[] = { | |||
424 | static struct pxa3xx_nand_platform_data cm_x300_nand_info = { | 424 | static struct pxa3xx_nand_platform_data cm_x300_nand_info = { |
425 | .enable_arbiter = 1, | 425 | .enable_arbiter = 1, |
426 | .keep_config = 1, | 426 | .keep_config = 1, |
427 | .parts = cm_x300_nand_partitions, | 427 | .num_cs = 1, |
428 | .nr_parts = ARRAY_SIZE(cm_x300_nand_partitions), | 428 | .parts[0] = cm_x300_nand_partitions, |
429 | .nr_parts[0] = ARRAY_SIZE(cm_x300_nand_partitions), | ||
429 | }; | 430 | }; |
430 | 431 | ||
431 | static void __init cm_x300_init_nand(void) | 432 | static void __init cm_x300_init_nand(void) |
diff --git a/arch/arm/mach-pxa/colibri-pxa3xx.c b/arch/arm/mach-pxa/colibri-pxa3xx.c index 3f9be419959d..2b8ca0de8a3d 100644 --- a/arch/arm/mach-pxa/colibri-pxa3xx.c +++ b/arch/arm/mach-pxa/colibri-pxa3xx.c | |||
@@ -139,8 +139,9 @@ static struct mtd_partition colibri_nand_partitions[] = { | |||
139 | static struct pxa3xx_nand_platform_data colibri_nand_info = { | 139 | static struct pxa3xx_nand_platform_data colibri_nand_info = { |
140 | .enable_arbiter = 1, | 140 | .enable_arbiter = 1, |
141 | .keep_config = 1, | 141 | .keep_config = 1, |
142 | .parts = colibri_nand_partitions, | 142 | .num_cs = 1, |
143 | .nr_parts = ARRAY_SIZE(colibri_nand_partitions), | 143 | .parts[0] = colibri_nand_partitions, |
144 | .nr_parts[0] = ARRAY_SIZE(colibri_nand_partitions), | ||
144 | }; | 145 | }; |
145 | 146 | ||
146 | void __init colibri_pxa3xx_init_nand(void) | 147 | void __init colibri_pxa3xx_init_nand(void) |
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index 0037e57e0cec..7b324ec6449f 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -325,8 +325,9 @@ static struct mtd_partition littleton_nand_partitions[] = { | |||
325 | 325 | ||
326 | static struct pxa3xx_nand_platform_data littleton_nand_info = { | 326 | static struct pxa3xx_nand_platform_data littleton_nand_info = { |
327 | .enable_arbiter = 1, | 327 | .enable_arbiter = 1, |
328 | .parts = littleton_nand_partitions, | 328 | .num_cs = 1, |
329 | .nr_parts = ARRAY_SIZE(littleton_nand_partitions), | 329 | .parts[0] = littleton_nand_partitions, |
330 | .nr_parts[0] = ARRAY_SIZE(littleton_nand_partitions), | ||
330 | }; | 331 | }; |
331 | 332 | ||
332 | static void __init littleton_init_nand(void) | 333 | static void __init littleton_init_nand(void) |
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c index b5a8fd3fce04..90928d6e1a5b 100644 --- a/arch/arm/mach-pxa/mxm8x10.c +++ b/arch/arm/mach-pxa/mxm8x10.c | |||
@@ -389,10 +389,11 @@ static struct mtd_partition mxm_8x10_nand_partitions[] = { | |||
389 | }; | 389 | }; |
390 | 390 | ||
391 | static struct pxa3xx_nand_platform_data mxm_8x10_nand_info = { | 391 | static struct pxa3xx_nand_platform_data mxm_8x10_nand_info = { |
392 | .enable_arbiter = 1, | 392 | .enable_arbiter = 1, |
393 | .keep_config = 1, | 393 | .keep_config = 1, |
394 | .parts = mxm_8x10_nand_partitions, | 394 | .num_cs = 1, |
395 | .nr_parts = ARRAY_SIZE(mxm_8x10_nand_partitions) | 395 | .parts[0] = mxm_8x10_nand_partitions, |
396 | .nr_parts[0] = ARRAY_SIZE(mxm_8x10_nand_partitions) | ||
396 | }; | 397 | }; |
397 | 398 | ||
398 | static void __init mxm_8x10_nand_init(void) | 399 | static void __init mxm_8x10_nand_init(void) |
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 6810cddec927..f0c05f4d12ed 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
@@ -346,8 +346,9 @@ static struct mtd_partition raumfeld_nand_partitions[] = { | |||
346 | static struct pxa3xx_nand_platform_data raumfeld_nand_info = { | 346 | static struct pxa3xx_nand_platform_data raumfeld_nand_info = { |
347 | .enable_arbiter = 1, | 347 | .enable_arbiter = 1, |
348 | .keep_config = 1, | 348 | .keep_config = 1, |
349 | .parts = raumfeld_nand_partitions, | 349 | .num_cs = 1, |
350 | .nr_parts = ARRAY_SIZE(raumfeld_nand_partitions), | 350 | .parts[0] = raumfeld_nand_partitions, |
351 | .nr_parts[0] = ARRAY_SIZE(raumfeld_nand_partitions), | ||
351 | }; | 352 | }; |
352 | 353 | ||
353 | /** | 354 | /** |
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index 31d496891891..6c39c3328418 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
@@ -366,8 +366,9 @@ static struct mtd_partition zylonite_nand_partitions[] = { | |||
366 | 366 | ||
367 | static struct pxa3xx_nand_platform_data zylonite_nand_info = { | 367 | static struct pxa3xx_nand_platform_data zylonite_nand_info = { |
368 | .enable_arbiter = 1, | 368 | .enable_arbiter = 1, |
369 | .parts = zylonite_nand_partitions, | 369 | .num_cs = 1, |
370 | .nr_parts = ARRAY_SIZE(zylonite_nand_partitions), | 370 | .parts[0] = zylonite_nand_partitions, |
371 | .nr_parts[0] = ARRAY_SIZE(zylonite_nand_partitions), | ||
371 | }; | 372 | }; |
372 | 373 | ||
373 | static void __init zylonite_init_nand(void) | 374 | static void __init zylonite_init_nand(void) |
diff --git a/arch/arm/plat-pxa/include/plat/pxa3xx_nand.h b/arch/arm/plat-pxa/include/plat/pxa3xx_nand.h index 442301fe48b4..c42f39f20195 100644 --- a/arch/arm/plat-pxa/include/plat/pxa3xx_nand.h +++ b/arch/arm/plat-pxa/include/plat/pxa3xx_nand.h | |||
@@ -41,6 +41,19 @@ struct pxa3xx_nand_flash { | |||
41 | struct pxa3xx_nand_timing *timing; /* NAND Flash timing */ | 41 | struct pxa3xx_nand_timing *timing; /* NAND Flash timing */ |
42 | }; | 42 | }; |
43 | 43 | ||
44 | /* | ||
45 | * Current pxa3xx_nand controller has two chip select which | ||
46 | * both be workable. | ||
47 | * | ||
48 | * Notice should be taken that: | ||
49 | * When you want to use this feature, you should not enable the | ||
50 | * keep configuration feature, for two chip select could be | ||
51 | * attached with different nand chip. The different page size | ||
52 | * and timing requirement make the keep configuration impossible. | ||
53 | */ | ||
54 | |||
55 | /* The max num of chip select current support */ | ||
56 | #define NUM_CHIP_SELECT (2) | ||
44 | struct pxa3xx_nand_platform_data { | 57 | struct pxa3xx_nand_platform_data { |
45 | 58 | ||
46 | /* the data flash bus is shared between the Static Memory | 59 | /* the data flash bus is shared between the Static Memory |
@@ -52,8 +65,11 @@ struct pxa3xx_nand_platform_data { | |||
52 | /* allow platform code to keep OBM/bootloader defined NFC config */ | 65 | /* allow platform code to keep OBM/bootloader defined NFC config */ |
53 | int keep_config; | 66 | int keep_config; |
54 | 67 | ||
55 | const struct mtd_partition *parts; | 68 | /* indicate how many chip selects will be used */ |
56 | unsigned int nr_parts; | 69 | int num_cs; |
70 | |||
71 | const struct mtd_partition *parts[NUM_CHIP_SELECT]; | ||
72 | unsigned int nr_parts[NUM_CHIP_SELECT]; | ||
57 | 73 | ||
58 | const struct pxa3xx_nand_flash * flash; | 74 | const struct pxa3xx_nand_flash * flash; |
59 | size_t num_flash; | 75 | size_t num_flash; |