aboutsummaryrefslogtreecommitdiffstats
path: root/package/switch/src/gpio.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-03-14 01:19:24 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-03-14 01:19:24 +0000
commitbf622ab0ae504d01ca9f589b8d67d3902c068133 (patch)
tree5b8dd8a0a870acf6299164257269e34512abdff3 /package/switch/src/gpio.h
parent40c03084c2c8f842329fc7dd84648935055b4d25 (diff)
downloadupstream-bf622ab0ae504d01ca9f589b8d67d3902c068133.tar.gz
upstream-bf622ab0ae504d01ca9f589b8d67d3902c068133.tar.bz2
upstream-bf622ab0ae504d01ca9f589b8d67d3902c068133.zip
add diag and switch support for brcm47xx-2.6
SVN-Revision: 6562
Diffstat (limited to 'package/switch/src/gpio.h')
-rw-r--r--package/switch/src/gpio.h41
1 files changed, 3 insertions, 38 deletions
diff --git a/package/switch/src/gpio.h b/package/switch/src/gpio.h
index 800ae25a9f..f4fadfc640 100644
--- a/package/switch/src/gpio.h
+++ b/package/switch/src/gpio.h
@@ -8,45 +8,10 @@
#ifndef __GPIO_H
#define __GPIO_H
-#if defined(BCMGPIO2)
-
-#ifdef LINUX_2_4
-#define sbh bcm947xx_sbh
-extern void *bcm947xx_sbh;
-#else
-extern void *sbh;
-#endif
-
-extern __u32 sb_gpioin(void *sbh);
-extern __u32 sb_gpiointpolarity(void *sbh, __u32 mask, __u32 val, __u8 prio);
-extern __u32 sb_gpiointmask(void *sbh, __u32 mask, __u32 val, __u8 prio);
-extern __u32 sb_gpioouten(void *sbh, __u32 mask, __u32 val, __u8 prio);
-extern __u32 sb_gpioout(void *sbh, __u32 mask, __u32 val, __u8 prio);
-
-#define gpioin() sb_gpioin(sbh)
-#define gpiointpolarity(mask,val) sb_gpiointpolarity(sbh, mask, val, 0)
-#define gpiointmask(mask,val) sb_gpiointmask(sbh, mask, val, 0)
-#define gpioouten(mask,val) sb_gpioouten(sbh, mask, val, 0)
-#define gpioout(mask,val) sb_gpioout(sbh, mask, val, 0)
-
-#elif defined(BCMGPIO)
-
-#define sbh bcm947xx_sbh
-extern void *bcm947xx_sbh;
-extern __u32 sb_gpioin(void *sbh);
-extern __u32 sb_gpiointpolarity(void *sbh, __u32 mask, __u32 val);
-extern __u32 sb_gpiointmask(void *sbh, __u32 mask, __u32 val);
-extern __u32 sb_gpioouten(void *sbh, __u32 mask, __u32 val);
-extern __u32 sb_gpioout(void *sbh, __u32 mask, __u32 val);
-
-#define gpioin() sb_gpioin(sbh)
-#define gpiointpolarity(mask,val) sb_gpiointpolarity(sbh, mask, val)
-#define gpiointmask(mask,val) sb_gpiointmask(sbh, mask, val)
-#define gpioouten(mask,val) sb_gpioouten(sbh, mask, val)
-#define gpioout(mask,val) sb_gpioout(sbh, mask, val)
-
+#ifdef BROADCOM
+#include "gpio-bcm947xx.h"
#else
-#error Unsupported/unknown GPIO configuration
+#error "Unsupported configuration."
#endif
#endif /* __GPIO_H */