summaryrefslogtreecommitdiff
path: root/package/broadcom-diag/src/diag.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-11-30 21:58:14 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-11-30 21:58:14 +0000
commit85ad2a43a099e03c0f78e171db05770bb92a5fa6 (patch)
tree96617349e0e74a17ffbc873b9dffc1fca8c7c331 /package/broadcom-diag/src/diag.c
parent66a69b145a5f7f5fc05ec2def21fd477823815ef (diff)
downloadmtk-20170518-85ad2a43a099e03c0f78e171db05770bb92a5fa6.zip
mtk-20170518-85ad2a43a099e03c0f78e171db05770bb92a5fa6.tar.gz
mtk-20170518-85ad2a43a099e03c0f78e171db05770bb92a5fa6.tar.bz2
add switch gpio init for bcm57xx (untested, see #2744)
SVN-Revision: 9642
Diffstat (limited to 'package/broadcom-diag/src/diag.c')
-rw-r--r--package/broadcom-diag/src/diag.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/package/broadcom-diag/src/diag.c b/package/broadcom-diag/src/diag.c
index 07b89d3..60bf612 100644
--- a/package/broadcom-diag/src/diag.c
+++ b/package/broadcom-diag/src/diag.c
@@ -131,6 +131,14 @@ static void __init bcm4780_init(void) {
schedule_timeout(HZ * 5);
}
+static void __init bcm57xx_init(void) {
+ int pin = 1 << 2;
+
+ gpio_outen(pin, pin);
+ gpio_control(pin, 0);
+ gpio_out(pin, pin);
+}
+
static struct platform_t __initdata platforms[] = {
/* Linksys */
[WAP54GV1] = {
@@ -138,7 +146,7 @@ static struct platform_t __initdata platforms[] = {
.buttons = {
{ .name = "reset", .gpio = 1 << 0 },
},
- .leds = {
+ .leds = {
{ .name = "diag", .gpio = 1 << 3 },
{ .name = "wlan", .gpio = 1 << 4 },
},
@@ -219,6 +227,7 @@ static struct platform_t __initdata platforms[] = {
{ .name = "usb_blink", .gpio = 1 << 10, .polarity = REVERSE },
{ .name = "usb", .gpio = 1 << 11, .polarity = REVERSE },
},
+ .platform_init = bcm57xx_init,
},
/* Asus */
[WLHDD] = {