spi: cadence-xspi: Fix locking with ATF
commit 6bc23e93e940dfe7dbc70538c565c55be4d5dcbe from git@git.assembla.com:cavium/WindRiver.linux.git The locking code with ATF is flawed where if both the kernel and ATF try and grab the lock at the same time the kernel driver will not detect this since it does not re-check the lock value. This also simplifies the code a bit by using a for loop instead of a while loop. This lock is necessary since both ATF and the kernel can require access to the SPI NOR and the GPIO register is otherwise unused so it is shared between both. Change-Id: Ib86ba1e75ce7e351c1adfcbe5f1904d7d14b3602 Signed-off-by:Aaron Williams <awilliams@marvell.com> Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/127790 Reviewed-by:
Chandrakala Chavva <cchavva@marvell.com> Tested-by:
Sunil Kovvuri Goutham <sgoutham@marvell.com> Signed-off-by:
Bo Sun <Bo.Sun.CN@windriver.com>
Loading
Please register or sign in to comment