[PATCH] spi: stm32_qspi: Remove useless struct stm32_qspi_flash
Patrice CHOTARD
patrice.chotard at foss.st.com
Wed Apr 19 11:09:11 CEST 2023
On 4/17/23 17:32, Patrick DELAUNAY wrote:
> 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
>
>
Applied on u-boot-stm/master, thanks
Patrice
More information about the U-Boot
mailing list