Root/target/linux/ar71xx/files/arch/mips/ath79/dev-ap9x-pci.h

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

Archive Download this file



interactive