Skip to content
Commit edd1aec0 authored by Aaron Williams's avatar Aaron Williams Committed by Bo Sun
Browse files

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: default avatarAaron Williams <awilliams@marvell.com>
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/127790


Reviewed-by: default avatarChandrakala Chavva <cchavva@marvell.com>
Tested-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: default avatarBo Sun <Bo.Sun.CN@windriver.com>
parent f7df9862
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment