Skip to contentSkip to conversation

sf: fix sf probe

PATCH In review Wenyou Yang 5 participants 6 messages Aug 17, 2016 – Sep 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sf: fix sf probe

From: Cyrille Pitchen <[email protected]>

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.

---

 cmd/sf.c | 1 -
 1 file changed, 1 deletion(-)
cmd/sf.c +0 -1
index 286906c..65b117f 100644
@@ -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);
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 sf: fix sf probe

(Added Tom to Cc)

Quoted 9 lines · Wenyou Yang

From: Cyrille Pitchen <[email protected]>

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.

Without this patch, "sf probe" fails miserably. So its definitely a "must have" for this release.

Thanks,
Stefan

#2 lore raw

PATCH 1/1 sf: fix sf probe

Hi Tom,

Quoted 10 lines · Stefan Roese

(Added Tom to Cc)

Quoted 7 lines · Wenyou Yang

From: Cyrille Pitchen <[email protected]>

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.

Quoted 7 lines
Quoted 2 lines

Without this patch, "sf probe" fails miserably. So its definitely a "must have" for this release.

Tom, could you please include this patch in this release? Without it DM based "sf probe" just fails. At least in my tests.

Thanks,
Stefan

#3 lore raw

PATCH 1/1 sf: fix sf probe

In reply to Wenyou Yang

mfG
Schmelzer Hannes

Quoted 19 lines · Wenyou Yang

From: Cyrille Pitchen <[email protected]>

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.

---

  cmd/sf.c | 1 -
  1 file changed, 1 deletion(-)
cmd/sf.c +0 -0
index 286906c..65b117f 100644

cmd/sf.c static int do_spi_flash_probe(int argc, char * const argv[]) · line 130

Quoted 7 lines
cmd/sf.c +0 -1
@@ -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);
#4 lore raw

PATCH 1/1 sf: fix sf probe

Quoted 20 lines · Hannes Schmelzer

mfG
Schmelzer Hannes

Quoted 15 lines · Wenyou Yang

From: Cyrille Pitchen <[email protected]>

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.

---

  cmd/sf.c | 1 -
  1 file changed, 1 deletion(-)
Quoted 16 lines
Quoted 12 lines
cmd/sf.c +0 -1
index 286906c..65b117f 100644
@@ -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;
Quoted 1 line
        ret = spi_flash_probe_bus_cs(bus, cs, speed, mode, &new);

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

#5 lore raw
In reply to Wenyou Yang
Quoted 7 lines · Wenyou Yang

From: Cyrille Pitchen <[email protected]>

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.

Quoted 5 lines

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160912/997d1150/attachment.sig>