X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=target%2Flinux%2Flantiq%2Fpatches-4.1%2F0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch;h=2fc4db30660035bf24592bd649f3ae2da617aea0;hb=f2f50ad76200213eb072f4f621b40cae51b0f6d4;hp=ec769ccf63c3699d08deadf9e6ae1bc68a6e3f12;hpb=c5cc3d96109aa5aba2600b159c8f52669285e9e3;p=librecmc%2Flibrecmc.git diff --git a/target/linux/lantiq/patches-4.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-4.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch index ec769ccf63..2fc4db3066 100644 --- a/target/linux/lantiq/patches-4.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch +++ b/target/linux/lantiq/patches-4.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch @@ -415,7 +415,7 @@ Signed-off-by: John Crispin +device_initcall(of_eth_mac_init); --- /dev/null +++ b/arch/mips/lantiq/xway/pci-ath-fixup.c -@@ -0,0 +1,109 @@ +@@ -0,0 +1,118 @@ +/* + * Atheros AP94 reference board PCI initialization + * @@ -442,6 +442,7 @@ Signed-off-by: John Crispin +static void ath_pci_fixup(struct pci_dev *dev) +{ + void __iomem *mem; ++ struct pci_dev *bridge = pci_upstream_bridge(dev); + u16 *cal_data = NULL; + u16 cmd; + u32 bar0; @@ -477,6 +478,10 @@ Signed-off-by: John Crispin + return; + } + ++ if (bridge) { ++ pci_enable_device(dev); ++ } ++ + pci_read_config_dword(dev, PCI_BASE_ADDRESS_0, &bar0); + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, base); + pci_read_config_word(dev, PCI_COMMAND, &cmd); @@ -512,6 +517,10 @@ Signed-off-by: John Crispin + + pci_write_config_dword(dev, PCI_BASE_ADDRESS_0, bar0); + ++ if (bridge) { ++ pci_disable_device(dev); ++ } ++ + iounmap(mem); +} +DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ath_pci_fixup);