From 2c1120a3b32ae80e786670900f6bee9182816a4b Mon Sep 17 00:00:00 2001 From: blogic Date: Sat, 12 Nov 2011 18:41:15 +0000 Subject: 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 --- .../files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.c | 31 ++++++++++++++++++++++ .../files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.h | 14 ++++++++++ .../files-3.1/arch/mips/lantiq/xway/mach-arv45xx.c | 4 +++ 3 files changed, 49 insertions(+) create mode 100644 target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.c create mode 100644 target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.h (limited to 'target/linux/lantiq/files-3.1') 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 + * + * 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 +#include +#include +#include + +#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 + * + * 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 #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(<q_pci_data); ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII; arv45xx_register_ethernet(); + ltq_register_rt2x00("RT2860.eeprom"); ltq_register_tapi(); } -- cgit v1.2.3