[PATCH] spi: stm32_qspi: Remove useless struct stm32_qspi_flash

Patrick DELAUNAY patrick.delaunay at foss.st.com
Mon Apr 17 17:32:15 CEST 2023


Hi,

On 4/3/23 08:04, Patrice Chotard wrote:
> 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 741280e9accd
> ("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 at foss.st.com>
> ---
>
>   drivers/spi/stm32_qspi.c | 27 +++------------------------
>   1 file changed, 3 insertions(+), 24 deletions(-)
>


Reviewed-by: Patrick Delaunay <patrick.delaunay at foss.st.com>

Thanks
Patrick




More information about the U-Boot mailing list