ath79: add tl-wr2543-v1 support
[oweals/openwrt.git] / target / linux / ath79 / patches-4.14 / 0023-MIPS-ath79-drop-mach-files.patch
1 From 6e38a86d50dba5cc1da9bfd07969d76dd3ac2dda Mon Sep 17 00:00:00 2001
2 From: John Crispin <john@phrozen.org>
3 Date: Tue, 6 Mar 2018 09:28:13 +0100
4 Subject: [PATCH 23/27] MIPS: ath79: drop mach files
5
6 Signed-off-by: John Crispin <john@phrozen.org>
7 ---
8  arch/mips/ath79/Kconfig        |  73 -------------------
9  arch/mips/ath79/Makefile       |  10 ---
10  arch/mips/ath79/mach-ap121.c   |  92 ------------------------
11  arch/mips/ath79/mach-ap136.c   | 156 -----------------------------------------
12  arch/mips/ath79/mach-ap81.c    | 100 --------------------------
13  arch/mips/ath79/mach-db120.c   | 136 -----------------------------------
14  arch/mips/ath79/mach-pb44.c    | 128 ---------------------------------
15  arch/mips/ath79/mach-ubnt-xm.c | 126 ---------------------------------
16  8 files changed, 821 deletions(-)
17  delete mode 100644 arch/mips/ath79/mach-ap121.c
18  delete mode 100644 arch/mips/ath79/mach-ap136.c
19  delete mode 100644 arch/mips/ath79/mach-ap81.c
20  delete mode 100644 arch/mips/ath79/mach-db120.c
21  delete mode 100644 arch/mips/ath79/mach-pb44.c
22  delete mode 100644 arch/mips/ath79/mach-ubnt-xm.c
23
24 --- a/arch/mips/ath79/Kconfig
25 +++ b/arch/mips/ath79/Kconfig
26 @@ -1,79 +1,6 @@
27  # SPDX-License-Identifier: GPL-2.0
28  if ATH79
29  
30 -menu "Atheros AR71XX/AR724X/AR913X machine selection"
31 -
32 -config ATH79_MACH_AP121
33 -       bool "Atheros AP121 reference board"
34 -       select SOC_AR933X
35 -       select ATH79_DEV_GPIO_BUTTONS
36 -       select ATH79_DEV_LEDS_GPIO
37 -       select ATH79_DEV_SPI
38 -       select ATH79_DEV_USB
39 -       select ATH79_DEV_WMAC
40 -       help
41 -         Say 'Y' here if you want your kernel to support the
42 -         Atheros AP121 reference board.
43 -
44 -config ATH79_MACH_AP136
45 -       bool "Atheros AP136 reference board"
46 -       select SOC_QCA955X
47 -       select ATH79_DEV_GPIO_BUTTONS
48 -       select ATH79_DEV_LEDS_GPIO
49 -       select ATH79_DEV_SPI
50 -       select ATH79_DEV_USB
51 -       select ATH79_DEV_WMAC
52 -       help
53 -         Say 'Y' here if you want your kernel to support the
54 -         Atheros AP136 reference board.
55 -
56 -config ATH79_MACH_AP81
57 -       bool "Atheros AP81 reference board"
58 -       select SOC_AR913X
59 -       select ATH79_DEV_GPIO_BUTTONS
60 -       select ATH79_DEV_LEDS_GPIO
61 -       select ATH79_DEV_SPI
62 -       select ATH79_DEV_USB
63 -       select ATH79_DEV_WMAC
64 -       help
65 -         Say 'Y' here if you want your kernel to support the
66 -         Atheros AP81 reference board.
67 -
68 -config ATH79_MACH_DB120
69 -       bool "Atheros DB120 reference board"
70 -       select SOC_AR934X
71 -       select ATH79_DEV_GPIO_BUTTONS
72 -       select ATH79_DEV_LEDS_GPIO
73 -       select ATH79_DEV_SPI
74 -       select ATH79_DEV_USB
75 -       select ATH79_DEV_WMAC
76 -       help
77 -         Say 'Y' here if you want your kernel to support the
78 -         Atheros DB120 reference board.
79 -
80 -config ATH79_MACH_PB44
81 -       bool "Atheros PB44 reference board"
82 -       select SOC_AR71XX
83 -       select ATH79_DEV_GPIO_BUTTONS
84 -       select ATH79_DEV_LEDS_GPIO
85 -       select ATH79_DEV_SPI
86 -       select ATH79_DEV_USB
87 -       help
88 -         Say 'Y' here if you want your kernel to support the
89 -         Atheros PB44 reference board.
90 -
91 -config ATH79_MACH_UBNT_XM
92 -       bool "Ubiquiti Networks XM (rev 1.0) board"
93 -       select SOC_AR724X
94 -       select ATH79_DEV_GPIO_BUTTONS
95 -       select ATH79_DEV_LEDS_GPIO
96 -       select ATH79_DEV_SPI
97 -       help
98 -         Say 'Y' here if you want your kernel to support the
99 -         Ubiquiti Networks XM (rev 1.0) board.
100 -
101 -endmenu
102 -
103  config SOC_AR71XX
104         select HW_HAS_PCI
105         def_bool n
106 --- a/arch/mips/ath79/Makefile
107 +++ b/arch/mips/ath79/Makefile
108 @@ -21,13 +21,3 @@ obj-$(CONFIG_ATH79_DEV_LEDS_GPIO)    += dev
109  obj-$(CONFIG_ATH79_DEV_SPI)            += dev-spi.o
110  obj-$(CONFIG_ATH79_DEV_USB)            += dev-usb.o
111  obj-$(CONFIG_ATH79_DEV_WMAC)           += dev-wmac.o
112 -
113 -#
114 -# Machines
115 -#
116 -obj-$(CONFIG_ATH79_MACH_AP121)         += mach-ap121.o
117 -obj-$(CONFIG_ATH79_MACH_AP136)         += mach-ap136.o
118 -obj-$(CONFIG_ATH79_MACH_AP81)          += mach-ap81.o
119 -obj-$(CONFIG_ATH79_MACH_DB120)         += mach-db120.o
120 -obj-$(CONFIG_ATH79_MACH_PB44)          += mach-pb44.o
121 -obj-$(CONFIG_ATH79_MACH_UBNT_XM)       += mach-ubnt-xm.o
122 --- a/arch/mips/ath79/mach-ap121.c
123 +++ /dev/null
124 @@ -1,92 +0,0 @@
125 -/*
126 - *  Atheros AP121 board support
127 - *
128 - *  Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
129 - *
130 - *  This program is free software; you can redistribute it and/or modify it
131 - *  under the terms of the GNU General Public License version 2 as published
132 - *  by the Free Software Foundation.
133 - */
134 -
135 -#include "machtypes.h"
136 -#include "dev-gpio-buttons.h"
137 -#include "dev-leds-gpio.h"
138 -#include "dev-spi.h"
139 -#include "dev-usb.h"
140 -#include "dev-wmac.h"
141 -
142 -#define AP121_GPIO_LED_WLAN            0
143 -#define AP121_GPIO_LED_USB             1
144 -
145 -#define AP121_GPIO_BTN_JUMPSTART       11
146 -#define AP121_GPIO_BTN_RESET           12
147 -
148 -#define AP121_KEYS_POLL_INTERVAL       20      /* msecs */
149 -#define AP121_KEYS_DEBOUNCE_INTERVAL   (3 * AP121_KEYS_POLL_INTERVAL)
150 -
151 -#define AP121_CAL_DATA_ADDR    0x1fff1000
152 -
153 -static struct gpio_led ap121_leds_gpio[] __initdata = {
154 -       {
155 -               .name           = "ap121:green:usb",
156 -               .gpio           = AP121_GPIO_LED_USB,
157 -               .active_low     = 0,
158 -       },
159 -       {
160 -               .name           = "ap121:green:wlan",
161 -               .gpio           = AP121_GPIO_LED_WLAN,
162 -               .active_low     = 0,
163 -       },
164 -};
165 -
166 -static struct gpio_keys_button ap121_gpio_keys[] __initdata = {
167 -       {
168 -               .desc           = "jumpstart button",
169 -               .type           = EV_KEY,
170 -               .code           = KEY_WPS_BUTTON,
171 -               .debounce_interval = AP121_KEYS_DEBOUNCE_INTERVAL,
172 -               .gpio           = AP121_GPIO_BTN_JUMPSTART,
173 -               .active_low     = 1,
174 -       },
175 -       {
176 -               .desc           = "reset button",
177 -               .type           = EV_KEY,
178 -               .code           = KEY_RESTART,
179 -               .debounce_interval = AP121_KEYS_DEBOUNCE_INTERVAL,
180 -               .gpio           = AP121_GPIO_BTN_RESET,
181 -               .active_low     = 1,
182 -       }
183 -};
184 -
185 -static struct spi_board_info ap121_spi_info[] = {
186 -       {
187 -               .bus_num        = 0,
188 -               .chip_select    = 0,
189 -               .max_speed_hz   = 25000000,
190 -               .modalias       = "mx25l1606e",
191 -       }
192 -};
193 -
194 -static struct ath79_spi_platform_data ap121_spi_data = {
195 -       .bus_num        = 0,
196 -       .num_chipselect = 1,
197 -};
198 -
199 -static void __init ap121_setup(void)
200 -{
201 -       u8 *cal_data = (u8 *) KSEG1ADDR(AP121_CAL_DATA_ADDR);
202 -
203 -       ath79_register_leds_gpio(-1, ARRAY_SIZE(ap121_leds_gpio),
204 -                                ap121_leds_gpio);
205 -       ath79_register_gpio_keys_polled(-1, AP121_KEYS_POLL_INTERVAL,
206 -                                       ARRAY_SIZE(ap121_gpio_keys),
207 -                                       ap121_gpio_keys);
208 -
209 -       ath79_register_spi(&ap121_spi_data, ap121_spi_info,
210 -                          ARRAY_SIZE(ap121_spi_info));
211 -       ath79_register_usb();
212 -       ath79_register_wmac(cal_data);
213 -}
214 -
215 -MIPS_MACHINE(ATH79_MACH_AP121, "AP121", "Atheros AP121 reference board",
216 -            ap121_setup);
217 --- a/arch/mips/ath79/mach-ap136.c
218 +++ /dev/null
219 @@ -1,156 +0,0 @@
220 -/*
221 - * Qualcomm Atheros AP136 reference board support
222 - *
223 - * Copyright (c) 2012 Qualcomm Atheros
224 - * Copyright (c) 2012-2013 Gabor Juhos <juhosg@openwrt.org>
225 - *
226 - * Permission to use, copy, modify, and/or distribute this software for any
227 - * purpose with or without fee is hereby granted, provided that the above
228 - * copyright notice and this permission notice appear in all copies.
229 - *
230 - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
231 - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
232 - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
233 - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
234 - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
235 - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
236 - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
237 - *
238 - */
239 -
240 -#include <linux/pci.h>
241 -#include <linux/ath9k_platform.h>
242 -
243 -#include "machtypes.h"
244 -#include "dev-gpio-buttons.h"
245 -#include "dev-leds-gpio.h"
246 -#include "dev-spi.h"
247 -#include "dev-usb.h"
248 -#include "dev-wmac.h"
249 -#include "pci.h"
250 -
251 -#define AP136_GPIO_LED_STATUS_RED      14
252 -#define AP136_GPIO_LED_STATUS_GREEN    19
253 -#define AP136_GPIO_LED_USB             4
254 -#define AP136_GPIO_LED_WLAN_2G         13
255 -#define AP136_GPIO_LED_WLAN_5G         12
256 -#define AP136_GPIO_LED_WPS_RED         15
257 -#define AP136_GPIO_LED_WPS_GREEN       20
258 -
259 -#define AP136_GPIO_BTN_WPS             16
260 -#define AP136_GPIO_BTN_RFKILL          21
261 -
262 -#define AP136_KEYS_POLL_INTERVAL       20      /* msecs */
263 -#define AP136_KEYS_DEBOUNCE_INTERVAL   (3 * AP136_KEYS_POLL_INTERVAL)
264 -
265 -#define AP136_WMAC_CALDATA_OFFSET 0x1000
266 -#define AP136_PCIE_CALDATA_OFFSET 0x5000
267 -
268 -static struct gpio_led ap136_leds_gpio[] __initdata = {
269 -       {
270 -               .name           = "qca:green:status",
271 -               .gpio           = AP136_GPIO_LED_STATUS_GREEN,
272 -               .active_low     = 1,
273 -       },
274 -       {
275 -               .name           = "qca:red:status",
276 -               .gpio           = AP136_GPIO_LED_STATUS_RED,
277 -               .active_low     = 1,
278 -       },
279 -       {
280 -               .name           = "qca:green:wps",
281 -               .gpio           = AP136_GPIO_LED_WPS_GREEN,
282 -               .active_low     = 1,
283 -       },
284 -       {
285 -               .name           = "qca:red:wps",
286 -               .gpio           = AP136_GPIO_LED_WPS_RED,
287 -               .active_low     = 1,
288 -       },
289 -       {
290 -               .name           = "qca:red:wlan-2g",
291 -               .gpio           = AP136_GPIO_LED_WLAN_2G,
292 -               .active_low     = 1,
293 -       },
294 -       {
295 -               .name           = "qca:red:usb",
296 -               .gpio           = AP136_GPIO_LED_USB,
297 -               .active_low     = 1,
298 -       }
299 -};
300 -
301 -static struct gpio_keys_button ap136_gpio_keys[] __initdata = {
302 -       {
303 -               .desc           = "WPS button",
304 -               .type           = EV_KEY,
305 -               .code           = KEY_WPS_BUTTON,
306 -               .debounce_interval = AP136_KEYS_DEBOUNCE_INTERVAL,
307 -               .gpio           = AP136_GPIO_BTN_WPS,
308 -               .active_low     = 1,
309 -       },
310 -       {
311 -               .desc           = "RFKILL button",
312 -               .type           = EV_KEY,
313 -               .code           = KEY_RFKILL,
314 -               .debounce_interval = AP136_KEYS_DEBOUNCE_INTERVAL,
315 -               .gpio           = AP136_GPIO_BTN_RFKILL,
316 -               .active_low     = 1,
317 -       },
318 -};
319 -
320 -static struct spi_board_info ap136_spi_info[] = {
321 -       {
322 -               .bus_num        = 0,
323 -               .chip_select    = 0,
324 -               .max_speed_hz   = 25000000,
325 -               .modalias       = "mx25l6405d",
326 -       }
327 -};
328 -
329 -static struct ath79_spi_platform_data ap136_spi_data = {
330 -       .bus_num        = 0,
331 -       .num_chipselect = 1,
332 -};
333 -
334 -#ifdef CONFIG_PCI
335 -static struct ath9k_platform_data ap136_ath9k_data;
336 -
337 -static int ap136_pci_plat_dev_init(struct pci_dev *dev)
338 -{
339 -       if (dev->bus->number == 1 && (PCI_SLOT(dev->devfn)) == 0)
340 -               dev->dev.platform_data = &ap136_ath9k_data;
341 -
342 -       return 0;
343 -}
344 -
345 -static void __init ap136_pci_init(u8 *eeprom)
346 -{
347 -       memcpy(ap136_ath9k_data.eeprom_data, eeprom,
348 -              sizeof(ap136_ath9k_data.eeprom_data));
349 -
350 -       ath79_pci_set_plat_dev_init(ap136_pci_plat_dev_init);
351 -       ath79_register_pci();
352 -}
353 -#else
354 -static inline void ap136_pci_init(u8 *eeprom) {}
355 -#endif /* CONFIG_PCI */
356 -
357 -static void __init ap136_setup(void)
358 -{
359 -       u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
360 -
361 -       ath79_register_leds_gpio(-1, ARRAY_SIZE(ap136_leds_gpio),
362 -                                ap136_leds_gpio);
363 -       ath79_register_gpio_keys_polled(-1, AP136_KEYS_POLL_INTERVAL,
364 -                                       ARRAY_SIZE(ap136_gpio_keys),
365 -                                       ap136_gpio_keys);
366 -       ath79_register_spi(&ap136_spi_data, ap136_spi_info,
367 -                          ARRAY_SIZE(ap136_spi_info));
368 -       ath79_register_usb();
369 -       ath79_register_wmac(art + AP136_WMAC_CALDATA_OFFSET);
370 -       ap136_pci_init(art + AP136_PCIE_CALDATA_OFFSET);
371 -}
372 -
373 -MIPS_MACHINE(ATH79_MACH_AP136_010, "AP136-010",
374 -            "Atheros AP136-010 reference board",
375 -            ap136_setup);
376 --- a/arch/mips/ath79/mach-ap81.c
377 +++ /dev/null
378 @@ -1,100 +0,0 @@
379 -/*
380 - *  Atheros AP81 board support
381 - *
382 - *  Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
383 - *  Copyright (C) 2009 Imre Kaloz <kaloz@openwrt.org>
384 - *
385 - *  This program is free software; you can redistribute it and/or modify it
386 - *  under the terms of the GNU General Public License version 2 as published
387 - *  by the Free Software Foundation.
388 - */
389 -
390 -#include "machtypes.h"
391 -#include "dev-wmac.h"
392 -#include "dev-gpio-buttons.h"
393 -#include "dev-leds-gpio.h"
394 -#include "dev-spi.h"
395 -#include "dev-usb.h"
396 -
397 -#define AP81_GPIO_LED_STATUS   1
398 -#define AP81_GPIO_LED_AOSS     3
399 -#define AP81_GPIO_LED_WLAN     6
400 -#define AP81_GPIO_LED_POWER    14
401 -
402 -#define AP81_GPIO_BTN_SW4      12
403 -#define AP81_GPIO_BTN_SW1      21
404 -
405 -#define AP81_KEYS_POLL_INTERVAL                20      /* msecs */
406 -#define AP81_KEYS_DEBOUNCE_INTERVAL    (3 * AP81_KEYS_POLL_INTERVAL)
407 -
408 -#define AP81_CAL_DATA_ADDR     0x1fff1000
409 -
410 -static struct gpio_led ap81_leds_gpio[] __initdata = {
411 -       {
412 -               .name           = "ap81:green:status",
413 -               .gpio           = AP81_GPIO_LED_STATUS,
414 -               .active_low     = 1,
415 -       }, {
416 -               .name           = "ap81:amber:aoss",
417 -               .gpio           = AP81_GPIO_LED_AOSS,
418 -               .active_low     = 1,
419 -       }, {
420 -               .name           = "ap81:green:wlan",
421 -               .gpio           = AP81_GPIO_LED_WLAN,
422 -               .active_low     = 1,
423 -       }, {
424 -               .name           = "ap81:green:power",
425 -               .gpio           = AP81_GPIO_LED_POWER,
426 -               .active_low     = 1,
427 -       }
428 -};
429 -
430 -static struct gpio_keys_button ap81_gpio_keys[] __initdata = {
431 -       {
432 -               .desc           = "sw1",
433 -               .type           = EV_KEY,
434 -               .code           = BTN_0,
435 -               .debounce_interval = AP81_KEYS_DEBOUNCE_INTERVAL,
436 -               .gpio           = AP81_GPIO_BTN_SW1,
437 -               .active_low     = 1,
438 -       } , {
439 -               .desc           = "sw4",
440 -               .type           = EV_KEY,
441 -               .code           = BTN_1,
442 -               .debounce_interval = AP81_KEYS_DEBOUNCE_INTERVAL,
443 -               .gpio           = AP81_GPIO_BTN_SW4,
444 -               .active_low     = 1,
445 -       }
446 -};
447 -
448 -static struct spi_board_info ap81_spi_info[] = {
449 -       {
450 -               .bus_num        = 0,
451 -               .chip_select    = 0,
452 -               .max_speed_hz   = 25000000,
453 -               .modalias       = "m25p64",
454 -       }
455 -};
456 -
457 -static struct ath79_spi_platform_data ap81_spi_data = {
458 -       .bus_num        = 0,
459 -       .num_chipselect = 1,
460 -};
461 -
462 -static void __init ap81_setup(void)
463 -{
464 -       u8 *cal_data = (u8 *) KSEG1ADDR(AP81_CAL_DATA_ADDR);
465 -
466 -       ath79_register_leds_gpio(-1, ARRAY_SIZE(ap81_leds_gpio),
467 -                                ap81_leds_gpio);
468 -       ath79_register_gpio_keys_polled(-1, AP81_KEYS_POLL_INTERVAL,
469 -                                       ARRAY_SIZE(ap81_gpio_keys),
470 -                                       ap81_gpio_keys);
471 -       ath79_register_spi(&ap81_spi_data, ap81_spi_info,
472 -                          ARRAY_SIZE(ap81_spi_info));
473 -       ath79_register_wmac(cal_data);
474 -       ath79_register_usb();
475 -}
476 -
477 -MIPS_MACHINE(ATH79_MACH_AP81, "AP81", "Atheros AP81 reference board",
478 -            ap81_setup);
479 --- a/arch/mips/ath79/mach-db120.c
480 +++ /dev/null
481 @@ -1,136 +0,0 @@
482 -/*
483 - * Atheros DB120 reference board support
484 - *
485 - * Copyright (c) 2011 Qualcomm Atheros
486 - * Copyright (c) 2011 Gabor Juhos <juhosg@openwrt.org>
487 - *
488 - * Permission to use, copy, modify, and/or distribute this software for any
489 - * purpose with or without fee is hereby granted, provided that the above
490 - * copyright notice and this permission notice appear in all copies.
491 - *
492 - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
493 - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
494 - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
495 - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
496 - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
497 - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
498 - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
499 - *
500 - */
501 -
502 -#include <linux/pci.h>
503 -#include <linux/ath9k_platform.h>
504 -
505 -#include "machtypes.h"
506 -#include "dev-gpio-buttons.h"
507 -#include "dev-leds-gpio.h"
508 -#include "dev-spi.h"
509 -#include "dev-usb.h"
510 -#include "dev-wmac.h"
511 -#include "pci.h"
512 -
513 -#define DB120_GPIO_LED_WLAN_5G         12
514 -#define DB120_GPIO_LED_WLAN_2G         13
515 -#define DB120_GPIO_LED_STATUS          14
516 -#define DB120_GPIO_LED_WPS             15
517 -
518 -#define DB120_GPIO_BTN_WPS             16
519 -
520 -#define DB120_KEYS_POLL_INTERVAL       20      /* msecs */
521 -#define DB120_KEYS_DEBOUNCE_INTERVAL   (3 * DB120_KEYS_POLL_INTERVAL)
522 -
523 -#define DB120_WMAC_CALDATA_OFFSET 0x1000
524 -#define DB120_PCIE_CALDATA_OFFSET 0x5000
525 -
526 -static struct gpio_led db120_leds_gpio[] __initdata = {
527 -       {
528 -               .name           = "db120:green:status",
529 -               .gpio           = DB120_GPIO_LED_STATUS,
530 -               .active_low     = 1,
531 -       },
532 -       {
533 -               .name           = "db120:green:wps",
534 -               .gpio           = DB120_GPIO_LED_WPS,
535 -               .active_low     = 1,
536 -       },
537 -       {
538 -               .name           = "db120:green:wlan-5g",
539 -               .gpio           = DB120_GPIO_LED_WLAN_5G,
540 -               .active_low     = 1,
541 -       },
542 -       {
543 -               .name           = "db120:green:wlan-2g",
544 -               .gpio           = DB120_GPIO_LED_WLAN_2G,
545 -               .active_low     = 1,
546 -       },
547 -};
548 -
549 -static struct gpio_keys_button db120_gpio_keys[] __initdata = {
550 -       {
551 -               .desc           = "WPS button",
552 -               .type           = EV_KEY,
553 -               .code           = KEY_WPS_BUTTON,
554 -               .debounce_interval = DB120_KEYS_DEBOUNCE_INTERVAL,
555 -               .gpio           = DB120_GPIO_BTN_WPS,
556 -               .active_low     = 1,
557 -       },
558 -};
559 -
560 -static struct spi_board_info db120_spi_info[] = {
561 -       {
562 -               .bus_num        = 0,
563 -               .chip_select    = 0,
564 -               .max_speed_hz   = 25000000,
565 -               .modalias       = "s25sl064a",
566 -       }
567 -};
568 -
569 -static struct ath79_spi_platform_data db120_spi_data = {
570 -       .bus_num        = 0,
571 -       .num_chipselect = 1,
572 -};
573 -
574 -#ifdef CONFIG_PCI
575 -static struct ath9k_platform_data db120_ath9k_data;
576 -
577 -static int db120_pci_plat_dev_init(struct pci_dev *dev)
578 -{
579 -       switch (PCI_SLOT(dev->devfn)) {
580 -       case 0:
581 -               dev->dev.platform_data = &db120_ath9k_data;
582 -               break;
583 -       }
584 -
585 -       return 0;
586 -}
587 -
588 -static void __init db120_pci_init(u8 *eeprom)
589 -{
590 -       memcpy(db120_ath9k_data.eeprom_data, eeprom,
591 -              sizeof(db120_ath9k_data.eeprom_data));
592 -
593 -       ath79_pci_set_plat_dev_init(db120_pci_plat_dev_init);
594 -       ath79_register_pci();
595 -}
596 -#else
597 -static inline void db120_pci_init(u8 *eeprom) {}
598 -#endif /* CONFIG_PCI */
599 -
600 -static void __init db120_setup(void)
601 -{
602 -       u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
603 -
604 -       ath79_register_leds_gpio(-1, ARRAY_SIZE(db120_leds_gpio),
605 -                                db120_leds_gpio);
606 -       ath79_register_gpio_keys_polled(-1, DB120_KEYS_POLL_INTERVAL,
607 -                                       ARRAY_SIZE(db120_gpio_keys),
608 -                                       db120_gpio_keys);
609 -       ath79_register_spi(&db120_spi_data, db120_spi_info,
610 -                          ARRAY_SIZE(db120_spi_info));
611 -       ath79_register_usb();
612 -       ath79_register_wmac(art + DB120_WMAC_CALDATA_OFFSET);
613 -       db120_pci_init(art + DB120_PCIE_CALDATA_OFFSET);
614 -}
615 -
616 -MIPS_MACHINE(ATH79_MACH_DB120, "DB120", "Atheros DB120 reference board",
617 -            db120_setup);
618 --- a/arch/mips/ath79/mach-pb44.c
619 +++ /dev/null
620 @@ -1,122 +0,0 @@
621 -/*
622 - *  Atheros PB44 reference board support
623 - *
624 - *  Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
625 - *
626 - *  This program is free software; you can redistribute it and/or modify it
627 - *  under the terms of the GNU General Public License version 2 as published
628 - *  by the Free Software Foundation.
629 - */
630 -
631 -#include <linux/init.h>
632 -#include <linux/platform_device.h>
633 -#include <linux/i2c.h>
634 -#include <linux/i2c-gpio.h>
635 -#include <linux/platform_data/pcf857x.h>
636 -
637 -#include "machtypes.h"
638 -#include "dev-gpio-buttons.h"
639 -#include "dev-leds-gpio.h"
640 -#include "dev-spi.h"
641 -#include "dev-usb.h"
642 -#include "pci.h"
643 -
644 -#define PB44_GPIO_I2C_SCL      0
645 -#define PB44_GPIO_I2C_SDA      1
646 -
647 -#define PB44_GPIO_EXP_BASE     16
648 -#define PB44_GPIO_SW_RESET     (PB44_GPIO_EXP_BASE + 6)
649 -#define PB44_GPIO_SW_JUMP      (PB44_GPIO_EXP_BASE + 8)
650 -#define PB44_GPIO_LED_JUMP1    (PB44_GPIO_EXP_BASE + 9)
651 -#define PB44_GPIO_LED_JUMP2    (PB44_GPIO_EXP_BASE + 10)
652 -
653 -#define PB44_KEYS_POLL_INTERVAL                20      /* msecs */
654 -#define PB44_KEYS_DEBOUNCE_INTERVAL    (3 * PB44_KEYS_POLL_INTERVAL)
655 -
656 -static struct i2c_gpio_platform_data pb44_i2c_gpio_data = {
657 -       .sda_pin        = PB44_GPIO_I2C_SDA,
658 -       .scl_pin        = PB44_GPIO_I2C_SCL,
659 -};
660 -
661 -static struct platform_device pb44_i2c_gpio_device = {
662 -       .name           = "i2c-gpio",
663 -       .id             = 0,
664 -       .dev = {
665 -               .platform_data  = &pb44_i2c_gpio_data,
666 -       }
667 -};
668 -
669 -static struct pcf857x_platform_data pb44_pcf857x_data = {
670 -       .gpio_base      = PB44_GPIO_EXP_BASE,
671 -};
672 -
673 -static struct i2c_board_info pb44_i2c_board_info[] __initdata = {
674 -       {
675 -               I2C_BOARD_INFO("pcf8575", 0x20),
676 -               .platform_data  = &pb44_pcf857x_data,
677 -       },
678 -};
679 -
680 -static struct gpio_led pb44_leds_gpio[] __initdata = {
681 -       {
682 -               .name           = "pb44:amber:jump1",
683 -               .gpio           = PB44_GPIO_LED_JUMP1,
684 -               .active_low     = 1,
685 -       }, {
686 -               .name           = "pb44:green:jump2",
687 -               .gpio           = PB44_GPIO_LED_JUMP2,
688 -               .active_low     = 1,
689 -       },
690 -};
691 -
692 -static struct gpio_keys_button pb44_gpio_keys[] __initdata = {
693 -       {
694 -               .desc           = "soft_reset",
695 -               .type           = EV_KEY,
696 -               .code           = KEY_RESTART,
697 -               .debounce_interval = PB44_KEYS_DEBOUNCE_INTERVAL,
698 -               .gpio           = PB44_GPIO_SW_RESET,
699 -               .active_low     = 1,
700 -       } , {
701 -               .desc           = "jumpstart",
702 -               .type           = EV_KEY,
703 -               .code           = KEY_WPS_BUTTON,
704 -               .debounce_interval = PB44_KEYS_DEBOUNCE_INTERVAL,
705 -               .gpio           = PB44_GPIO_SW_JUMP,
706 -               .active_low     = 1,
707 -       }
708 -};
709 -
710 -static struct spi_board_info pb44_spi_info[] = {
711 -       {
712 -               .bus_num        = 0,
713 -               .chip_select    = 0,
714 -               .max_speed_hz   = 25000000,
715 -               .modalias       = "m25p64",
716 -       },
717 -};
718 -
719 -static struct ath79_spi_platform_data pb44_spi_data = {
720 -       .bus_num                = 0,
721 -       .num_chipselect         = 1,
722 -};
723 -
724 -static void __init pb44_init(void)
725 -{
726 -       i2c_register_board_info(0, pb44_i2c_board_info,
727 -                               ARRAY_SIZE(pb44_i2c_board_info));
728 -       platform_device_register(&pb44_i2c_gpio_device);
729 -
730 -       ath79_register_leds_gpio(-1, ARRAY_SIZE(pb44_leds_gpio),
731 -                                pb44_leds_gpio);
732 -       ath79_register_gpio_keys_polled(-1, PB44_KEYS_POLL_INTERVAL,
733 -                                       ARRAY_SIZE(pb44_gpio_keys),
734 -                                       pb44_gpio_keys);
735 -       ath79_register_spi(&pb44_spi_data, pb44_spi_info,
736 -                          ARRAY_SIZE(pb44_spi_info));
737 -       ath79_register_usb();
738 -       ath79_register_pci();
739 -}
740 -
741 -MIPS_MACHINE(ATH79_MACH_PB44, "PB44", "Atheros PB44 reference board",
742 -            pb44_init);