aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2012-11-20 17:24:32 -0500
committerJohn Crispin <blogic@openwrt.org>2012-11-21 15:55:52 -0500
commit394bc7e38be79987ed15de203920c3cddb724cc1 (patch)
tree64cb52592aab0fb2f392560fb99d8d61caa81f4a /include/linux
parentda22f22e91f0d14d996c7258101575a5a06ddf85 (diff)
ssb: add locking around gpio register accesses
The GPIOs are access through some registers in the chip common core or over extif. We need locking around these GPIO accesses, all GPIOs are accessed through the same registers and parallel writes will cause problems. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Patchwork: http://patchwork.linux-mips.org/patch/4590 Acked-by: Florian Fainelli <florian@openwrt.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ssb/ssb_driver_chipcommon.h1
-rw-r--r--include/linux/ssb/ssb_driver_extif.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h
index c8d07c95d76e..30b694345d47 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}; 595};
595 596
diff --git a/include/linux/ssb/ssb_driver_extif.h b/include/linux/ssb/ssb_driver_extif.h
index 91161f0aa22b..bd2306854a91 100644
--- a/include/linux/ssb/ssb_driver_extif.h
+++ b/include/linux/ssb/ssb_driver_extif.h
@@ -158,6 +158,7 @@
158 158
159struct ssb_extif { 159struct ssb_extif {
160 struct ssb_device *dev; 160 struct ssb_device *dev;
161 spinlock_t gpio_lock;
161}; 162};
162 163
163static inline bool ssb_extif_available(struct ssb_extif *extif) 164static inline bool ssb_extif_available(struct ssb_extif *extif)