fsi: Aspeed: Add mutex to protect HW access
authorEddie James <eajames@linux.ibm.com>
Fri, 20 Nov 2020 00:49:29 +0000 (11:19 +1030)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:46 +0000 (11:53 +0100)
commit11b2118f4ddde9b09f23039f29bea81f11ec4117
treee76c25e0c3031f637c1f258dab80a7dc13572545
parent67475eb26416d201a26820df9f8d944824d4af76
fsi: Aspeed: Add mutex to protect HW access

[ Upstream commit dfd7f2c1c532efaeff6084970bb60ec2f2e44191 ]

There is nothing to prevent multiple commands being executed
simultaneously. Add a mutex to prevent this.

Fixes: 606397d67f41 ("fsi: Add ast2600 master driver")
Reviewed-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Milton Miller <miltonm@us.ibm.com>
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Link: https://lore.kernel.org/r/20201120004929.185239-1-joel@jms.id.au
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/fsi/fsi-master-aspeed.c