summaryrefslogtreecommitdiff
path: root/target/linux/lantiq/patches-3.10
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2013-09-18 16:31:41 +0000
committerJohn Crispin <john@openwrt.org>2013-09-18 16:31:41 +0000
commitf9f73ef2ec89c0bc3d5a7c1351acb56f2d227afe (patch)
treeebf81dff97a62dd8a6cd52d33d33bc29cf0b4be1 /target/linux/lantiq/patches-3.10
parent5722b32acf21fc6d928333fc1333d397f75c1f86 (diff)
downloadmtk-20170518-f9f73ef2ec89c0bc3d5a7c1351acb56f2d227afe.zip
mtk-20170518-f9f73ef2ec89c0bc3d5a7c1351acb56f2d227afe.tar.gz
mtk-20170518-f9f73ef2ec89c0bc3d5a7c1351acb56f2d227afe.tar.bz2
lantiq: fix ath9k eeprom loading order bug
https://dev.openwrt.org/ticket/14131 http://patchwork.openwrt.org/patch/4038/ Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 38041
Diffstat (limited to 'target/linux/lantiq/patches-3.10')
-rw-r--r--target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch78
1 files changed, 42 insertions, 36 deletions
diff --git a/target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch
index a7b325e..d4a380e 100644
--- a/target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch
+++ b/target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch
@@ -17,11 +17,10 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
create mode 100644 arch/mips/lantiq/xway/pci-ath-fixup.c
create mode 100644 arch/mips/lantiq/xway/rt_eep.c
-diff --git a/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h b/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h
-new file mode 100644
-index 0000000..095d261
---- /dev/null
-+++ b/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h
+Index: linux-3.10.12/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.12/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h 2013-09-17 22:32:50.385021711 +0200
@@ -0,0 +1,6 @@
+#ifndef _PCI_ATH_FIXUP
+#define _PCI_ATH_FIXUP
@@ -29,11 +28,11 @@ index 0000000..095d261
+void ltq_pci_ath_fixup(unsigned slot, u16 *cal_data) __init;
+
+#endif /* _PCI_ATH_FIXUP */
-diff --git a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
-index 133336b..779715c 100644
---- a/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
-+++ b/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
-@@ -90,5 +90,8 @@ int xrx200_gphy_boot(struct device *dev, unsigned int id, dma_addr_t dev_addr);
+Index: linux-3.10.12/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
+===================================================================
+--- linux-3.10.12.orig/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 2013-09-14 15:55:12.000000000 +0200
++++ linux-3.10.12/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h 2013-09-17 22:32:50.389021711 +0200
+@@ -90,5 +90,8 @@
extern void ltq_pmu_enable(unsigned int module);
extern void ltq_pmu_disable(unsigned int module);
@@ -42,23 +41,22 @@ index 133336b..779715c 100644
+
#endif /* CONFIG_SOC_TYPE_XWAY */
#endif /* _LTQ_XWAY_H__ */
-diff --git a/arch/mips/lantiq/xway/Makefile b/arch/mips/lantiq/xway/Makefile
-index da51fe0..0af7a54 100644
---- a/arch/mips/lantiq/xway/Makefile
-+++ b/arch/mips/lantiq/xway/Makefile
-@@ -2,4 +2,6 @@ obj-y := prom.o sysctrl.o clk.o reset.o dma.o timer.o dcdc.o
+Index: linux-3.10.12/arch/mips/lantiq/xway/Makefile
+===================================================================
+--- linux-3.10.12.orig/arch/mips/lantiq/xway/Makefile 2013-09-17 22:32:50.305021707 +0200
++++ linux-3.10.12/arch/mips/lantiq/xway/Makefile 2013-09-18 02:41:31.613659574 +0200
+@@ -2,4 +2,6 @@
obj-y += vmmc.o
+obj-$(CONFIG_PCI) += ath_eep.o rt_eep.o pci-ath-fixup.o
+
obj-$(CONFIG_XRX200_PHY_FW) += xrx200_phy_fw.o
-diff --git a/arch/mips/lantiq/xway/ath_eep.c b/arch/mips/lantiq/xway/ath_eep.c
-new file mode 100644
-index 0000000..1146f01
---- /dev/null
-+++ b/arch/mips/lantiq/xway/ath_eep.c
-@@ -0,0 +1,237 @@
+Index: linux-3.10.12/arch/mips/lantiq/xway/ath_eep.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.12/arch/mips/lantiq/xway/ath_eep.c 2013-09-18 02:41:28.525659442 +0200
+@@ -0,0 +1,250 @@
+/*
+ * Copyright (C) 2011 Luca Olivetti <luca@ventoso.org>
+ * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
@@ -193,12 +191,25 @@ index 0000000..1146f01
+ },
+};
+
++static int ath9k_eep_loaded;
+static int __init of_ath9k_eeprom_init(void)
+{
-+ return platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe);
++ int ret = platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe);
++
++ if (!ret)
++ ath9k_eep_loaded = 1;
++
++ return ret;
+}
-+late_initcall(of_ath9k_eeprom_init);
+
++static int __init of_ath9k_eeprom_init_late(void)
++{
++ if (ath9k_eep_loaded)
++ return 0;
++ return platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe);
++}
++late_initcall(of_ath9k_eeprom_init_late);
++subsys_initcall(of_ath9k_eeprom_init);
+
+static int ath5k_pci_plat_dev_init(struct pci_dev *dev)
+{
@@ -296,11 +307,10 @@ index 0000000..1146f01
+ return platform_driver_probe(&ath5k_eeprom_driver, of_ath5k_eeprom_probe);
+}
+device_initcall(of_ath5k_eeprom_init);
-diff --git a/arch/mips/lantiq/xway/pci-ath-fixup.c b/arch/mips/lantiq/xway/pci-ath-fixup.c
-new file mode 100644
-index 0000000..c87ffb2
---- /dev/null
-+++ b/arch/mips/lantiq/xway/pci-ath-fixup.c
+Index: linux-3.10.12/arch/mips/lantiq/xway/pci-ath-fixup.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.12/arch/mips/lantiq/xway/pci-ath-fixup.c 2013-09-17 22:32:50.389021711 +0200
@@ -0,0 +1,109 @@
+/*
+ * Atheros AP94 reference board PCI initialization
@@ -411,11 +421,10 @@ index 0000000..c87ffb2
+ ath_fixups[ath_num_fixups].cal_data = cal_data;
+ ath_num_fixups++;
+}
-diff --git a/arch/mips/lantiq/xway/rt_eep.c b/arch/mips/lantiq/xway/rt_eep.c
-new file mode 100644
-index 0000000..00f2d4c
---- /dev/null
-+++ b/arch/mips/lantiq/xway/rt_eep.c
+Index: linux-3.10.12/arch/mips/lantiq/xway/rt_eep.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.12/arch/mips/lantiq/xway/rt_eep.c 2013-09-17 22:32:50.389021711 +0200
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
@@ -477,6 +486,3 @@ index 0000000..00f2d4c
+ return platform_driver_probe(&ralink_eeprom_driver, of_ralink_eeprom_probe);
+}
+device_initcall(of_ralink_eeprom_init);
---
-1.7.10.4
-