sf: fix sf probe
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@atmel.com> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Tested-by: Stefan Roese <sr@denx.de> Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
9dd1d0aa4e
commit
d6e9141fc2
1
cmd/sf.c
1
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);
|
ret = spi_find_bus_and_cs(bus, cs, &bus_dev, &new);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
device_remove(new);
|
device_remove(new);
|
||||||
device_unbind(new);
|
|
||||||
}
|
}
|
||||||
flash = NULL;
|
flash = NULL;
|
||||||
ret = spi_flash_probe_bus_cs(bus, cs, speed, mode, &new);
|
ret = spi_flash_probe_bus_cs(bus, cs, speed, mode, &new);
|
||||||
|
|
Loading…
Reference in New Issue