#endif /* _LTQ_XWAY_H__ */
--- a/arch/mips/lantiq/xway/Makefile
+++ b/arch/mips/lantiq/xway/Makefile
-@@ -1,3 +1,6 @@
- obj-y := prom.o sysctrl.o clk.o reset.o dma.o gptu.o dcdc.o
+@@ -2,4 +2,7 @@ obj-y := prom.o sysctrl.o clk.o reset.o
+
+ obj-y += vmmc.o
+obj-y += eth_mac.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 @@
+@@ -0,0 +1,271 @@
+/*
+ * Copyright (C) 2011 Luca Olivetti <luca@ventoso.org>
+ * Copyright (C) 2011 John Crispin <blogic@openwrt.org>
+ 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;
+ 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");
+
+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_load = 1;
++
++ return ret;
++}
++
++static int __init of_ath9k_eeprom_init_late(void)
++{
++ if (!ath9k_eep_load)
++ return 0;
++ return platform_driver_probe(&ath9k_eeprom_driver, of_ath9k_eeprom_probe);
+}
-+arch_initcall(of_ath9k_eeprom_init);
++late_initcall(of_ath9k_eeprom_init_late);
++subsys_initcall(of_ath9k_eeprom_init);
+
+
+static int ath5k_pci_plat_dev_init(struct pci_dev *dev)
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
-@@ -926,10 +926,13 @@ static int m25p_probe(struct spi_device
+@@ -927,10 +927,13 @@ static int m25p_probe(struct spi_device
unsigned i;
struct mtd_part_parser_data ppdata;
struct device_node __maybe_unused *np = spi->dev.of_node;
#endif
/* Platform data helps sort out which chip type we have, as
-@@ -1005,6 +1008,8 @@ static int m25p_probe(struct spi_device
+@@ -1006,6 +1009,8 @@ static int m25p_probe(struct spi_device
if (data && data->name)
flash->mtd.name = data->name;