On 13 October 2014 23:42, Simon Glass <s...@chromium.org> wrote: > We want the SPI flash probing feature to operate as a standard driver. > Add a driver for the basic probing feature used by most boards. This > will be activated by device_probe() as with any other driver. > > The 'sf probe' command currently keeps track of the SPI slave that it > last used. This doesn't work with driver model, since some other driver > or system may have probed the device and have access to it too. On the > other hand, if we try to probe a device twice the second probe is a nop > with driver model. > > Fix this by searching for the matching device, removing it, and then > probing it again. This should work as expected regardless of other device > activity. > > Signed-off-by: Simon Glass <s...@chromium.org> > Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.t...@gmail.com> > --- > > Changes in v4: None > Changes in v3: > - Add a debug() in the probe method > - Make sure the old device is both removed and unbound in 'sf probe' > > Changes in v2: None > > common/cmd_sf.c | 25 ++++++++++++++++++ > drivers/mtd/spi/sf_probe.c | 66 > ++++++++++++++++++++++++++++++++++++++++++++-- > 2 files changed, 89 insertions(+), 2 deletions(-) >
Applied to u-boot-dm/master. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot