[U-Boot] [PATCH] sf: fix sf probe

Simon Glass sjg at chromium.org
Tue Sep 6 03:03:18 CEST 2016


On 26 August 2016 at 09:10, Hannes Schmelzer <hannes at schmelzer.or.at> wrote:
>
> mfG
> Schmelzer Hannes
>
> On 08/17/2016 09:19 AM, Wenyou Yang wrote:
>>
>> From: Cyrille Pitchen <cyrille.pitchen at atmel.com>
>>
>> This patch fixes the "sf probe" command. The very first SPI flash probe
>> passes, for instance when u-boot tries to read its environment settings
>> from a (Q)SPI memory but next "sf probe" commands fail because the flash
>> memory node is unbound from the SPI controller children nodes.
>>
>> Signed-off-by: Cyrille Pitchen <cyrille.pitchen at atmel.com>
>> Signed-off-by: Wenyou Yang <wenyou.yang at atmel.com>
>> ---
>>
>>   cmd/sf.c | 1 -
>>   1 file changed, 1 deletion(-)
>>
>> diff --git a/cmd/sf.c b/cmd/sf.c
>> index 286906c..65b117f 100644
>> --- a/cmd/sf.c
>> +++ b/cmd/sf.c
>> @@ -125,7 +125,6 @@ static int do_spi_flash_probe(int argc, char * const
>> argv[])
>>         ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &new);
>>         if (!ret) {
>>                 device_remove(new);
>> -               device_unbind(new);
>>         }
>>         flash = NULL;
>>         ret = spi_flash_probe_bus_cs(bus, cs, speed, mode, &new);
>
> Tested-by: Hannes Schmelzer <oe5hpm at oevsv.at>
>

Reviewed-by: Simon Glass <sjg at chromium.org>

The original code was to handle 'sf probe' where it actually creates a
new ad-hoc device (not from the device tree). But I'm happy to drop
this.

- Simon


More information about the U-Boot mailing list