| 1 | /* |
| 2 | * Atheros AP9X reference board PCI initialization |
| 3 | * |
| 4 | * Copyright (C) 2009-2012 Gabor Juhos <juhosg@openwrt.org> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms of the GNU General Public License version 2 as published |
| 8 | * by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #ifndef _ATH79_DEV_AP9X_PCI_H |
| 12 | #define _ATH79_DEV_AP9X_PCI_H |
| 13 | |
| 14 | struct gpio_led; |
| 15 | |
| 16 | #if defined(CONFIG_ATH79_DEV_AP9X_PCI) |
| 17 | void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin); |
| 18 | void ap9x_pci_setup_wmac_gpio(unsigned wmac, u32 mask, u32 val); |
| 19 | void ap9x_pci_setup_wmac_leds(unsigned wmac, struct gpio_led *leds, |
| 20 | int num_leds); |
| 21 | |
| 22 | void ap91_pci_init(u8 *cal_data, u8 *mac_addr); |
| 23 | void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0, |
| 24 | u8 *cal_data1, u8 *mac_addr1); |
| 25 | |
| 26 | #else |
| 27 | static inline void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin) {} |
| 28 | static inline void ap9x_pci_setup_wmac_gpio(unsigned wmac, |
| 29 | u32 mask, u32 val) {} |
| 30 | static inline void ap9x_pci_setup_wmac_leds(unsigned wmac, |
| 31 | struct gpio_led *leds, |
| 32 | int num_leds) {} |
| 33 | |
| 34 | static inline void ap91_pci_init(u8 *cal_data, u8 *mac_addr) {} |
| 35 | static inline void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0, |
| 36 | u8 *cal_data1, u8 *mac_addr1) {} |
| 37 | #endif |
| 38 | |
| 39 | #endif /* _ATH79_DEV_AP9X_PCI_H */ |
| 40 | |
| 41 | |