From eb20ab87e6ed3f9481318ae4dcea3d357f530cf3 Mon Sep 17 00:00:00 2001 From: John Crispin 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 SVN-Revision: 28994 --- .../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/arch/mips') 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 + * + * 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 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 + * + * 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 #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