]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sf: fix sf probe
authorCyrille Pitchen <cyrille.pitchen@atmel.com>
Wed, 17 Aug 2016 07:19:39 +0000 (15:19 +0800)
committerTom Rini <trini@konsulko.com>
Mon, 12 Sep 2016 12:44:54 +0000 (08:44 -0400)
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>
cmd/sf.c

index 286906c3a151c916d549df6938ad73a0273aec94..65b117feee22c631cd7ef0f4d42570b52c15dea5 100644 (file)
--- 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);