1 #ifndef __SWITCH_GPIO_H
2 #define __SWITCH_GPIO_H
4 #include <linux/ssb/ssb_embedded.h>
5 #include <linux/bcma/bcma_driver_chipcommon.h>
8 static inline u32
gpio_in(void)
10 switch (bcm47xx_bus_type
) {
11 #ifdef CONFIG_BCM47XX_SSB
12 case BCM47XX_BUS_TYPE_SSB
:
13 return ssb_gpio_in(&bcm47xx_bus
.ssb
, ~0);
15 #ifdef CONFIG_BCM47XX_BCMA
16 case BCM47XX_BUS_TYPE_BCMA
:
17 return bcma_chipco_gpio_in(&bcm47xx_bus
.bcma
.bus
.drv_cc
, ~0);
23 static inline u32
gpio_out(u32 mask
, u32 value
)
25 switch (bcm47xx_bus_type
) {
26 #ifdef CONFIG_BCM47XX_SSB
27 case BCM47XX_BUS_TYPE_SSB
:
28 return ssb_gpio_out(&bcm47xx_bus
.ssb
, mask
, value
);
30 #ifdef CONFIG_BCM47XX_BCMA
31 case BCM47XX_BUS_TYPE_BCMA
:
32 return bcma_chipco_gpio_out(&bcm47xx_bus
.bcma
.bus
.drv_cc
, mask
, value
);
38 static inline u32
gpio_outen(u32 mask
, u32 value
)
40 switch (bcm47xx_bus_type
) {
41 #ifdef CONFIG_BCM47XX_SSB
42 case BCM47XX_BUS_TYPE_SSB
:
43 ssb_gpio_outen(&bcm47xx_bus
.ssb
, mask
, value
);
46 #ifdef CONFIG_BCM47XX_BCMA
47 case BCM47XX_BUS_TYPE_BCMA
:
48 bcma_chipco_gpio_outen(&bcm47xx_bus
.bcma
.bus
.drv_cc
, mask
, value
);
55 #endif /* __SWITCH_GPIO_H */
This page took 0.047606 seconds and 5 git commands to generate.