hw/ssi: imx_spi: Rework imx_spi_read() to handle block disabled
commit7c87bb5333f0fdb17fee7e52acff1d915a68857e
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Fri, 29 Jan 2021 13:23:18 +0000 (29 21:23 +0800)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 2 Feb 2021 17:00:55 +0000 (2 17:00 +0000)
treeb3a5fe6e68087d37b12d626f6c6e129accc33d0a
parent93722b6f6a6ef0ab0544f20440a2f6b951103dcb
hw/ssi: imx_spi: Rework imx_spi_read() to handle block disabled

When the block is disabled, it stay it is 'internal reset logic'
(internal clocks are gated off). Reading any register returns
its reset value. Only update this value if the device is enabled.

Ref: i.MX 6DQ Applications Processor Reference Manual (IMX6DQRM),
     chapter 21.7.3: Control Register (ECSPIx_CONREG)

Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Message-id: 20210129132323.30946-6-bmeng.cn@gmail.com
Message-Id: <20210115153049.3353008-5-f4bug@amsat.org>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/ssi/imx_spi.c