summaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120/patches-3.3/a03-adm5120-remove-CONFIG_MTD_PARTITIONS.patch
blob: 4ee4af6efd8405fbd4351bbadc3f2819c98babbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
--- a/arch/mips/include/asm/mach-adm5120/adm5120_platform.h
+++ b/arch/mips/include/asm/mach-adm5120/adm5120_platform.h
@@ -28,10 +28,8 @@ struct adm5120_flash_platform_data {
 	void			(*set_vpp)(struct map_info *, int);
 	void			(*switch_bank)(unsigned);
 	u32			window_size;
-#ifdef CONFIG_MTD_PARTITIONS
 	unsigned int		nr_parts;
 	struct mtd_partition	*parts;
-#endif
 };
 
 struct adm5120_switch_platform_data {
--- a/arch/mips/adm5120/infineon/infineon.c
+++ b/arch/mips/adm5120/infineon/infineon.c
@@ -16,7 +16,6 @@
 #define EASY_CONFIG_OFFSET	0x10000
 #define EASY_CONFIG_SIZE	0x1000
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition easy_partitions[] = {
 	{
 		.name	= "admboot",
@@ -33,7 +32,6 @@ static struct mtd_partition easy_partiti
 		.size	= MTDPART_SIZ_FULL,
 	}
 };
-#endif /* CONFIG_MTD_PARTITIONS */
 
 static __init void easy_setup_mac(void)
 {
@@ -68,10 +66,8 @@ void __init easy_setup_pqfp(void)
 	gpio_direction_output(ADM5120_GPIO_PIN3, 0);
 	adm5120_flash0_data.switch_bank = switch_bank_gpio3;
 
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(easy_partitions);
 	adm5120_flash0_data.parts = easy_partitions;
-#endif /* CONFIG_MTD_PARTITIONS */
 
 	adm5120_add_device_uart(0);
 	adm5120_add_device_uart(1);
@@ -100,10 +96,8 @@ void __init easy_setup_bga(void)
 	gpio_direction_output(ADM5120_GPIO_PIN5, 0);
 	adm5120_flash0_data.switch_bank = switch_bank_gpio5;
 
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(easy_partitions);
 	adm5120_flash0_data.parts = easy_partitions;
-#endif /* CONFIG_MTD_PARTITIONS */
 
 	adm5120_add_device_uart(0);
 	adm5120_add_device_uart(1);
--- a/arch/mips/adm5120/cellvision/cellvision.c
+++ b/arch/mips/adm5120/cellvision/cellvision.c
@@ -19,7 +19,6 @@
 #define CELLVISION_CONFIG_OFFSET	0x8000
 #define CELLVISION_CONFIG_SIZE		0x1000
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition cas6xx_partitions[] = {
 	{
 		.name	= "admboot",
@@ -65,7 +64,6 @@ static struct mtd_partition cas7xx_parti
 		.size	= MTDPART_SIZ_FULL,
 	}
 };
-#endif /* CONFIG_MTD_PARTITIONS */
 
 static void switch_bank_gpio5(unsigned bank)
 {
@@ -105,20 +103,16 @@ void __init cellvision_mac_setup(void)
 
 void __init cas6xx_flash_setup(void)
 {
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(cas6xx_partitions);
 	adm5120_flash0_data.parts = cas6xx_partitions;
-#endif /* CONFIG_MTD_PARTITIONS */
 
 	cellvision_flash_setup();
 }
 
 void __init cas7xx_flash_setup(void)
 {
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(cas7xx_partitions);
 	adm5120_flash0_data.parts = cas7xx_partitions;
-#endif /* CONFIG_MTD_PARTITIONS */
 
 	cellvision_flash_setup();
 }
--- a/arch/mips/adm5120/edimax/br-61xx.c
+++ b/arch/mips/adm5120/edimax/br-61xx.c
@@ -18,7 +18,6 @@
 #define BR61XX_CONFIG_OFFSET	0x8000
 #define BR61XX_CONFIG_SIZE		0x1000
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition br61xx_partitions[] = {
 	{
 		.name	= "admboot",
@@ -35,7 +34,6 @@ static struct mtd_partition br61xx_parti
 		.size	= MTDPART_SIZ_FULL,
 	}
 };
-#endif /* CONFIG_MTD_PARTITIONS */
 
 static struct gpio_button br61xx_gpio_buttons[] __initdata = {
 	{
@@ -68,10 +66,8 @@ static void __init br61xx_mac_setup(void
 void __init br61xx_generic_setup(void)
 {
 
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(br61xx_partitions);
 	adm5120_flash0_data.parts = br61xx_partitions;
-#endif /* CONFIG_MTD_PARTITIONS */
 	adm5120_add_device_flash(0);
 
 	adm5120_add_device_gpio(BR61XX_GPIO_DEV_MASK);
--- a/arch/mips/adm5120/mikrotik/rb-1xx.c
+++ b/arch/mips/adm5120/mikrotik/rb-1xx.c
@@ -25,7 +25,6 @@ static struct adm5120_pci_irq rb1xx_pci_
 	PCIIRQ(3, 0, 1, ADM5120_IRQ_PCI2)
 };
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition rb1xx_nor_parts[] = {
 	{
 		.name	= "booter",
@@ -50,7 +49,6 @@ static struct mtd_partition rb1xx_nand_p
 		.size	= MTDPART_SIZ_FULL
 	}
 };
-#endif /* CONFIG_MTD_PARTITIONS */
 
 /*
  * We need to use the OLD Yaffs-1 OOB layout, otherwise the RB bootloader
@@ -79,10 +77,8 @@ static int rb1xx_nand_fixup(struct mtd_i
 struct platform_nand_data rb1xx_nand_data __initdata = {
 	.chip = {
 		.nr_chips	= 1,
-#ifdef CONFIG_MTD_PARTITIONS
 		.nr_partitions	= ARRAY_SIZE(rb1xx_nand_parts),
 		.partitions	= rb1xx_nand_parts,
-#endif /* CONFIG_MTD_PARTITIONS */
 		.chip_delay	= RB1XX_NAND_CHIP_DELAY,
 		.options	= NAND_NO_AUTOINCR,
 		.chip_fixup	= rb1xx_nand_fixup,
@@ -114,10 +110,8 @@ static void __init rb1xx_mac_setup(void)
 void __init rb1xx_add_device_flash(void)
 {
 	/* setup data for flash0 device */
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(rb1xx_nor_parts);
 	adm5120_flash0_data.parts = rb1xx_nor_parts;
-#endif /* CONFIG_MTD_PARTITIONS */
 	adm5120_flash0_data.window_size = 128*1024;
 
 	adm5120_add_device_flash(0);
--- a/arch/mips/adm5120/compex/wp54.c
+++ b/arch/mips/adm5120/compex/wp54.c
@@ -11,7 +11,6 @@
 
 #include "compex.h"
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition wp54g_wrt_partitions[] = {
 	{
 		.name	= "cfe",
@@ -28,7 +27,6 @@ static struct mtd_partition wp54g_wrt_pa
 		.size	= 0x010000,
 	}
 };
-#endif /* CONFIG_MTD_PARTITIONS */
 
 static struct adm5120_pci_irq wp54_pci_irqs[] __initdata = {
 	PCIIRQ(2, 0, 1, ADM5120_IRQ_PCI0),
@@ -83,10 +81,8 @@ MIPS_MACHINE(MACH_ADM5120_WP54, "WP54",
 
 static void __init wp54_wrt_setup(void)
 {
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(wp54g_wrt_partitions);
 	adm5120_flash0_data.parts = wp54g_wrt_partitions;
-#endif
 
 	wp54_setup();
 }
--- a/arch/mips/adm5120/zyxel/p-33x.c
+++ b/arch/mips/adm5120/zyxel/p-33x.c
@@ -16,7 +16,6 @@
 #define P33X_GPIO_FLASH_A20	ADM5120_GPIO_PIN5
 #define P33X_GPIO_DEV_MASK	(1 << P33X_GPIO_FLASH_A20)
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition p33x_partitions[] = {
 	{
 		.name	= "bootbase",
@@ -46,7 +45,6 @@ static struct mtd_partition p33x_partiti
 		.size	= MTDPART_SIZ_FULL,
 	}
 };
-#endif /* CONFIG_MTD_PARTITIONS */
 
 static struct adm5120_pci_irq p33x_pci_irqs[] __initdata = {
 	PCIIRQ(2, 0, 1, ADM5120_IRQ_PCI0),
@@ -75,10 +73,8 @@ void __init p33x_generic_setup(void)
 	gpio_request(P33X_GPIO_FLASH_A20, NULL); /* for flash A20 line */
 	gpio_direction_output(P33X_GPIO_FLASH_A20, 0);
 	adm5120_flash0_data.switch_bank = switch_bank_gpio5;
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(p33x_partitions);
 	adm5120_flash0_data.parts = p33x_partitions;
-#endif /* CONFIG_MTD_PARTITIONS */
 	adm5120_add_device_flash(0);
 
 	adm5120_add_device_uart(0);
--- a/arch/mips/adm5120/generic/eb-214a.c
+++ b/arch/mips/adm5120/generic/eb-214a.c
@@ -28,7 +28,6 @@
 #define EB214A_GPIO_DEV_MASK	0
 #define EB214A_CONFIG_OFFSET	0x4000
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition eb214a_partitions[] = {
 	{
 		.name	= "bootloader",
@@ -45,7 +44,6 @@ static struct mtd_partition eb214a_parti
 		.size	= MTDPART_SIZ_FULL,
 	}
 };
-#endif /* CONFIG_MTD_PARTITIONS */
 
 static struct adm5120_pci_irq eb214a_pci_irqs[] __initdata = {
 	PCIIRQ(4, 0, 1, ADM5120_IRQ_PCI0),
@@ -94,10 +92,8 @@ static void __init eb214a_mac_setup(void
 
 static void __init eb214a_setup(void)
 {
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(eb214a_partitions);
 	adm5120_flash0_data.parts = eb214a_partitions;
-#endif /* CONFIG_MTD_PARTITIONS */
 	adm5120_add_device_flash(0);
 
 	adm5120_add_device_gpio(EB214A_GPIO_DEV_MASK);
--- a/arch/mips/adm5120/motorola/pmugw.c
+++ b/arch/mips/adm5120/motorola/pmugw.c
@@ -26,7 +26,6 @@
 #define PMUGW_CONFIG_OFFSET	0x10000
 #define PMUGW_CONFIG_SIZE	0x1000
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition pmugw_partitions[] = {
 	{
 		.name	= "admboot",
@@ -43,7 +42,6 @@ static struct mtd_partition pmugw_partit
 		.size	= MTDPART_SIZ_FULL,
 	}
 };
-#endif /* CONFIG_MTD_PARTITIONS */
 
 static u8 pmugw_vlans[6] __initdata = {
 	0x41, 0x42, 0x44, 0x48, 0x50, 0x00
@@ -82,10 +80,8 @@ void __init pmugw_setup(void)
 	gpio_direction_output(ADM5120_GPIO_PIN5, 0);
 	adm5120_flash0_data.switch_bank = switch_bank_gpio5;
 
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(pmugw_partitions);
 	adm5120_flash0_data.parts = pmugw_partitions;
-#endif /* CONFIG_MTD_PARTITIONS */
 
 	adm5120_add_device_uart(1); /* ttyS0 */
 	adm5120_add_device_uart(0); /* ttyS1 */
--- a/arch/mips/adm5120/osbridge/5gxi.c
+++ b/arch/mips/adm5120/osbridge/5gxi.c
@@ -20,7 +20,6 @@
 #include <asm/mach-adm5120/adm5120_platform.h>
 #include <asm/mach-adm5120/adm5120_info.h>
 
-#ifdef CONFIG_MTD_PARTITIONS
 static struct mtd_partition osbridge_5gxi_partitions[] = {
 	{
 		.name	= "bootloader",
@@ -37,7 +36,6 @@ static struct mtd_partition osbridge_5gx
 		.size	= MTDPART_SIZ_FULL,
 	}
 };
-#endif /* CONFIG_MTD_PARTITIONS */
 
 static struct gpio_led osbridge_5gxi_gpio_leds[] __initdata = {
 	GPIO_LED_INV(ADM5120_GPIO_PIN6, "5gxi:green:user",	NULL),
@@ -54,10 +52,8 @@ static u8 osbridge_5gxi_vlans[6] __initd
 
 static void __init osbridge_5gxi_setup(void)
 {
-#ifdef CONFIG_MTD_PARTITIONS
 	adm5120_flash0_data.nr_parts = ARRAY_SIZE(osbridge_5gxi_partitions);
 	adm5120_flash0_data.parts = osbridge_5gxi_partitions;
-#endif /* CONFIG_MTD_PARTITIONS */
 
 	adm5120_add_device_uart(0);
 	adm5120_add_device_uart(1);