1 --- a/arch/mips/ath79/mach-ubnt-xm.c
2 +++ b/arch/mips/ath79/mach-ubnt-xm.c
5 #include <linux/init.h>
7 +#include <linux/platform_device.h>
8 #include <linux/ath9k_platform.h>
9 +#include <linux/etherdevice.h>
10 +#include <linux/ar8216_platform.h>
12 +#include <asm/mach-ath79/ath79.h>
13 #include <asm/mach-ath79/irq.h>
14 +#include <asm/mach-ath79/ar71xx_regs.h>
16 +#include <linux/platform_data/phy-at803x.h>
19 #include "dev-ap9x-pci.h"
21 #include "dev-gpio-buttons.h"
22 #include "dev-leds-gpio.h"
23 #include "dev-m25p80.h"
25 +#include "dev-wmac.h"
26 #include "machtypes.h"
29 #define UBNT_XM_GPIO_LED_L1 0
30 #define UBNT_XM_GPIO_LED_L2 1
33 static struct gpio_led ubnt_xm_leds_gpio[] __initdata = {
35 - .name = "ubnt-xm:red:link1",
36 + .name = "ubnt:red:link1",
37 .gpio = UBNT_XM_GPIO_LED_L1,
40 - .name = "ubnt-xm:orange:link2",
41 + .name = "ubnt:orange:link2",
42 .gpio = UBNT_XM_GPIO_LED_L2,
45 - .name = "ubnt-xm:green:link3",
46 + .name = "ubnt:green:link3",
47 .gpio = UBNT_XM_GPIO_LED_L3,
50 - .name = "ubnt-xm:green:link4",
51 + .name = "ubnt:green:link4",
52 .gpio = UBNT_XM_GPIO_LED_L4,
55 @@ -66,9 +76,13 @@ static struct gpio_keys_button ubnt_xm_g
59 +#define UBNT_M_WAN_PHYMASK BIT(4)
61 static void __init ubnt_xm_init(void)
63 u8 *eeprom = (u8 *) KSEG1ADDR(UBNT_XM_EEPROM_ADDR);
64 + u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000);
65 + u8 *mac2 = (u8 *) KSEG1ADDR(0x1fff0000 + ETH_ALEN);
67 ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_xm_leds_gpio),
69 @@ -79,9 +93,552 @@ static void __init ubnt_xm_init(void)
71 ath79_register_m25p80(NULL);
72 ap91_pci_init(eeprom, NULL);
74 + ath79_register_mdio(0, ~UBNT_M_WAN_PHYMASK);
75 + ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
76 + ath79_init_mac(ath79_eth1_data.mac_addr, mac2, 0);
77 + ath79_register_eth(0);
80 MIPS_MACHINE(ATH79_MACH_UBNT_XM,
82 "Ubiquiti Networks XM (rev 1.0) board",
85 +MIPS_MACHINE(ATH79_MACH_UBNT_BULLET_M, "UBNT-BM", "Ubiquiti Bullet M",
88 +static void __init ubnt_rocket_m_setup(void)
91 + ath79_register_usb();
94 +MIPS_MACHINE(ATH79_MACH_UBNT_ROCKET_M, "UBNT-RM", "Ubiquiti Rocket M",
95 + ubnt_rocket_m_setup);
97 +static void __init ubnt_nano_m_setup(void)
100 + ath79_register_eth(1);
103 +MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M, "UBNT-NM", "Ubiquiti Nanostation M",
104 + ubnt_nano_m_setup);
106 +static struct gpio_led ubnt_airrouter_leds_gpio[] __initdata = {
108 + .name = "ubnt:green:globe",
112 + .name = "ubnt:green:power",
115 + .default_state = LEDS_GPIO_DEFSTATE_ON,
119 +static void __init ubnt_airrouter_setup(void)
121 + u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000);
122 + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
124 + ath79_register_m25p80(NULL);
125 + ath79_register_mdio(0, ~UBNT_M_WAN_PHYMASK);
127 + ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
128 + ath79_init_local_mac(ath79_eth1_data.mac_addr, mac1);
130 + ath79_register_eth(1);
131 + ath79_register_eth(0);
132 + ath79_register_usb();
134 + ap91_pci_init(ee, NULL);
135 + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_airrouter_leds_gpio),
136 + ubnt_airrouter_leds_gpio);
138 + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
139 + ARRAY_SIZE(ubnt_xm_gpio_keys),
140 + ubnt_xm_gpio_keys);
143 +MIPS_MACHINE(ATH79_MACH_UBNT_AIRROUTER, "UBNT-AR", "Ubiquiti AirRouter",
144 + ubnt_airrouter_setup);
146 +static struct gpio_led ubnt_unifi_leds_gpio[] __initdata = {
148 + .name = "ubnt:orange:dome",
152 + .name = "ubnt:green:dome",
158 +static struct gpio_led ubnt_unifi_outdoor_leds_gpio[] __initdata = {
160 + .name = "ubnt:orange:front",
164 + .name = "ubnt:green:front",
170 +static struct gpio_led ubnt_unifi_outdoor_plus_leds_gpio[] __initdata = {
172 + .name = "ubnt:white:front",
176 + .name = "ubnt:blue:front",
183 +static void __init ubnt_unifi_setup(void)
185 + u8 *mac = (u8 *) KSEG1ADDR(0x1fff0000);
186 + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
188 + ath79_register_m25p80(NULL);
190 + ath79_register_mdio(0, ~UBNT_M_WAN_PHYMASK);
192 + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0);
193 + ath79_register_eth(0);
195 + ap91_pci_init(ee, NULL);
197 + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_unifi_leds_gpio),
198 + ubnt_unifi_leds_gpio);
200 + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
201 + ARRAY_SIZE(ubnt_xm_gpio_keys),
202 + ubnt_xm_gpio_keys);
205 +MIPS_MACHINE(ATH79_MACH_UBNT_UNIFI, "UBNT-UF", "Ubiquiti UniFi",
209 +#define UBNT_UNIFIOD_PRI_PHYMASK BIT(4)
210 +#define UBNT_UNIFIOD_2ND_PHYMASK (BIT(0) | BIT(1) | BIT(2) | BIT(3))
212 +static void __init ubnt_unifi_outdoor_setup(void)
214 + u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000);
215 + u8 *mac2 = (u8 *) KSEG1ADDR(0x1fff0000 + ETH_ALEN);
216 + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
218 + ath79_register_m25p80(NULL);
220 + ath79_register_mdio(0, ~(UBNT_UNIFIOD_PRI_PHYMASK |
221 + UBNT_UNIFIOD_2ND_PHYMASK));
223 + ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
224 + ath79_init_mac(ath79_eth1_data.mac_addr, mac2, 0);
225 + ath79_register_eth(0);
226 + ath79_register_eth(1);
228 + ap91_pci_init(ee, NULL);
230 + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_unifi_outdoor_leds_gpio),
231 + ubnt_unifi_outdoor_leds_gpio);
233 + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
234 + ARRAY_SIZE(ubnt_xm_gpio_keys),
235 + ubnt_xm_gpio_keys);
238 +MIPS_MACHINE(ATH79_MACH_UBNT_UNIFI_OUTDOOR, "UBNT-U20",
239 + "Ubiquiti UniFiAP Outdoor",
240 + ubnt_unifi_outdoor_setup);
243 +static void __init ubnt_unifi_outdoor_plus_setup(void)
245 + u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000);
246 + u8 *mac2 = (u8 *) KSEG1ADDR(0x1fff0000 + ETH_ALEN);
247 + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
249 + ath79_register_m25p80(NULL);
251 + ath79_register_mdio(0, ~(UBNT_UNIFIOD_PRI_PHYMASK |
252 + UBNT_UNIFIOD_2ND_PHYMASK));
254 + ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
255 + ath79_init_mac(ath79_eth1_data.mac_addr, mac2, 0);
256 + ath79_register_eth(0);
257 + ath79_register_eth(1);
259 + ap91_pci_init(ee, NULL);
261 + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_unifi_outdoor_plus_leds_gpio),
262 + ubnt_unifi_outdoor_plus_leds_gpio);
264 + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
265 + ARRAY_SIZE(ubnt_xm_gpio_keys),
266 + ubnt_xm_gpio_keys);
269 +MIPS_MACHINE(ATH79_MACH_UBNT_UNIFI_OUTDOOR_PLUS, "UBNT-UOP",
270 + "Ubiquiti UniFiAP Outdoor+",
271 + ubnt_unifi_outdoor_plus_setup);
274 +static struct gpio_led ubnt_uap_pro_gpio_leds[] __initdata = {
276 + .name = "ubnt:white:dome",
279 + .name = "ubnt:blue:dome",
284 +static struct gpio_keys_button uap_pro_gpio_keys[] __initdata = {
288 + .code = KEY_RESTART,
289 + .debounce_interval = UBNT_XM_KEYS_DEBOUNCE_INTERVAL,
295 +static struct ar8327_pad_cfg uap_pro_ar8327_pad0_cfg = {
296 + .mode = AR8327_PAD_MAC_RGMII,
297 + .txclk_delay_en = true,
298 + .rxclk_delay_en = true,
299 + .txclk_delay_sel = AR8327_CLK_DELAY_SEL1,
300 + .rxclk_delay_sel = AR8327_CLK_DELAY_SEL2,
303 +static struct ar8327_platform_data uap_pro_ar8327_data = {
304 + .pad0_cfg = &uap_pro_ar8327_pad0_cfg,
307 + .speed = AR8327_PORT_SPEED_1000,
314 +static struct mdio_board_info uap_pro_mdio0_info[] = {
316 + .bus_id = "ag71xx-mdio.0",
318 + .platform_data = &uap_pro_ar8327_data,
322 +#define UAP_PRO_MAC0_OFFSET 0x0000
323 +#define UAP_PRO_MAC1_OFFSET 0x0006
324 +#define UAP_PRO_WMAC_CALDATA_OFFSET 0x1000
325 +#define UAP_PRO_PCI_CALDATA_OFFSET 0x5000
327 +static void __init ubnt_uap_pro_setup(void)
329 + u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000);
331 + ath79_register_m25p80(NULL);
333 + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_uap_pro_gpio_leds),
334 + ubnt_uap_pro_gpio_leds);
335 + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
336 + ARRAY_SIZE(uap_pro_gpio_keys),
337 + uap_pro_gpio_keys);
339 + ath79_register_wmac(eeprom + UAP_PRO_WMAC_CALDATA_OFFSET, NULL);
340 + ap91_pci_init(eeprom + UAP_PRO_PCI_CALDATA_OFFSET, NULL);
342 + ath79_register_mdio(0, 0x0);
343 + mdiobus_register_board_info(uap_pro_mdio0_info,
344 + ARRAY_SIZE(uap_pro_mdio0_info));
346 + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0);
347 + ath79_init_mac(ath79_eth0_data.mac_addr,
348 + eeprom + UAP_PRO_MAC0_OFFSET, 0);
350 + /* GMAC0 is connected to an AR8327 switch */
351 + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
352 + ath79_eth0_data.phy_mask = BIT(0);
353 + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
354 + ath79_eth0_pll_data.pll_1000 = 0x06000000;
355 + ath79_register_eth(0);
358 +MIPS_MACHINE(ATH79_MACH_UBNT_UAP_PRO, "UAP-PRO", "Ubiquiti UniFi AP Pro",
359 + ubnt_uap_pro_setup);
361 +#define UBNT_XW_GPIO_LED_L1 11
362 +#define UBNT_XW_GPIO_LED_L2 16
363 +#define UBNT_XW_GPIO_LED_L3 13
364 +#define UBNT_XW_GPIO_LED_L4 14
366 +static struct gpio_led ubnt_xw_leds_gpio[] __initdata = {
368 + .name = "ubnt:red:link1",
369 + .gpio = UBNT_XW_GPIO_LED_L1,
372 + .name = "ubnt:orange:link2",
373 + .gpio = UBNT_XW_GPIO_LED_L2,
376 + .name = "ubnt:green:link3",
377 + .gpio = UBNT_XW_GPIO_LED_L3,
380 + .name = "ubnt:green:link4",
381 + .gpio = UBNT_XW_GPIO_LED_L4,
386 +#define UBNT_ROCKET_TI_GPIO_LED_L1 16
387 +#define UBNT_ROCKET_TI_GPIO_LED_L2 17
388 +#define UBNT_ROCKET_TI_GPIO_LED_L3 18
389 +#define UBNT_ROCKET_TI_GPIO_LED_L4 19
390 +#define UBNT_ROCKET_TI_GPIO_LED_L5 20
391 +#define UBNT_ROCKET_TI_GPIO_LED_L6 21
392 +static struct gpio_led ubnt_rocket_ti_leds_gpio[] __initdata = {
394 + .name = "ubnt:green:link1",
395 + .gpio = UBNT_ROCKET_TI_GPIO_LED_L1,
398 + .name = "ubnt:green:link2",
399 + .gpio = UBNT_ROCKET_TI_GPIO_LED_L2,
402 + .name = "ubnt:green:link3",
403 + .gpio = UBNT_ROCKET_TI_GPIO_LED_L3,
406 + .name = "ubnt:green:link4",
407 + .gpio = UBNT_ROCKET_TI_GPIO_LED_L4,
410 + .name = "ubnt:green:link5",
411 + .gpio = UBNT_ROCKET_TI_GPIO_LED_L5,
414 + .name = "ubnt:green:link6",
415 + .gpio = UBNT_ROCKET_TI_GPIO_LED_L6,
420 +static void __init ubnt_xw_init(void)
422 + u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000);
424 + ath79_register_m25p80(NULL);
426 + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_xw_leds_gpio),
427 + ubnt_xw_leds_gpio);
428 + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
429 + ARRAY_SIZE(ubnt_xm_gpio_keys),
430 + ubnt_xm_gpio_keys);
432 + ath79_register_wmac(eeprom + UAP_PRO_WMAC_CALDATA_OFFSET, NULL);
433 + ap91_pci_init(eeprom + UAP_PRO_PCI_CALDATA_OFFSET, NULL);
436 + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_MII_GMAC0 | AR934X_ETH_CFG_MII_GMAC0_SLAVE);
437 + ath79_init_mac(ath79_eth0_data.mac_addr,
438 + eeprom + UAP_PRO_MAC0_OFFSET, 0);
440 + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
441 + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
444 +static void __init ubnt_nano_m_xw_setup(void)
448 + /* GMAC0 is connected to an AR8326 switch */
449 + ath79_register_mdio(0, ~(BIT(0) | BIT(1) | BIT(5)));
450 + ath79_eth0_data.phy_mask = (BIT(0) | BIT(1) | BIT(5));
451 + ath79_eth0_data.speed = SPEED_100;
452 + ath79_eth0_data.duplex = DUPLEX_FULL;
453 + ath79_register_eth(0);
456 +static void __init ubnt_loco_m_xw_setup(void)
460 + ath79_register_mdio(0, ~BIT(1));
461 + ath79_eth0_data.phy_mask = BIT(1);
462 + ath79_register_eth(0);
465 +static void __init ubnt_rocket_m_xw_setup(void)
467 + u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000);
469 + ath79_register_m25p80(NULL);
471 + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_xw_leds_gpio),
472 + ubnt_xw_leds_gpio);
473 + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
474 + ARRAY_SIZE(ubnt_xm_gpio_keys),
475 + ubnt_xm_gpio_keys);
477 + ath79_register_wmac(eeprom + UAP_PRO_WMAC_CALDATA_OFFSET, NULL);
478 + ap91_pci_init(eeprom + UAP_PRO_PCI_CALDATA_OFFSET, NULL);
480 + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0);
481 + ath79_init_mac(ath79_eth0_data.mac_addr,
482 + eeprom + UAP_PRO_MAC0_OFFSET, 0);
484 + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
485 + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
487 + ath79_register_mdio(0, ~BIT(4));
488 + ath79_eth0_data.phy_mask = BIT(4);
489 + ath79_eth0_pll_data.pll_1000 = 0x06000000;
490 + ath79_register_eth(0);
493 +static struct at803x_platform_data ubnt_rocket_m_ti_at803_data = {
494 + .disable_smarteee = 1,
495 + .enable_rgmii_rx_delay = 1,
496 + .enable_rgmii_tx_delay = 1,
498 +static struct mdio_board_info ubnt_rocket_m_ti_mdio_info[] = {
500 + .bus_id = "ag71xx-mdio.0",
502 + .platform_data = &ubnt_rocket_m_ti_at803_data,
506 +static void __init ubnt_rocket_m_ti_setup(void)
508 + u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff0000);
510 + ath79_register_m25p80(NULL);
512 + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_rocket_ti_leds_gpio),
513 + ubnt_rocket_ti_leds_gpio);
514 + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
515 + ARRAY_SIZE(ubnt_xm_gpio_keys),
516 + ubnt_xm_gpio_keys);
518 + ap91_pci_init(eeprom + 0x1000, NULL);
520 + ath79_setup_ar934x_eth_cfg(AR934X_ETH_CFG_RGMII_GMAC0);
521 + ath79_setup_ar934x_eth_rx_delay(3, 3);
522 + ath79_init_mac(ath79_eth0_data.mac_addr,
523 + eeprom + UAP_PRO_MAC0_OFFSET, 0);
524 + ath79_init_mac(ath79_eth1_data.mac_addr,
525 + eeprom + UAP_PRO_MAC1_OFFSET, 0);
527 + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
528 + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
529 + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII;
530 + ath79_eth1_data.mii_bus_dev = &ath79_mdio1_device.dev;
532 + mdiobus_register_board_info(ubnt_rocket_m_ti_mdio_info,
533 + ARRAY_SIZE(ubnt_rocket_m_ti_mdio_info));
534 + ath79_register_mdio(0, 0x0);
537 + ath79_eth0_data.phy_mask = BIT(4);
538 + /* read out from vendor */
539 + ath79_eth0_pll_data.pll_1000 = 0x2000000;
540 + ath79_eth0_pll_data.pll_10 = 0x1313;
541 + ath79_register_eth(0);
543 + ath79_register_mdio(1, 0x0);
544 + ath79_eth1_data.phy_mask = BIT(3);
545 + ath79_register_eth(1);
549 +MIPS_MACHINE(ATH79_MACH_UBNT_NANO_M_XW, "UBNT-NM-XW", "Ubiquiti Nanostation M XW",
550 + ubnt_nano_m_xw_setup);
552 +MIPS_MACHINE(ATH79_MACH_UBNT_LOCO_M_XW, "UBNT-LOCO-XW", "Ubiquiti Loco M XW",
553 + ubnt_loco_m_xw_setup);
555 +MIPS_MACHINE(ATH79_MACH_UBNT_ROCKET_M_XW, "UBNT-RM-XW", "Ubiquiti Rocket M XW",
556 + ubnt_rocket_m_xw_setup);
558 +MIPS_MACHINE(ATH79_MACH_UBNT_ROCKET_M_TI, "UBNT-RM-TI", "Ubiquiti Rocket M TI",
559 + ubnt_rocket_m_ti_setup);
561 +static struct gpio_led ubnt_airgateway_gpio_leds[] __initdata = {
563 + .name = "ubnt:blue:wlan",
566 + .name = "ubnt:white:status",
571 +static struct gpio_keys_button airgateway_gpio_keys[] __initdata = {
575 + .code = KEY_RESTART,
576 + .debounce_interval = UBNT_XM_KEYS_DEBOUNCE_INTERVAL,
582 +static void __init ubnt_airgateway_setup(void)
585 + u8 *mac0 = (u8 *) KSEG1ADDR(0x1fff0000);
586 + u8 *mac1 = (u8 *) KSEG1ADDR(0x1fff0000 + ETH_ALEN);
587 + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
590 + ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
591 + AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
592 + AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
593 + AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
594 + AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
596 + t = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP);
597 + t |= AR933X_BOOTSTRAP_MDIO_GPIO_EN;
598 + ath79_reset_wr(AR933X_RESET_REG_BOOTSTRAP, t);
600 + ath79_register_m25p80(NULL);
601 + ath79_register_leds_gpio(-1, ARRAY_SIZE(ubnt_airgateway_gpio_leds),
602 + ubnt_airgateway_gpio_leds);
604 + ath79_register_gpio_keys_polled(-1, UBNT_XM_KEYS_POLL_INTERVAL,
605 + ARRAY_SIZE(airgateway_gpio_keys),
606 + airgateway_gpio_keys);
608 + ath79_init_mac(ath79_eth1_data.mac_addr, mac0, 0);
609 + ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 0);
611 + ath79_register_mdio(0, 0x0);
613 + ath79_register_eth(1);
614 + ath79_register_eth(0);
616 + ath79_register_wmac(ee, NULL);
619 +MIPS_MACHINE(ATH79_MACH_UBNT_AIRGW, "UBNT-AGW", "Ubiquiti AirGateway",
620 + ubnt_airgateway_setup);
622 --- a/arch/mips/ath79/Kconfig
623 +++ b/arch/mips/ath79/Kconfig
624 @@ -68,12 +68,16 @@ config ATH79_MACH_PB44
625 Atheros PB44 reference board.
627 config ATH79_MACH_UBNT_XM
628 - bool "Ubiquiti Networks XM (rev 1.0) board"
629 + bool "Ubiquiti Networks XM/UniFi boards"
632 select ATH79_DEV_AP9X_PCI if PCI
633 + select ATH79_DEV_ETH
634 select ATH79_DEV_GPIO_BUTTONS
635 select ATH79_DEV_LEDS_GPIO
636 select ATH79_DEV_M25P80
637 + select ATH79_DEV_USB
638 + select ATH79_DEV_WMAC
640 Say 'Y' here if you want your kernel to support the
641 Ubiquiti Networks XM (rev 1.0) board.