The ralink rt305x board has a wireless card that can be used with the rt2800pci drive...
[openwrt-10.03/.git] / target / linux / ramips / files / arch / mips / ralink / rt305x / devices.c
index 4ad93b580d7c910524a2e1e372ef56f985d08acf..4ee0d4f1b48ad91dea73514055a81d50aa55eeae 100644 (file)
@@ -118,7 +118,7 @@ static struct resource rt305x_eth_resources[] = {
 static struct ramips_eth_platform_data ramips_eth_data = {
        .mac = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55 },
        .reset_fe = rt305x_fe_reset,
-       .min_pkt_len = 64
+       .min_pkt_len = 64,
 };
 
 static struct platform_device rt305x_eth_device = {
@@ -132,5 +132,33 @@ static struct platform_device rt305x_eth_device = {
 
 void __init rt305x_register_ethernet(void)
 {
+       ramips_eth_data.sys_freq = rt305x_sys_freq;
+
        platform_device_register(&rt305x_eth_device);
 }
+
+static struct resource rt305x_wifi_resources[] = {
+       {
+               .start  = RT305X_WMAC_BASE,
+               .end    = RT305X_WMAC_BASE + 0x3FFFF,
+               .flags  = IORESOURCE_MEM,
+       }, {
+               .start  = RT305X_CPU_IRQ_WNIC,
+               .end    = RT305X_CPU_IRQ_WNIC,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device rt305x_wifi_device = {
+       .name                   = "rt2800_wmac",
+       .resource               = rt305x_wifi_resources,
+       .num_resources  = ARRAY_SIZE(rt305x_wifi_resources),
+       .dev = {
+               .platform_data = NULL,
+       }
+};
+
+void __init rt305x_register_wifi(void)
+{
+       platform_device_register(&rt305x_wifi_device);
+}