1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

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
This commit is contained in:
blogic
2011-11-12 18:41:15 +00:00
parent 9394e4a065
commit 2c1120a3b3
5 changed files with 127 additions and 16 deletions

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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();
}