aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-03-31 08:40:20 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-03-31 08:40:20 +0000
commitd06a46616e65d25e3f6da187047205fe21e75350 (patch)
tree082e47f6de675128a0b167dde02f00a0a4abf380 /target
parent8ae194692a4aebca6e8395873a3861241e2aa5b5 (diff)
downloadupstream-d06a46616e65d25e3f6da187047205fe21e75350.tar.gz
upstream-d06a46616e65d25e3f6da187047205fe21e75350.tar.bz2
upstream-d06a46616e65d25e3f6da187047205fe21e75350.zip
ramips: add wifi device for the RT2880 as well
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20624 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt288x/devices.c26
-rw-r--r--target/linux/ramips/files/arch/mips/ralink/rt288x/devices.h1
2 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt288x/devices.c b/target/linux/ramips/files/arch/mips/ralink/rt288x/devices.c
index 64ce0a9e6e..086d9a999f 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt288x/devices.c
+++ b/target/linux/ramips/files/arch/mips/ralink/rt288x/devices.c
@@ -96,3 +96,29 @@ void __init rt288x_register_flash(unsigned int id,
platform_device_register(pdev);
rt288x_flash_instance++;
}
+
+static struct resource rt288x_wifi_resources[] = {
+ {
+ .start = RT2880_WMAC_BASE,
+ .end = RT2880_WMAC_BASE + 0x3FFFF,
+ .flags = IORESOURCE_MEM,
+ }, {
+ .start = RT288X_CPU_IRQ_WNIC,
+ .end = RT288X_CPU_IRQ_WNIC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device rt288x_wifi_device = {
+ .name = "rt2800_wmac",
+ .resource = rt288x_wifi_resources,
+ .num_resources = ARRAY_SIZE(rt288x_wifi_resources),
+ .dev = {
+ .platform_data = NULL,
+ }
+};
+
+void __init rt288x_register_wifi(void)
+{
+ platform_device_register(&rt288x_wifi_device);
+}
diff --git a/target/linux/ramips/files/arch/mips/ralink/rt288x/devices.h b/target/linux/ramips/files/arch/mips/ralink/rt288x/devices.h
index 4585d8b56f..78daf3ad07 100644
--- a/target/linux/ramips/files/arch/mips/ralink/rt288x/devices.h
+++ b/target/linux/ramips/files/arch/mips/ralink/rt288x/devices.h
@@ -16,5 +16,6 @@ struct physmap_flash_data;
extern void rt288x_register_flash(unsigned int id,
struct physmap_flash_data *pdata) __init;
+void rt288x_register_wifi(void) __init;
#endif /* __ASM_MACH_RT288X_PLATFORM_H */