CONFIG_AG71XX_AR8216_SUPPORT=y
# CONFIG_AG71XX_DEBUG is not set
CONFIG_AR71XX_DEV_AP94_PCI=y
+CONFIG_AR71XX_DEV_AR913X_WMAC=y
CONFIG_AR71XX_DEV_M25P80=y
CONFIG_AR71XX_MACH_AP81=y
CONFIG_AR71XX_MACH_AP83=y
# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
# CONFIG_AR7 is not set
CONFIG_AR71XX_DEV_AP94_PCI=y
+CONFIG_AR71XX_DEV_AR913X_WMAC=y
CONFIG_AR71XX_DEV_M25P80=y
CONFIG_AR71XX_MACH_AP81=y
CONFIG_AR71XX_MACH_AP83=y
# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
# CONFIG_AR7 is not set
CONFIG_AR71XX_DEV_AP94_PCI=y
+CONFIG_AR71XX_DEV_AR913X_WMAC=y
CONFIG_AR71XX_DEV_M25P80=y
CONFIG_AR71XX_MACH_AP81=y
CONFIG_AR71XX_MACH_AP83=y
config AR71XX_MACH_AP81
bool "Atheros AP81 board support"
select AR71XX_DEV_M25P80
+ select AR71XX_DEV_AR913X_WMAC
default y
config AR71XX_MACH_AP83
bool "Atheros AP83 board support"
+ select AR71XX_DEV_AR913X_WMAC
default y
config AR71XX_MACH_DIR_615_C1
bool "D-Link DIR-615 rev. C1 support"
select AR71XX_DEV_M25P80
+ select AR71XX_DEV_AR913X_WMAC
default y
config AR71XX_MACH_DIR_825_B1
config AR71XX_MACH_WRT160NL
bool "Linksys WRT160NL board support"
select AR71XX_DEV_M25P80
+ select AR71XX_DEV_AR913X_WMAC
default y
config AR71XX_MACH_WRT400N
config AR71XX_MACH_WNR2000
bool "NETGEAR WNR2000 board support"
select AR71XX_DEV_M25P80
+ select AR71XX_DEV_AR913X_WMAC
default y
config AR71XX_MACH_MZK_W04NU
bool "Planex MZK-W04NU board support"
select AR71XX_DEV_M25P80
+ select AR71XX_DEV_AR913X_WMAC
default y
config AR71XX_MACH_MZK_W300NH
bool "Planex MZK-W300NH board support"
select AR71XX_DEV_M25P80
+ select AR71XX_DEV_AR913X_WMAC
default y
config AR71XX_MACH_TL_WR741ND
config AR71XX_MACH_TL_WR941ND
bool "TP-LINK TL-WR941ND support"
select AR71XX_DEV_M25P80
+ select AR71XX_DEV_AR913X_WMAC
default y
config AR71XX_MACH_TL_WR1043ND
bool "TP-LINK TL-WR1043ND support"
select AR71XX_DEV_M25P80
+ select AR71XX_DEV_AR913X_WMAC
default y
config AR71XX_MACH_TEW_632BRP
bool "TRENDnet TEW-632BRP support"
select AR71XX_DEV_M25P80
+ select AR71XX_DEV_AR913X_WMAC
default y
config AR71XX_MACH_UBNT
config AR71XX_DEV_AP94_PCI
def_bool n
+config AR71XX_DEV_AR913X_WMAC
+ def_bool n
+
endif
obj-$(CONFIG_PCI) += pci.o
obj-$(CONFIG_AR71XX_DEV_AP94_PCI) += dev-ap94-pci.o
+obj-$(CONFIG_AR71XX_DEV_AR913X_WMAC) += dev-ar913x-wmac.o
obj-$(CONFIG_AR71XX_DEV_M25P80) += dev-m25p80.o
obj-$(CONFIG_AR71XX_MACH_AP81) += mach-ap81.o
--- /dev/null
+/*
+ * Atheros AR913x SoC built-in WMAC device support
+ *
+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
+ *
+ * Parts of this file are based on Atheros' 2.6.15 BSP
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/etherdevice.h>
+#include <linux/platform_device.h>
+#include <linux/ath9k_platform.h>
+
+#include <asm/mach-ar71xx/ar71xx.h>
+
+#include "dev-ar913x-wmac.h"
+
+static struct resource ar913x_wmac_resources[] = {
+ {
+ .start = AR91XX_WMAC_BASE,
+ .end = AR91XX_WMAC_BASE + AR91XX_WMAC_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = AR71XX_CPU_IRQ_WMAC,
+ .end = AR71XX_CPU_IRQ_WMAC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct ath9k_platform_data ar913x_wmac_data;
+
+static struct platform_device ar913x_wmac_device = {
+ .name = "ath9k",
+ .id = -1,
+ .resource = ar913x_wmac_resources,
+ .num_resources = ARRAY_SIZE(ar913x_wmac_resources),
+ .dev = {
+ .platform_data = &ar913x_wmac_data,
+ },
+};
+
+void __init ar913x_add_device_wmac(void)
+{
+ u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+
+ memcpy(ar913x_wmac_data.eeprom_data, ee,
+ sizeof(ar913x_wmac_data.eeprom_data));
+
+ ar71xx_device_stop(RESET_MODULE_AMBA2WMAC);
+ mdelay(10);
+
+ ar71xx_device_start(RESET_MODULE_AMBA2WMAC);
+ mdelay(10);
+
+ platform_device_register(&ar913x_wmac_device);
+}
--- /dev/null
+/*
+ * Atheros AR913x SoC built-in WMAC device support
+ *
+ * Copyright (C) 2008-2009 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
+ *
+ * Parts of this file are based on Atheros' 2.6.15 BSP
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
+ * by the Free Software Foundation.
+ */
+
+#ifndef _AR71XX_DEV_AR913X_WMAC_H
+#define _AR71XX_DEV_AR913X_WMAC_H
+
+void ar913x_add_device_wmac(void) __init;
+
+#endif /* _AR71XX_DEV_AR913X_WMAC_H */
#include <linux/etherdevice.h>
#include <linux/platform_device.h>
#include <linux/serial_8250.h>
-#include <linux/ath9k_platform.h>
#include <asm/mach-ar71xx/ar71xx.h>
"\"%s\"\n", mac_str);
}
-static struct resource ar91xx_wmac_resources[] = {
- {
- .start = AR91XX_WMAC_BASE,
- .end = AR91XX_WMAC_BASE + AR91XX_WMAC_SIZE - 1,
- .flags = IORESOURCE_MEM,
- }, {
- .start = AR71XX_CPU_IRQ_WMAC,
- .end = AR71XX_CPU_IRQ_WMAC,
- .flags = IORESOURCE_IRQ,
- },
-};
-
-static struct ath9k_platform_data ar91xx_wmac_data;
-
-static struct platform_device ar91xx_wmac_device = {
- .name = "ath9k",
- .id = -1,
- .resource = ar91xx_wmac_resources,
- .num_resources = ARRAY_SIZE(ar91xx_wmac_resources),
- .dev = {
- .platform_data = &ar91xx_wmac_data,
- },
-};
-
-void __init ar91xx_add_device_wmac(void)
-{
- u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
-
- memcpy(ar91xx_wmac_data.eeprom_data, ee,
- sizeof(ar91xx_wmac_data.eeprom_data));
-
- ar71xx_device_stop(RESET_MODULE_AMBA2WMAC);
- mdelay(10);
-
- ar71xx_device_start(RESET_MODULE_AMBA2WMAC);
- mdelay(10);
-
- platform_device_register(&ar91xx_wmac_device);
-}
-
static struct platform_device ar71xx_dsa_switch_device = {
.name = "dsa",
.id = 0,
void ar71xx_add_device_wdt(void) __init;
-void ar91xx_add_device_wmac(void) __init;
-
void ar71xx_add_device_dsa(unsigned int id,
struct dsa_platform_data *d) __init;
#include "devices.h"
#include "dev-m25p80.h"
+#include "dev-ar913x-wmac.h"
#define AP81_GPIO_LED_STATUS 1
#define AP81_GPIO_LED_AOSS 3
ARRAY_SIZE(ap81_gpio_buttons),
ap81_gpio_buttons);
- ar91xx_add_device_wmac();
+ ar913x_add_device_wmac();
}
MIPS_MACHINE(AR71XX_MACH_AP81, "Atheros AP81", ap81_setup);
#include <asm/mach-ar71xx/ar91xx_flash.h>
#include "devices.h"
+#include "dev-ar913x-wmac.h"
#define AP83_GPIO_LED_WLAN 6
#define AP83_GPIO_LED_POWER 14
ar71xx_add_device_usb();
- ar91xx_add_device_wmac();
+ ar913x_add_device_wmac();
platform_device_register(&ap83_flash_device);
#include "devices.h"
#include "dev-m25p80.h"
+#include "dev-ar913x-wmac.h"
#define DIR_615C1_GPIO_LED_ORANGE_STATUS 1 /* ORANGE:STATUS:TRICOLOR */
#define DIR_615C1_GPIO_LED_BLUE_WPS 3 /* BLUE:WPS */
ARRAY_SIZE(dir_615c1_gpio_buttons),
dir_615c1_gpio_buttons);
- ar91xx_add_device_wmac();
+ ar913x_add_device_wmac();
}
MIPS_MACHINE(AR71XX_MACH_DIR_615_C1, "D-Link DIR-615 rev. C1", dir_615c1_setup);
#include <asm/mach-ar71xx/ar71xx.h>
#include "devices.h"
+#include "dev-ar913x-wmac.h"
#define MZK_W04NU_GPIO_LED_USB 0
#define MZK_W04NU_GPIO_LED_STATUS 1
mzk_w04nu_gpio_buttons);
ar71xx_add_device_usb();
- ar91xx_add_device_wmac();
+ ar913x_add_device_wmac();
}
MIPS_MACHINE(AR71XX_MACH_MZK_W04NU, "Planex MZK-W04NU", mzk_w04nu_setup);
#include "devices.h"
#include "dev-m25p80.h"
+#include "dev-ar913x-wmac.h"
#define MZK_W300NH_GPIO_LED_STATUS 1
#define MZK_W300NH_GPIO_LED_WPS 3
ar71xx_add_device_gpio_buttons(-1, MZK_W04NU_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(mzk_w300nh_gpio_buttons),
mzk_w300nh_gpio_buttons);
- ar91xx_add_device_wmac();
+ ar913x_add_device_wmac();
}
MIPS_MACHINE(AR71XX_MACH_MZK_W300NH, "Planex MZK-W300NH", mzk_w300nh_setup);
#include "devices.h"
#include "dev-m25p80.h"
+#include "dev-ar913x-wmac.h"
#define TEW_632BRP_GPIO_LED_STATUS 1
#define TEW_632BRP_GPIO_LED_WPS 3
ARRAY_SIZE(tew_632brp_gpio_buttons),
tew_632brp_gpio_buttons);
- ar91xx_add_device_wmac();
+ ar913x_add_device_wmac();
}
MIPS_MACHINE(AR71XX_MACH_TEW_632BRP, "TRENDnet TEW-632BRP", tew_632brp_setup);
#include "devices.h"
#include "dev-m25p80.h"
+#include "dev-ar913x-wmac.h"
#define TL_WR1043ND_GPIO_LED_SYSTEM 2
#define TL_WR1043ND_GPIO_LED_QSS 5
ar71xx_add_device_gpio_buttons(-1, TL_WR1043ND_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(tl_wr1043nd_gpio_buttons),
tl_wr1043nd_gpio_buttons);
- ar91xx_add_device_wmac();
+ ar913x_add_device_wmac();
}
MIPS_MACHINE(AR71XX_MACH_TL_WR1043ND, "TP-LINK TL-WR1043ND", tl_wr1043nd_setup);
#include "devices.h"
#include "dev-m25p80.h"
+#include "dev-ar913x-wmac.h"
#define TL_WR941ND_GPIO_LED_SYSTEM 2
#define TL_WR941ND_GPIO_LED_QSS 5
ar71xx_add_device_gpio_buttons(-1, TL_WR941ND_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(tl_wr941nd_gpio_buttons),
tl_wr941nd_gpio_buttons);
- ar91xx_add_device_wmac();
+ ar913x_add_device_wmac();
}
MIPS_MACHINE(AR71XX_MACH_TL_WR941ND, "TP-LINK TL-WR941ND", tl_wr941nd_setup);
#include "devices.h"
#include "dev-m25p80.h"
+#include "dev-ar913x-wmac.h"
#define WNR2000_GPIO_LED_PWR_GREEN 14
#define WNR2000_GPIO_LED_PWR_AMBER 7
wnr2000_gpio_buttons);
- ar91xx_add_device_wmac();
+ ar913x_add_device_wmac();
}
MIPS_MACHINE(AR71XX_MACH_WNR2000, "NETGEAR WNR2000", wnr2000_setup);
#include "devices.h"
#include "dev-m25p80.h"
+#include "dev-ar913x-wmac.h"
#define WRT160NL_GPIO_LED_POWER 14
#define WRT160NL_GPIO_LED_WPS_AMBER 9
ar71xx_add_device_m25p80(&wrt160nl_flash_data);
ar71xx_add_device_usb();
- ar91xx_add_device_wmac();
+ ar913x_add_device_wmac();
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wrt160nl_leds_gpio),
wrt160nl_leds_gpio);