mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Tweak a comment and a constant to restore old 30ms upper bound.
cs_readreg takes ~2us not ~1us to run.
This commit is contained in:
parent
194dffc052
commit
aa754333fc
1 changed files with 3 additions and 3 deletions
|
|
@ -183,10 +183,10 @@ wait_eeprom_ready(struct cs_softc *sc)
|
|||
* be fast. The datasheet suggests that clock out from the part
|
||||
* per word will be on the order of 25us, which is consistant with
|
||||
* the 1MHz serial clock and 16bits... We should never hit 100,
|
||||
* let alone 30,000 here. The original code did an unconditional
|
||||
* 30ms DELAY here. Bad Kharma.
|
||||
* let alone 15,000 here. The original code did an unconditional
|
||||
* 30ms DELAY here. Bad Kharma. cs_readreg takes ~2us.
|
||||
*/
|
||||
for (i = 0; i < 30000; i++) /* 30ms max */
|
||||
for (i = 0; i < 15000; i++) /* 30ms max */
|
||||
if (!(cs_readreg(sc, PP_SelfST) & SI_BUSY))
|
||||
return (0);
|
||||
return (1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue