1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

add diag and switch support for brcm47xx-2.6

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6562 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd
2007-03-14 01:19:24 +00:00
parent 4339c8d6f9
commit c7a59f885d
8 changed files with 212 additions and 71 deletions

View File

@@ -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;
#ifdef BROADCOM
#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)
#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)
#else
#error Unsupported/unknown GPIO configuration
#error "Unsupported configuration."
#endif
#endif /* __GPIO_H */