Add hook for platform pci device init. It will permit use of eeprom data stored in flash of wireless (ath5k) pci card as platform data.
Index: target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c =================================================================== --- target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c (revision 24118) +++ target/linux/ifxmips/files/arch/mips/pci/pci-ifxmips.c (working copy) @@ -67,6 +67,8 @@ } __setup("pci_external_clk", ifxmips_pci_set_external_clk); +int (*ifxmips_pci_plat_dev_init)(struct pci_dev *dev) = NULL; + int pcibios_plat_dev_init(struct pci_dev *dev) { @@ -90,6 +92,10 @@ printk ("WARNING: invalid interrupt pin %d\n", pin); return 1; } + + if (ifxmips_pci_plat_dev_init) + return ifxmips_pci_plat_dev_init(dev); + return 0; } Index: target/linux/ifxmips/files/arch/mips/include/asm/mach-ifxmips/pci.h =================================================================== --- target/linux/ifxmips/files/arch/mips/include/asm/mach-ifxmips/pci.h (revision 0) +++ target/linux/ifxmips/files/arch/mips/include/asm/mach-ifxmips/pci.h (revision 0) @@ -0,0 +1,16 @@ +/* + * ifxmips SoCs specific PCI definitions + * + * 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 __ASM_MACH_IFXMIPS_PCI_H +#define __ASM_MACH_IFXMIPS_PCI_H + +//struct pci_dev; + +extern int (*ifxmips_pci_plat_dev_init)(struct pci_dev *dev); + +#endif /* __ASM_MACH_IFXMIPS_PCI_H */
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel