
On 23.11.2018 11:53, Martin Fuzzey wrote:
Sometimes enumeration fails (about 1 in 50 times on my custom board).
The underlying reason is probably electrical but Linux does not have the problem.
Comparing the Linux / u-boot implementations shows that Linux retries the error case whereas u-boot aborts early.
Removing the early abort in u-boot fixes the problem.
Signed-off-by: Martin Fuzzey martin.fuzzey@flowbird.group
drivers/w1/w1-uclass.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c index 5544b19..ad86bf6 100644 --- a/drivers/w1/w1-uclass.c +++ b/drivers/w1/w1-uclass.c @@ -84,10 +84,6 @@ static int w1_enumerate(struct udevice *bus) rn |= (tmp64 << i); }
/* last device or error, aborting here */
if ((triplet_ret & 0x03) == 0x03)
last_device = true;
Hello Martin,
Your fix will basically make U-boot try again the same ID ? What happens if we keep getting errors at this triplet, we will be stuck in a loop ? When are we going to abort searching this ID if we keep getting errors ?
Thanks, Eugen
if ((triplet_ret & 0x03) != 0x03) { if (desc_bit == last_zero || last_zero < 0) { last_device = 1;