dev-ap9x-pci.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #ifndef _ATH79_DEV_AP9X_PCI_H
  11. #define _ATH79_DEV_AP9X_PCI_H
  12. struct gpio_led;
  13. struct ath9k_platform_data;
  14. #if defined(CONFIG_ATH79_DEV_AP9X_PCI)
  15. void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin);
  16. void ap9x_pci_setup_wmac_gpio(unsigned wmac, u32 mask, u32 val);
  17. void ap9x_pci_setup_wmac_leds(unsigned wmac, struct gpio_led *leds,
  18. int num_leds);
  19. struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac);
  20. void ap91_pci_init(u8 *cal_data, u8 *mac_addr);
  21. void ap91_pci_init_simple(void);
  22. void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0,
  23. u8 *cal_data1, u8 *mac_addr1);
  24. #else
  25. static inline void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin) {}
  26. static inline void ap9x_pci_setup_wmac_gpio(unsigned wmac,
  27. u32 mask, u32 val) {}
  28. static inline void ap9x_pci_setup_wmac_leds(unsigned wmac,
  29. struct gpio_led *leds,
  30. int num_leds) {}
  31. static inline struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac)
  32. {
  33. return NULL;
  34. }
  35. static inline void ap91_pci_init(u8 *cal_data, u8 *mac_addr) {}
  36. static inline void ap91_pci_init_simple(void) {}
  37. static inline void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0,
  38. u8 *cal_data1, u8 *mac_addr1) {}
  39. #endif
  40. #endif /* _ATH79_DEV_AP9X_PCI_H */