[U-Boot] [PATCH v1] cmd/sf: probe flash with speed of last known flash or speed from devicetree
Vignesh R
vigneshr at ti.com
Wed Aug 24 12:35:46 CEST 2016
Hi,
On Wednesday 24 August 2016 03:35 PM, Hannes Schmelzer wrote:
> During probing flashes on the spi bus using the "sf probe" command, a
> maybe existing flash (from fdt) is unbound and removed to force the
> 'spi_flash_probe_bus_cs' really scanning the bus.
>
> Today the bus is probed with speed 0, this triggers several fall-back
> mechanism (mostly in the low-level drivers) to catch the impossible zero
> speed.
> Result of this is, that the spi-flash runs at very low speed depending
> on the minimum given by low-level driver/hardware.
>
> Values like 'spi-max-frequency' from devicetree are ignored totally
> today.
>
> This commit changes as following:
> - if there was already some flash binding in devicetree (having some
> spi-max-frequency within) speed is taken from it
> - if no flash binding was present for speed the 'spi-max-frequency' from
> the responsible spi node is taken.
>
> Signed-off-by: Hannes Schmelzer <oe5hpm at oevsv.at>
With commit 96907c0fe50a8 ("dm: spi: Read default speed and mode values
from DT") sf probe picks spi-max-frequency from DT if not specified as
argument.
But when sf probe is called second time, the command fails to pick up
speed from DT. This is because flash node is unbound from the SPI
controller children nodes. Below patch should fix this issue:
https://patchwork.ozlabs.org/patch/659979/
--
Regards
Vignesh
More information about the U-Boot
mailing list