1
0

dev-ap9x-pci.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 gpio_keys_button;
  14. struct ath9k_platform_data;
  15. #if defined(CONFIG_ATH79_DEV_AP9X_PCI)
  16. void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin);
  17. void ap9x_pci_setup_wmac_gpio(unsigned wmac, u32 mask, u32 val);
  18. void ap9x_pci_setup_wmac_leds(unsigned wmac, struct gpio_led *leds,
  19. int num_leds);
  20. void ap9x_pci_setup_wmac_led_name(unsigned wmac, const char *led_name);
  21. void ap9x_pci_setup_wmac_btns(unsigned wmac, struct gpio_keys_button *btns,
  22. unsigned num_btns, unsigned poll_interval);
  23. struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac);
  24. void ap91_pci_init(u8 *cal_data, u8 *mac_addr);
  25. void ap91_pci_init_simple(void);
  26. void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0,
  27. u8 *cal_data1, u8 *mac_addr1);
  28. #else
  29. static inline void ap9x_pci_setup_wmac_led_pin(unsigned wmac, int pin) {}
  30. static inline void ap9x_pci_setup_wmac_gpio(unsigned wmac,
  31. u32 mask, u32 val) {}
  32. static inline void ap9x_pci_setup_wmac_leds(unsigned wmac,
  33. struct gpio_led *leds,
  34. int num_leds) {}
  35. static inline void ap9x_pci_setup_wmac_led_name(unsigned wmac,
  36. const char *led_name) {}
  37. static inline void ap9x_pci_setup_wmac_btns(unsigned wmac,
  38. struct gpio_keys_button *btns,
  39. unsigned num_btns,
  40. unsigned poll_interval) {}
  41. static inline struct ath9k_platform_data *ap9x_pci_get_wmac_data(unsigned wmac)
  42. {
  43. return NULL;
  44. }
  45. static inline void ap91_pci_init(u8 *cal_data, u8 *mac_addr) {}
  46. static inline void ap91_pci_init_simple(void) {}
  47. static inline void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0,
  48. u8 *cal_data1, u8 *mac_addr1) {}
  49. #endif
  50. #endif /* _ATH79_DEV_AP9X_PCI_H */