Hi,

rather than fix up the patches, could you send a patch that sits on top of the existing ones that i can fold myself please ?

        John



On 17/11/13 18:32, Daniel Gimpelevich wrote:
Rather than break IRQ routing by delaying PCI initialization until the
calibration data can be loaded, this patch explicitly initializes the
ath9k device at a later stage, without ill effects. Gratuitous
whitespace removal included, with a quilt refresh.

Signed-off-by: Daniel Gimpelevich<[email protected]>
Index: 
target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch
===================================================================
--- 
a/target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch
 (revision 38842)
+++ 
b/target/linux/lantiq/patches-3.10/0010-MIPS-lantiq-wifi-and-ethernet-eeprom-handling.patch
 (working copy)
@@ -1,24 +1,7 @@
-From 8c19ced548538d964dcfb83bdf9ea9e8fbb7bdb1 Mon Sep 17 00:00:00 2001
-From: John Crispin<[email protected]>
-Date: Wed, 13 Mar 2013 10:02:58 +0100
-Subject: [PATCH 10/34] MIPS: lantiq: wifi and ethernet eeprom handling
-
-Signed-off-by: John Crispin<[email protected]>
----
- arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h  |    6 +
- .../mips/include/asm/mach-lantiq/xway/lantiq_soc.h |    3 +
- arch/mips/lantiq/xway/Makefile                     |    2 +
- arch/mips/lantiq/xway/ath_eep.c                    |  237 ++++++++++++++++++++
- arch/mips/lantiq/xway/pci-ath-fixup.c              |  109 +++++++++
- arch/mips/lantiq/xway/rt_eep.c                     |   60 +++++
- 6 files changed, 417 insertions(+)
- create mode 100644 arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h
- create mode 100644 arch/mips/lantiq/xway/ath_eep.c
- create mode 100644 arch/mips/lantiq/xway/pci-ath-fixup.c
- create mode 100644 arch/mips/lantiq/xway/rt_eep.c
-
---- /dev/null
-+++ b/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h
+Index: linux-3.10.18/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.18/arch/mips/include/asm/mach-lantiq/pci-ath-fixup.h    
2013-11-17 08:14:22.165555521 -0800
  @@ -0,0 +1,6 @@
  +#ifndef _PCI_ATH_FIXUP
  +#define _PCI_ATH_FIXUP
@@ -26,9 +9,11 @@
  +void ltq_pci_ath_fixup(unsigned slot, u16 *cal_data) __init;
  +
  +#endif /* _PCI_ATH_FIXUP */
---- 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,
+Index: linux-3.10.18/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h
+===================================================================
+--- linux-3.10.18.orig/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h     
2013-11-17 08:14:08.049485517 -0800
++++ linux-3.10.18/arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h  
2013-11-17 08:14:22.165555521 -0800
+@@ -90,5 +90,8 @@
   extern void ltq_pmu_enable(unsigned int module);
   extern void ltq_pmu_disable(unsigned int module);

@@ -37,18 +22,22 @@
  +
   #endif /* CONFIG_SOC_TYPE_XWAY */
   #endif /* _LTQ_XWAY_H__ */
---- 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
+Index: linux-3.10.18/arch/mips/lantiq/xway/Makefile
+===================================================================
+--- linux-3.10.18.orig/arch/mips/lantiq/xway/Makefile  2013-11-17 
08:14:08.009485318 -0800
++++ linux-3.10.18/arch/mips/lantiq/xway/Makefile       2013-11-17 
08:56:44.426161908 -0800
+@@ -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
---- /dev/null
-+++ b/arch/mips/lantiq/xway/ath_eep.c
-@@ -0,0 +1,250 @@
+Index: linux-3.10.18/arch/mips/lantiq/xway/ath_eep.c
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.18/arch/mips/lantiq/xway/ath_eep.c      2013-11-17 
08:57:12.438300807 -0800
+@@ -0,0 +1,256 @@
  +/*
  + *  Copyright (C) 2011 Luca Olivetti<[email protected]>
  + *  Copyright (C) 2011 John Crispin<[email protected]>
@@ -87,6 +76,7 @@
  +     return 0;
  +}
  +
++static int ath9k_eep_load;
  +int __init of_ath9k_eeprom_probe(struct platform_device *pdev)
  +{
  +     struct device_node *np = pdev->dev.of_node, *mtd_np;
@@ -163,6 +153,12 @@
  +     if (!of_property_read_u32(np, "ath,pci-slot",&pci_slot)) {
  +             ltq_pci_ath_fixup(pci_slot, ath9k_pdata.eeprom_data);
  +             dev_info(&pdev->dev, "pci slot: %u\n", pci_slot);
++              if (ath9k_eep_load) {
++                      struct pci_dev *d = NULL;
++                      while ((d = pci_get_device(PCI_VENDOR_ID_ATHEROS,
++                                      PCI_ANY_ID, d)) != NULL)
++                              pci_fixup_device(pci_fixup_early, d);
++              }
  +     }
  +
  +     dev_info(&pdev->dev, "loaded ath9k eeprom\n");
@@ -183,20 +179,19 @@
  +     },
  +};
  +
-+static int ath9k_eep_loaded;
  +static int __init of_ath9k_eeprom_init(void)
  +{
  +     int ret = platform_driver_probe(&ath9k_eeprom_driver, 
of_ath9k_eeprom_probe);
  +
-+      if (!ret)
-+              ath9k_eep_loaded = 1;
++      if (ret)
++              ath9k_eep_load = 1;
  +
  +     return ret;
  +}
  +
  +static int __init of_ath9k_eeprom_init_late(void)
  +{
-+      if (ath9k_eep_loaded)
++      if (!ath9k_eep_load)
  +             return 0;
  +     return platform_driver_probe(&ath9k_eeprom_driver, 
of_ath9k_eeprom_probe);
  +}
@@ -298,9 +293,11 @@
  +{
  +     return platform_driver_probe(&ath5k_eeprom_driver, 
of_ath5k_eeprom_probe);
  +}
-+device_initcall(of_ath5k_eeprom_init);
---- /dev/null
-+++ b/arch/mips/lantiq/xway/pci-ath-fixup.c
++subsys_initcall(of_ath5k_eeprom_init);
+Index: linux-3.10.18/arch/mips/lantiq/xway/pci-ath-fixup.c
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.18/arch/mips/lantiq/xway/pci-ath-fixup.c        2013-11-17 
08:37:56.132567002 -0800
  @@ -0,0 +1,109 @@
  +/*
  + *  Atheros AP94 reference board PCI initialization
@@ -389,7 +386,7 @@
  +     dev->revision = val&  0xff;
  +     dev->class = val>>  8; /* upper 3 bytes */
  +
-+      pr_info("pci %s: fixup info: [%04x:%04x] revision %02x class %#08x\n",
++      pr_info("pci %s: fixup info: [%04x:%04x] revision %02x class %#08x\n",
  +             pci_name(dev), dev->vendor, dev->device, dev->revision, 
dev->class);
  +
  +     pci_read_config_word(dev, PCI_COMMAND,&cmd);
@@ -411,8 +408,10 @@
  +     ath_fixups[ath_num_fixups].cal_data = cal_data;
  +     ath_num_fixups++;
  +}
---- /dev/null
-+++ b/arch/mips/lantiq/xway/rt_eep.c
+Index: linux-3.10.18/arch/mips/lantiq/xway/rt_eep.c
+===================================================================
+--- /dev/null  1970-01-01 00:00:00.000000000 +0000
++++ linux-3.10.18/arch/mips/lantiq/xway/rt_eep.c       2013-11-17 
08:14:22.169555536 -0800
  @@ -0,0 +1,60 @@
  +/*
  + *  Copyright (C) 2011 John Crispin<[email protected]>
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to