bcma: add locking around GPIO register accesses
The GPIOs are access through some registers in the chip common core. 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/4585 Acked-by: Florian Fainelli <florian@openwrt.org>
This commit is contained in:

committed by
John Crispin

parent
0ef0165b20
commit
ef85fb2830
@@ -567,6 +567,9 @@ struct bcma_drv_cc {
|
||||
int nr_serial_ports;
|
||||
struct bcma_serial_port serial_ports[4];
|
||||
#endif /* CONFIG_BCMA_DRIVER_MIPS */
|
||||
|
||||
/* Lock for GPIO register access. */
|
||||
spinlock_t gpio_lock;
|
||||
};
|
||||
|
||||
/* Register access */
|
||||
|
Reference in New Issue
Block a user