diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bcma/bcma_driver_chipcommon.h | 9 | ||||
| -rw-r--r-- | include/linux/ssb/ssb.h | 4 | ||||
| -rw-r--r-- | include/linux/ssb/ssb_driver_chipcommon.h | 3 | ||||
| -rw-r--r-- | include/linux/ssb/ssb_driver_extif.h | 1 |
4 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h index e51359180b6f..9a0e3fa3ca95 100644 --- a/include/linux/bcma/bcma_driver_chipcommon.h +++ b/include/linux/bcma/bcma_driver_chipcommon.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define LINUX_BCMA_DRIVER_CC_H_ | 2 | #define LINUX_BCMA_DRIVER_CC_H_ |
| 3 | 3 | ||
| 4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
| 5 | #include <linux/gpio.h> | ||
| 5 | 6 | ||
| 6 | /** ChipCommon core registers. **/ | 7 | /** ChipCommon core registers. **/ |
| 7 | #define BCMA_CC_ID 0x0000 | 8 | #define BCMA_CC_ID 0x0000 |
| @@ -574,6 +575,12 @@ struct bcma_drv_cc { | |||
| 574 | #endif /* CONFIG_BCMA_DRIVER_MIPS */ | 575 | #endif /* CONFIG_BCMA_DRIVER_MIPS */ |
| 575 | u32 ticks_per_ms; | 576 | u32 ticks_per_ms; |
| 576 | struct platform_device *watchdog; | 577 | struct platform_device *watchdog; |
| 578 | |||
| 579 | /* Lock for GPIO register access. */ | ||
| 580 | spinlock_t gpio_lock; | ||
| 581 | #ifdef CONFIG_BCMA_DRIVER_GPIO | ||
| 582 | struct gpio_chip gpio; | ||
| 583 | #endif | ||
| 577 | }; | 584 | }; |
| 578 | 585 | ||
| 579 | /* Register access */ | 586 | /* Register access */ |
| @@ -610,6 +617,8 @@ u32 bcma_chipco_gpio_outen(struct bcma_drv_cc *cc, u32 mask, u32 value); | |||
| 610 | u32 bcma_chipco_gpio_control(struct bcma_drv_cc *cc, u32 mask, u32 value); | 617 | u32 bcma_chipco_gpio_control(struct bcma_drv_cc *cc, u32 mask, u32 value); |
| 611 | u32 bcma_chipco_gpio_intmask(struct bcma_drv_cc *cc, u32 mask, u32 value); | 618 | u32 bcma_chipco_gpio_intmask(struct bcma_drv_cc *cc, u32 mask, u32 value); |
| 612 | u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value); | 619 | u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value); |
| 620 | u32 bcma_chipco_gpio_pullup(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
| 621 | u32 bcma_chipco_gpio_pulldown(struct bcma_drv_cc *cc, u32 mask, u32 value); | ||
| 613 | 622 | ||
| 614 | /* PMU support */ | 623 | /* PMU support */ |
| 615 | extern void bcma_pmu_init(struct bcma_drv_cc *cc); | 624 | extern void bcma_pmu_init(struct bcma_drv_cc *cc); |
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h index 1f64e3f1f22b..22958d68ecfe 100644 --- a/include/linux/ssb/ssb.h +++ b/include/linux/ssb/ssb.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
| 7 | #include <linux/spinlock.h> | 7 | #include <linux/spinlock.h> |
| 8 | #include <linux/pci.h> | 8 | #include <linux/pci.h> |
| 9 | #include <linux/gpio.h> | ||
| 9 | #include <linux/mod_devicetable.h> | 10 | #include <linux/mod_devicetable.h> |
| 10 | #include <linux/dma-mapping.h> | 11 | #include <linux/dma-mapping.h> |
| 11 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
| @@ -435,6 +436,9 @@ struct ssb_bus { | |||
| 435 | spinlock_t gpio_lock; | 436 | spinlock_t gpio_lock; |
| 436 | struct platform_device *watchdog; | 437 | struct platform_device *watchdog; |
| 437 | #endif /* EMBEDDED */ | 438 | #endif /* EMBEDDED */ |
| 439 | #ifdef CONFIG_SSB_DRIVER_GPIO | ||
| 440 | struct gpio_chip gpio; | ||
| 441 | #endif /* DRIVER_GPIO */ | ||
| 438 | 442 | ||
| 439 | /* Internal-only stuff follows. Do not touch. */ | 443 | /* Internal-only stuff follows. Do not touch. */ |
| 440 | struct list_head list; | 444 | struct list_head list; |
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h index 38339fd68a5f..9e492be5244b 100644 --- a/include/linux/ssb/ssb_driver_chipcommon.h +++ b/include/linux/ssb/ssb_driver_chipcommon.h | |||
| @@ -590,6 +590,7 @@ struct ssb_chipcommon { | |||
| 590 | u32 status; | 590 | u32 status; |
| 591 | /* Fast Powerup Delay constant */ | 591 | /* Fast Powerup Delay constant */ |
| 592 | u16 fast_pwrup_delay; | 592 | u16 fast_pwrup_delay; |
| 593 | spinlock_t gpio_lock; | ||
| 593 | struct ssb_chipcommon_pmu pmu; | 594 | struct ssb_chipcommon_pmu pmu; |
| 594 | u32 ticks_per_ms; | 595 | u32 ticks_per_ms; |
| 595 | u32 max_timer_ms; | 596 | u32 max_timer_ms; |
| @@ -645,6 +646,8 @@ u32 ssb_chipco_gpio_outen(struct ssb_chipcommon *cc, u32 mask, u32 value); | |||
| 645 | u32 ssb_chipco_gpio_control(struct ssb_chipcommon *cc, u32 mask, u32 value); | 646 | u32 ssb_chipco_gpio_control(struct ssb_chipcommon *cc, u32 mask, u32 value); |
| 646 | u32 ssb_chipco_gpio_intmask(struct ssb_chipcommon *cc, u32 mask, u32 value); | 647 | u32 ssb_chipco_gpio_intmask(struct ssb_chipcommon *cc, u32 mask, u32 value); |
| 647 | u32 ssb_chipco_gpio_polarity(struct ssb_chipcommon *cc, u32 mask, u32 value); | 648 | u32 ssb_chipco_gpio_polarity(struct ssb_chipcommon *cc, u32 mask, u32 value); |
| 649 | u32 ssb_chipco_gpio_pullup(struct ssb_chipcommon *cc, u32 mask, u32 value); | ||
| 650 | u32 ssb_chipco_gpio_pulldown(struct ssb_chipcommon *cc, u32 mask, u32 value); | ||
| 648 | 651 | ||
| 649 | #ifdef CONFIG_SSB_SERIAL | 652 | #ifdef CONFIG_SSB_SERIAL |
| 650 | extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc, | 653 | extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc, |
diff --git a/include/linux/ssb/ssb_driver_extif.h b/include/linux/ssb/ssb_driver_extif.h index 99511d0e931d..a410e841eb91 100644 --- a/include/linux/ssb/ssb_driver_extif.h +++ b/include/linux/ssb/ssb_driver_extif.h | |||
| @@ -161,6 +161,7 @@ | |||
| 161 | 161 | ||
| 162 | struct ssb_extif { | 162 | struct ssb_extif { |
| 163 | struct ssb_device *dev; | 163 | struct ssb_device *dev; |
| 164 | spinlock_t gpio_lock; | ||
| 164 | }; | 165 | }; |
| 165 | 166 | ||
| 166 | static inline bool ssb_extif_available(struct ssb_extif *extif) | 167 | static inline bool ssb_extif_available(struct ssb_extif *extif) |
