Al 24/11/10 14:18, En/na John Crispin ha escrit:
ok, can you send a patch in that case that makes use of the new pci hook
please so we can apply the patch + a use case

I use the same hook to add support for the atheros ar9223 (using ath9k) in the arv4518pw.

+static struct ath9k_platform_data arv7518_ath9k_wmac_data = {
+       .led_pin = -1,
+};
+
+static int arv7518_pci_plat_dev_init(struct pci_dev *dev)
+{
+       dev->dev.platform_data = &arv7518_ath9k_wmac_data;
+
+       return 0;
+}
+
+void __init
+arv7518_register_ath9k(unsigned char *mac)
+{
+       u16 *eepdata, temp;
+       int size, addr;
+
+ memcpy_fromio(arv7518_ath9k_wmac_data.eeprom_data, (void *)KSEG1ADDR(0xb07f0400),sizeof(arv7518_ath9k_wmac_data.eeprom_data));
+       arv7518_ath9k_wmac_data.macaddr = mac;
+       ifxmips_pci_plat_dev_init = arv7518_pci_plat_dev_init;
+}
+
+


(will send the complete pach once everything is working).

The ar71xx does something similar (in fact that's where I took most of the code).

Bye
--
Luca
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to