ramips: add wifi device for the RT2880 as well
authorGabor Juhos <juhosg@openwrt.org>
Wed, 31 Mar 2010 08:40:20 +0000 (08:40 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Wed, 31 Mar 2010 08:40:20 +0000 (08:40 +0000)
SVN-Revision: 20624

target/linux/ramips/files/arch/mips/ralink/rt288x/devices.c
target/linux/ramips/files/arch/mips/ralink/rt288x/devices.h

index 64ce0a9e6e28a15ebb97899addf5be9f41fe9ada..086d9a999f41ec424bb390ac999bd425be069c8d 100644 (file)
@@ -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);
+}
index 4585d8b56f1182ac8ec92a471f1e5f746ce99a6c..78daf3ad073f2a45b2c0a9241c9b5425be5190de 100644 (file)
@@ -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 */