[PATCH v4 2/3] spi: spi_flash_probe_bus_cs() rely on DT for spi speed and mode
Tom Rini
trini at konsulko.com
Mon May 23 19:57:28 CEST 2022
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.chotard at foss.st.com>
>
> Cc: Marek Behun <marek.behun at nic.cz>
> Cc: Jagan Teki <jagan at amarulasolutions.com>
> Cc: Vignesh R <vigneshr at ti.com>
> Cc: Joe Hershberger <joe.hershberger at ni.com>
> Cc: Ramon Fried <rfried.dev at gmail.com>
> Cc: Lukasz Majewski <lukma at denx.de>
> Cc: Marek Vasut <marex at denx.de>
> Cc: Wolfgang Denk <wd at denx.de>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Stefan Roese <sr at denx.de>
> Cc: "Pali Rohár" <pali at kernel.org>
> Cc: Konstantin Porotchkin <kostap at marvell.com>
> Cc: Igal Liberman <igall at marvell.com>
> Cc: Bin Meng <bmeng.cn at gmail.com>
> Cc: Pratyush Yadav <p.yadav at ti.com>
> Cc: Sean Anderson <seanga2 at gmail.com>
> Cc: Anji J <anji.jagarlmudi at nxp.com>
> Cc: Biwen Li <biwen.li at nxp.com>
> Cc: Priyanka Jain <priyanka.jain at nxp.com>
> Cc: Chaitanya Sakinam <chaitanya.sakinam at nxp.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220523/786f86c1/attachment.sig>
More information about the U-Boot
mailing list