From: Jean Pihet Date: Sun, 29 Nov 2020 11:39:48 +0100 Subject: [PATCH 3/3] TI QSPI: prevent a 4-byte write to the flash on read access In-Reply-To: <20201129103948.158293-1-jean.pihet@newoldbits.com> References: <20201129103948.158293-1-jean.pihet@newoldbits.com> Message-ID: <20201129103948.158293-3-jean.pihet@newoldbits.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In MMIO mode, a write to the flash generates write commands to the device. Prevent this from happening when reading from the device. Signed-off-by: Jean Pihet --- drivers/spi/ti_qspi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index 57192b9c0a..40e1988df5 100644 --- a/drivers/spi/ti_qspi.c +++ b/drivers/spi/ti_qspi.c @@ -305,8 +305,6 @@ static void ti_qspi_copy_mmap(void *data, void *offset, size_t len) #else memcpy_fromio(data, offset, len); #endif - - *((unsigned int *)offset) += len; } static void ti_qspi_setup_mmap_read(struct ti_qspi_priv *priv, int cs, -- 2.26.2