#19444: 1-wire functions are broken by broken  __udelay() at ramips
-------------------------------------------------+-------------------------
 Reporter:  SergeiP                              |      Owner:  developers
     Type:  defect                               |     Status:  new
 Priority:  high                                 |  Milestone:  Chaos
Component:  kernel                               |  Calmer (trunk)
 Keywords:  w1, 1-wire, udelay, calibrating      |    Version:  Trunk
  delay loop                                     |
-------------------------------------------------+-------------------------
 I found that 1-wire doesn't work at kernel 3.18 .
 Reason is broken __udelay() function.
 It is broken for error in "Calibrating delay loop".
 System think that processor is dowble faster:

 3.18.10
 [    0.000000] genirq: Flags mismatch irq 7. 00014600 (timer) vs. 00014600
 (systick)
 [    0.010000] Calibrating delay loop... 479.23 BogoMIPS (lpj=2396160)


 3.10.49
 [    0.000000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
 [    0.070000] pid_max: default: 32768 minimum: 301

 If I patch __udelay to divide delay constant by two,
 1-wire works again:

 void __udelay(unsigned long us)
 {
         unsigned int lpj = -raw_current_cpu_data.udelay_val;
 + raw_current_cpu_data.udelay_val/2; // speed error fix

 Surely, it is nor problem fix, it is problem demonstration.

 "Calibrating delay loop" shoud be fixed...

--
Ticket URL: <https://dev.openwrt.org/ticket/19444>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to