]> git.baikalelectronics.ru Git - uboot.git/commit
spi: stm32_qspi: Remove useless struct stm32_qspi_flash
authorPatrice Chotard <patrice.chotard@foss.st.com>
Mon, 3 Apr 2023 06:04:43 +0000 (08:04 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 19 Apr 2023 07:52:42 +0000 (09:52 +0200)
commit96c526eca3330de2d9bd75c01874befe5b827c32
tree8d3145e3cc1cc4db3058af3b10de53acf39e7cd3
parent74b6967d846f1e11d9bf42fc43b0a8a2e27cca43
spi: stm32_qspi: Remove useless struct stm32_qspi_flash

Currently, in stm32_qspi_claim_bus(), QSPI_CR and QSPI_DCR registers
are saved in stm32_ospi_flash struct on first flash memory initialization
and restored on each flash accesses.

As the logic of spi-uclass.c changed since 'commit 0bd78b3ec80d
("spi: spi-uclass: Fix spi_claim_bus() speed/mode setup logic")'
set_speed() and set_mode() callbacks are called systematically when bus
speed or bus mode need to be updated, QSPI_CR and QSPI_DCR registers are
set accordingly.

So stm32_qspi_claim_bus() can be updated by removing QSPI_CR and QSPI_DCR
save/restore code and struct stm32_ospi_flash can be removed as well.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
drivers/spi/stm32_qspi.c