summaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-12-14 18:01:00 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-12-14 18:01:00 +0000
commita7750dae90081a5a6b1ccee196012ff9d05c7170 (patch)
treea4da0e56c905ed16538fb0572932e039cd5892dd /target/linux/ar71xx
parent5e3e1d4a020edabee0de2e1e6d9dac0edf8182f4 (diff)
downloadmaster-31e0f0ae-a7750dae90081a5a6b1ccee196012ff9d05c7170.tar.gz
master-31e0f0ae-a7750dae90081a5a6b1ccee196012ff9d05c7170.tar.bz2
master-31e0f0ae-a7750dae90081a5a6b1ccee196012ff9d05c7170.zip
ar71xx: add helper function to setup LED pin and GPIO on the AP91 based boards
SVN-Revision: 24568
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.c11
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.h4
2 files changed, 15 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.c b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.c
index 2e55ea37b1..2b75f7bcb7 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.c
@@ -42,6 +42,17 @@ static int ap91_pci_plat_dev_init(struct pci_dev *dev)
return 0;
}
+__init void ap91_pci_setup_wmac_led_pin(int pin)
+{
+ ap91_wmac_data.led_pin = pin;
+}
+
+__init void ap91_pci_setup_wmac_gpio(u32 mask, u32 val)
+{
+ ap91_wmac_data.gpio_mask = mask;
+ ap91_wmac_data.gpio_val = val;
+}
+
void __init ap91_pci_init(u8 *cal_data, u8 *mac_addr)
{
if (cal_data)
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.h b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.h
index d6f2e522da..f5beb2ba09 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.h
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-pci.h
@@ -13,8 +13,12 @@
#if defined(CONFIG_AR71XX_DEV_AP91_PCI)
void ap91_pci_init(u8 *cal_data, u8 *mac_addr) __init;
+void ap91_pci_setup_wmac_led_pin(int pin) __init;
+void ap91_pci_setup_wmac_gpio(u32 mask, u32 val) __init;
#else
static inline void ap91_pci_init(u8 *cal_data, u8 *mac_addr) { }
+static inline void ap91_pci_setup_wmac_led(int pin) { }
+static inline void ap91_pci_setup_wmac_gpio(u32 mask, u32 gpio) { }
#endif
#endif /* _AR71XX_DEV_AP91_PCI_H */