aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2008-12-30 06:52:57 +0000
committerGabor Juhos <juhosg@openwrt.org>2008-12-30 06:52:57 +0000
commit38826c1e194b97feea284aedf50e8f070967718d (patch)
tree381024d88638dd3d93556e2b084e58d9da15e4dc /target/linux/ar71xx
parentf7a9a397b8895b3802c93c716cc59bfb53e7e802 (diff)
downloadupstream-38826c1e194b97feea284aedf50e8f070967718d.tar.gz
upstream-38826c1e194b97feea284aedf50e8f070967718d.tar.bz2
upstream-38826c1e194b97feea284aedf50e8f070967718d.zip
add dummy WMAC device
SVN-Revision: 13769
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/platform.h2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c2
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/platform.c24
-rw-r--r--target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/platform.h2
5 files changed, 32 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/platform.h b/target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/platform.h
index a82d621a48..20d83bb748 100644
--- a/target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/platform.h
+++ b/target/linux/ar71xx/files-2.6.28/arch/mips/include/asm/mach-ar71xx/platform.h
@@ -82,4 +82,6 @@ extern void ar71xx_add_device_uart(void) __init;
extern void ar71xx_add_device_wdt(void) __init;
+extern void ar91xx_add_device_wmac(void) __init;
+
#endif /* __ASM_MACH_AR71XX_PLATFORM_H */
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
index 45eace8a31..13fe719069 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
@@ -80,6 +80,8 @@ static void __init ap83_setup(void)
ap83_gpio_buttons);
ar71xx_add_device_usb();
+
+ ar91xx_add_device_wmac();
}
MIPS_MACHINE(AR71XX_MACH_AP83, "Atheros AP83", ap83_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c
index ac0f6c1869..01bab6c179 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c
@@ -123,6 +123,8 @@ static void __init tew_632brp_setup(void)
ar71xx_add_device_gpio_buttons(-1, TEW_632BRP_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(tew_632brp_gpio_buttons),
tew_632brp_gpio_buttons);
+
+ ar91xx_add_device_wmac();
}
MIPS_MACHINE(AR71XX_MACH_TEW_632BRP, "TRENDnet TEW-632BRP", tew_632brp_setup);
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c b/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c
index 705f24315a..e4e9538986 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/platform.c
@@ -592,3 +592,27 @@ void __init ar71xx_parse_mac_addr(char *mac_str)
printk(KERN_DEBUG "ar71xx: failed to parse mac address "
"\"%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 platform_device ar91xx_wmac_device = {
+ .name = "ath9k",
+ .id = -1,
+ .resource = ar91xx_wmac_resources,
+ .num_resources = ARRAY_SIZE(ar91xx_wmac_resources),
+};
+
+void __init ar91xx_add_device_wmac(void)
+{
+ platform_device_register(&ar91xx_wmac_device);
+}
diff --git a/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/platform.h b/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/platform.h
index a82d621a48..20d83bb748 100644
--- a/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/platform.h
+++ b/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/platform.h
@@ -82,4 +82,6 @@ extern void ar71xx_add_device_uart(void) __init;
extern void ar71xx_add_device_wdt(void) __init;
+extern void ar91xx_add_device_wmac(void) __init;
+
#endif /* __ASM_MACH_AR71XX_PLATFORM_H */