From f13a6f9e0531e251087f752440411018bfd91e97 Mon Sep 17 00:00:00 2001 From: Werner Zeh Date: Wed, 14 Nov 2018 10:55:52 +0100 Subject: sb/intel/common: Reset Pre-OP after atomic SPI cycle is finished Make sure that the Pre-Op register is cleared when an atomic cycle has been finished without errors. Change-Id: Ied88337125b125474b411e2f39f668171d15bfac Signed-off-by: Werner Zeh Reviewed-on: https://review.coreboot.org/c/29634 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks --- src/southbridge/intel/common/spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/southbridge') diff --git a/src/southbridge/intel/common/spi.c b/src/southbridge/intel/common/spi.c index 71655bc0fd..96b580e52f 100644 --- a/src/southbridge/intel/common/spi.c +++ b/src/southbridge/intel/common/spi.c @@ -2,6 +2,7 @@ * Copyright (c) 2011 The Chromium OS Authors. * Copyright (C) 2009, 2010 Carl-Daniel Hailfinger * Copyright (C) 2011 Stefan Tauner + * Copyright (C) 2018 Siemens AG * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -608,7 +609,7 @@ static int spi_ctrlr_xfer(const struct spi_slave *slave, const void *dout, return -1; } - return 0; + goto spi_xfer_exit; } /* @@ -673,6 +674,7 @@ static int spi_ctrlr_xfer(const struct spi_slave *slave, const void *dout, } } +spi_xfer_exit: /* Clear atomic preop now that xfer is done */ writew_(0, cntlr->preop); -- cgit v1.2.3