On Wed, Mar 30, 2022 at 09:33:14AM +0200, Patrice Chotard wrote:

> Now, spi_flash_probe_bus_cs() relies on DT for spi speed and mode
> and logically calls spi_get_bus_and_cs(). In case spi mode and speed are
> not read from DT, make usage of spi_flash_probe() instead.
> 
> To sum-up:
>  - Previous call tree was:
>     spi_flash_probe() -> spi_flash_probe_bus_cs() -> spi_get_bus_and_cs()
> 
>  - Current call tree is:
>     spi_flash_probe() -> _spi_get_bus_and_cs()
>     spi_flash_probe_bus_cs() -> spi_get_bus_and_cs()
> 
> This patch impacts the following :
>   - cmd/sf.c: if spi mode and/or speed is passed in argument of
>     do_spi_flash_probe(), call spi_flash_probe() otherwise call
>     spi_flash_probe_bus_cs().
> 
>   - drivers/net/fm/fm.c: as by default spi speed and mode was set to
>     0 and a comment indicates that speed and mode are read from DT,
>     use spi_flash_probe_bus_cs().
> 
>   - drivers/net/pfe_eth/pfe_firmware.c: spi speed and mode are not read
>     from DT by all platforms using this driver, so keep legacy and replace
>     spi_flash_probe_bus_cs() by spi_flash_probe();
> 
>   - drivers/net/sni_netsec.c : spi speed and mode are not read from DT,
>     so replace spi_flash_probe_bus_cs() by spi_flash_probe().
> 
>   - drivers/usb/gadget/max3420_udc.c: Can't find any platform which make
>     usage of this driver, nevertheless, keep legacy and replace
>     spi_get_bus_and_cs() by _spi_get_bus_and_cs().
> 
>   - env/sf.c: a comment indicates that speed and mode are read
>     from DT. So use spi_flash_probe_bus_cs().
> 
> Signed-off-by: Patrice Chotard <patrice.chot...@foss.st.com>
> 
> Cc: Marek Behun <marek.be...@nic.cz>
> Cc: Jagan Teki <ja...@amarulasolutions.com>
> Cc: Vignesh R <vigne...@ti.com>
> Cc: Joe Hershberger <joe.hershber...@ni.com>
> Cc: Ramon Fried <rfried....@gmail.com>
> Cc: Lukasz Majewski <lu...@denx.de>
> Cc: Marek Vasut <ma...@denx.de>
> Cc: Wolfgang Denk <w...@denx.de>
> Cc: Simon Glass <s...@chromium.org>
> Cc: Stefan Roese <s...@denx.de>
> Cc: "Pali Rohár" <p...@kernel.org>
> Cc: Konstantin Porotchkin <kos...@marvell.com>
> Cc: Igal Liberman <ig...@marvell.com>
> Cc: Bin Meng <bmeng...@gmail.com>
> Cc: Pratyush Yadav <p.ya...@ti.com>
> Cc: Sean Anderson <sean...@gmail.com>
> Cc: Anji J <anji.jagarlm...@nxp.com>
> Cc: Biwen Li <biwen...@nxp.com>
> Cc: Priyanka Jain <priyanka.j...@nxp.com>
> Cc: Chaitanya Sakinam <chaitanya.saki...@nxp.com>

Applied to u-boot/master, thanks!

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to