From: John Crispin Date: Mon, 14 Nov 2011 18:55:58 +0000 (+0000) Subject: lantiq: fix falcon build breakage X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=79a4642b40e41af5c8c9c057aa494312d61f6cae;p=openwrt%2Fstaging%2Fadrian.git lantiq: fix falcon build breakage dev-wifi-rt2x00 fails to build on falcon due to missing pci SVN-Revision: 29129 --- 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 deleted file mode 100644 index 94932df785..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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 deleted file mode 100644 index 060ca50270..0000000000 --- a/target/linux/lantiq/files-3.1/arch/mips/lantiq/dev-wifi-rt2x00.h +++ /dev/null @@ -1,14 +0,0 @@ -/* - * 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/dev-wifi-rt2x00.c b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.c new file mode 100644 index 0000000000..94932df785 --- /dev/null +++ b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/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/xway/dev-wifi-rt2x00.h b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/dev-wifi-rt2x00.h new file mode 100644 index 0000000000..060ca50270 --- /dev/null +++ b/target/linux/lantiq/files-3.1/arch/mips/lantiq/xway/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 67685465a0..249cc9b706 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 @@ -25,7 +25,7 @@ #include #include "../machtypes.h" -#include "../dev-wifi-rt2x00.h" +#include "dev-wifi-rt2x00.h" #include "devices.h" #include "dev-dwc_otg.h" diff --git a/target/linux/lantiq/patches/211-devices.patch b/target/linux/lantiq/patches/211-devices.patch index 4c3f50fc87..dd028063f3 100644 --- a/target/linux/lantiq/patches/211-devices.patch +++ b/target/linux/lantiq/patches/211-devices.patch @@ -1,5 +1,7 @@ ---- a/arch/mips/lantiq/devices.c -+++ b/arch/mips/lantiq/devices.c +Index: linux-3.1.1/arch/mips/lantiq/devices.c +=================================================================== +--- linux-3.1.1.orig/arch/mips/lantiq/devices.c 2011-11-14 20:22:33.588135463 +0100 ++++ linux-3.1.1/arch/mips/lantiq/devices.c 2011-11-14 20:22:34.328135495 +0100 @@ -18,6 +18,7 @@ #include #include @@ -8,7 +10,7 @@ #include #include -@@ -100,3 +101,20 @@ void __init ltq_register_pci(struct ltq_ +@@ -100,3 +101,20 @@ pr_err("kernel is compiled without PCI support\n"); } #endif @@ -29,27 +31,33 @@ + cp1_base = + (void*)CPHYSADDR(dma_alloc_coherent(NULL, CP1_SIZE, &dma, GFP_ATOMIC)); +} ---- a/arch/mips/lantiq/devices.h -+++ b/arch/mips/lantiq/devices.h -@@ -23,5 +23,6 @@ extern void ltq_register_nor(struct phys +Index: linux-3.1.1/arch/mips/lantiq/devices.h +=================================================================== +--- linux-3.1.1.orig/arch/mips/lantiq/devices.h 2011-11-14 20:22:33.588135463 +0100 ++++ linux-3.1.1/arch/mips/lantiq/devices.h 2011-11-14 20:22:34.328135495 +0100 +@@ -23,5 +23,6 @@ extern void ltq_register_wdt(void); extern void ltq_register_asc(int port); extern void ltq_register_pci(struct ltq_pci_data *data); +extern void ltq_register_tapi(void); #endif ---- a/arch/mips/lantiq/xway/Makefile -+++ b/arch/mips/lantiq/xway/Makefile +Index: linux-3.1.1/arch/mips/lantiq/xway/Makefile +=================================================================== +--- linux-3.1.1.orig/arch/mips/lantiq/xway/Makefile 2011-11-14 20:22:34.304135491 +0100 ++++ linux-3.1.1/arch/mips/lantiq/xway/Makefile 2011-11-14 20:39:51.404179655 +0100 @@ -1,5 +1,7 @@ obj-y := sysctrl.o reset.o gpio.o gpio_stp.o gpio_ebu.o devices.o dma.o nand.o timer.o -+obj-y += dev-dwc_otg.o ++obj-y += dev-dwc_otg.o dev-wifi-rt2x00.o + obj-$(CONFIG_SOC_XWAY) += clk-xway.o prom-xway.o obj-$(CONFIG_SOC_AMAZON_SE) += clk-ase.o prom-ase.o obj-$(CONFIG_SOC_VR9) += clk-vr9.o prom-vr9.o ---- a/arch/mips/lantiq/xway/devices.c -+++ b/arch/mips/lantiq/xway/devices.c +Index: linux-3.1.1/arch/mips/lantiq/xway/devices.c +=================================================================== +--- linux-3.1.1.orig/arch/mips/lantiq/xway/devices.c 2011-11-14 20:22:34.092135483 +0100 ++++ linux-3.1.1/arch/mips/lantiq/xway/devices.c 2011-11-14 20:22:34.328135495 +0100 @@ -19,6 +19,7 @@ #include #include @@ -58,7 +66,7 @@ #include #include -@@ -99,3 +100,98 @@ ltq_register_etop(struct ltq_eth_data *e +@@ -99,3 +100,98 @@ platform_device_register(<q_etop); } } @@ -157,8 +165,10 @@ + ltq_spi.dev.platform_data = pdata; + platform_device_register(<q_spi); +} ---- a/arch/mips/lantiq/xway/devices.h -+++ b/arch/mips/lantiq/xway/devices.h +Index: linux-3.1.1/arch/mips/lantiq/xway/devices.h +=================================================================== +--- linux-3.1.1.orig/arch/mips/lantiq/xway/devices.h 2011-11-11 21:19:27.000000000 +0100 ++++ linux-3.1.1/arch/mips/lantiq/xway/devices.h 2011-11-14 20:22:34.328135495 +0100 @@ -11,10 +11,17 @@ #include "../devices.h" @@ -177,14 +187,16 @@ +extern void ltq_register_gpio_buttons(struct gpio_button *buttons, int cnt); #endif ---- a/arch/mips/lantiq/Makefile -+++ b/arch/mips/lantiq/Makefile +Index: linux-3.1.1/arch/mips/lantiq/Makefile +=================================================================== +--- linux-3.1.1.orig/arch/mips/lantiq/Makefile 2011-11-14 20:22:33.640135462 +0100 ++++ linux-3.1.1/arch/mips/lantiq/Makefile 2011-11-14 20:39:09.852178049 +0100 @@ -4,7 +4,7 @@ # under the terms of the GNU General Public License version 2 as published # by the Free Software Foundation. -obj-y := irq.o setup.o clk.o prom.o devices.o -+obj-y := irq.o setup.o clk.o prom.o devices.o dev-gpio-leds.o dev-gpio-buttons.o dev-wifi-rt2x00.o ++obj-y := irq.o setup.o clk.o prom.o devices.o dev-gpio-leds.o dev-gpio-buttons.o obj-$(CONFIG_EARLY_PRINTK) += early_printk.o