mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 05:01:30 +00:00
x86: ich-spi: Clear atomic preop only when SPI settings are not locked
The atomic preop register can only be written when SPI settings are not locked, otherwise it's read-only. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
52dd56ba84
commit
d2ca80c3d7
1 changed files with 2 additions and 1 deletions
|
@ -563,7 +563,8 @@ static int ich_spi_xfer(struct udevice *dev, unsigned int bitlen,
|
|||
}
|
||||
|
||||
/* Clear atomic preop now that xfer is done */
|
||||
ich_writew(ctlr, 0, ctlr->preop);
|
||||
if (!lock)
|
||||
ich_writew(ctlr, 0, ctlr->preop);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue