X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/f52d66ff00b24111f87c274d3d7085ef2e1d27b1..8d4f51f588c481e79479d5502691a68c682b08d7:/package/switch/src/gpio.h?ds=inline diff --git a/package/switch/src/gpio.h b/package/switch/src/gpio.h index 800ae25a9..90bafd39e 100644 --- a/package/switch/src/gpio.h +++ b/package/switch/src/gpio.h @@ -8,45 +8,18 @@ #ifndef __GPIO_H #define __GPIO_H -#if defined(BCMGPIO2) - -#ifdef LINUX_2_4 -#define sbh bcm947xx_sbh -extern void *bcm947xx_sbh; +#ifdef CONFIG_BCM47XX +#include "gpio-bcm947xx.h" #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) +#warning "Unsupported configuration." -#elif defined(BCMGPIO) +#define gpio_in() (-1U) +#define gpio_out(mask, value) (-1U) +#define gpio_outen(mask, value) (-1U) +#define gpio_control(mask, value) (-1U) +#define gpio_intmask(mask, value) (-1U) +#define gpio_intpolarity(mask, value) (-1U) -#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) - -#else -#error Unsupported/unknown GPIO configuration #endif #endif /* __GPIO_H */