diff options
author | John Crispin <john@openwrt.org> | 2011-11-12 18:41:15 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2011-11-12 18:41:15 +0000 |
commit | eb20ab87e6ed3f9481318ae4dcea3d357f530cf3 (patch) | |
tree | 75625757f5714ec7c110d4e7743fa406a0989c80 /target/linux/lantiq/files-3.1/arch | |
parent | bbfaaeffd6f02f87a02bab2d5e874873cd1788ca (diff) | |
download | upstream-eb20ab87e6ed3f9481318ae4dcea3d357f530cf3.tar.gz upstream-eb20ab87e6ed3f9481318ae4dcea3d357f530cf3.tar.bz2 upstream-eb20ab87e6ed3f9481318ae4dcea3d357f530cf3.zip |
lantiq: w303v has its rt2860 eep on the nor flash. tell compat-wireless how to use it
SVN-Revision: 28994
Diffstat (limited to 'target/linux/lantiq/files-3.1/arch')
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 0000000000..94932df785 --- /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 0000000000..060ca50270 --- /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 1c0fcb5e74..b08ada5e3f 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(<q_pci_data); ltq_eth_data.mii_mode = PHY_INTERFACE_MODE_MII; arv45xx_register_ethernet(); + ltq_register_rt2x00("RT2860.eeprom"); ltq_register_tapi(); } |