From d2ca80c3d7e314c2dd2ac1bf63e5630ae7131a57 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Sat, 26 Aug 2017 19:22:59 -0700 Subject: 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 Reviewed-by: Stefan Roese --- drivers/spi/ich.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/spi') diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 5a3d6908152..22fc83dd725 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; } -- cgit v1.2.3