summaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/files-3.1/arch/mips
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-12 18:41:15 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-12 18:41:15 +0000
commit2c1120a3b32ae80e786670900f6bee9182816a4b (patch)
tree3b9cccc8fbb20cda13841c6d7fa8ecc27831e41f /target/linux/lantiq/files-3.1/arch/mips
parent9394e4a065ca6036acc0ec73edf88226c3efe135 (diff)
lantiq: w303v has its rt2860 eep on the nor flash. tell compat-wireless how to use it
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28994 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/files-3.1/arch/mips')
-rw-r--r--target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.c31
-rw-r--r--target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.h14
-rw-r--r--target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c4
3 files changed, 49 insertions, 0 deletions
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.c
new file mode 100644
index 000000000..94932df78
--- /dev/null
+++ b/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
+ *
+ * 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/init.h>
+#include <linux/platform_device.h>
+#include <linux/rt2x00_platform.h>
+#include <linux/pci.h>
+
+#include "dev-wifi-rt2x00.h"
+
+extern int (*ltqpci_plat_dev_init)(struct pci_dev *dev);
+struct rt2x00_platform_data rt2x00_pdata;
+
+static int
+rt2x00_pci_plat_dev_init(struct pci_dev *dev)
+{
+ dev->dev.platform_data = &rt2x00_pdata;
+ return 0;
+}
+
+void __init
+ltq_register_rt2x00(const char *firmware)
+{
+ rt2x00_pdata.eeprom_file_name = kstrdup(firmware, GFP_KERNEL);
+ ltqpci_plat_dev_init = rt2x00_pci_plat_dev_init;
+}
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.h
new file mode 100644
index 000000000..060ca5027
--- /dev/null
+++ b/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
+ *
+ * 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 _DEV_WIFI_RT2X00_H__
+#define _DEV_WIFI_RT2X00_H__
+
+extern void ltq_register_rt2x00(const char *firmware);
+
+#endif
diff --git a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c
index 1c0fcb5e7..b08ada5e3 100644
--- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c
+++ b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c
@@ -24,6 +24,7 @@
#include <dev-gpio-leds.h>
#include "../machtypes.h"
+#include "../dev-wifi-rt2x00.h"
#include "devices.h"
#include "dev-dwc_otg.h"
@@ -484,9 +485,12 @@ arv7525pw_init(void)
ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv4525pw_gpio_leds), arv4525pw_gpio_leds);
ltq_register_nor(&arv7525_flash_data);
ltq_pci_data.clock = PCI_CLOCK_INT;
+ ltq_pci_data.gpio |= PCI_EXIN1;
+ ltq_pci_data.irq[14] = (INT_NUM_IM3_IRL0 + 31);
ltq_register_pci(&ltq_pci_data);
ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII;
arv45xx_register_ethernet();
+ ltq_register_rt2x00("RT2860.eeprom");
ltq_register_tapi();
}