+static struct ath9k_platform_data wndr3700_wmac0_data;
+static struct ath9k_platform_data wndr3700_wmac1_data;
+
+static int wndr3700_pci_plat_dev_init(struct pci_dev *dev)
+{
+ switch (PCI_SLOT(dev->devfn)) {
+ case 17:
+ dev->dev.platform_data = &wndr3700_wmac0_data;
+ break;
+ case 18:
+ dev->dev.platform_data = &wndr3700_wmac1_data;
+ break;
+ }
+
+ return 0;
+}
+
+static void __init wndr3700_pci_init(void)
+{
+ u8 *ee;
+
+ ee = (u8 *) KSEG1ADDR(0x1fff1000);
+ memcpy(wndr3700_wmac0_data.eeprom_data, ee,
+ sizeof(wndr3700_wmac0_data.eeprom_data));
+
+ ee = (u8 *) KSEG1ADDR(0x1fff5000);
+ memcpy(wndr3700_wmac1_data.eeprom_data, ee,
+ sizeof(wndr3700_wmac1_data.eeprom_data));
+
+ ar71xx_pci_plat_dev_init = wndr3700_pci_plat_dev_init;
+ ar71xx_pci_init(ARRAY_SIZE(wndr3700_pci_irqs), wndr3700_pci_irqs);
+}
+#else
+static inline void wndr3700_pci_init(void) { };
+#endif /* CONFIG_PCI */
+