diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-08-26 19:22:59 -0700 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2017-09-02 23:35:55 +0800 |
commit | d2ca80c3d7e314c2dd2ac1bf63e5630ae7131a57 (patch) | |
tree | 2ff48ff3d867ace5b13dd619843ace96955c56fc /drivers | |
parent | 52dd56ba847acd048205e6412e779fda991c95d3 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/ich.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 5a3d690815..22fc83dd72 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -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; } |