On Wed, 2014-05-14 at 00:53 -0400, David Miller wrote:
From: Michael Chan <mchan@broadcom.com>
Date: Mon, 12 May 2014 10:48:30 -0700
quoted
We still need to time these commands. Using cond_resched(), the timing
becomes unpredictable. Perhaps we can reduce the NVRAM_CMD_TIMEOUT
counter by a factor of 100 and use msleep(1) instead of udelay(10).
That should work.
It actually won't work very well. It typically takes 10 to 20 us to
read one 32-bit value. Using msleep(1), it will take 100 times longer
than it should. When dumping the entire NVRAM, it will visibly take a
very long time.
We are working on a patch to make sure that the clock is not running
slow when reading the NVRAM. I think we can also reduce
NVRAM_CMD_TIMEOUT to something more reasonable.