Re: [PATCH v2 1/3] can: c_can_platform: Fix c_can_hw_raminit_ti() and add timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/09/2014 09:45 AM, Roger Quadros wrote:
[...]
>>>  	/* We look only at the bits of our instance. */
>>>  	val &= mask;
>>> -	while ((readl(priv->raminit_ctrlreg) & mask) != val)
>>> +	while ((readl(priv->raminit_ctrlreg) & mask) != val) {
>>>  		udelay(1);
>>> +		timeout++;
>>> +
>>> +		if (timeout == 1000) {
>>
>> How did we come up with this number?
> 
> wild guess ;), that it should be set in a few microseconds and the delay is not too
> large.
> 
> Till I don't hear from hardware guys, it will remain a guess.
> 

in cases like these, I suggest using emperical data as point ->
example doing some 10,000 iterations of the operation and picking up
the worse case number and double it.

Either way, you need to document the same, else a few years down the
line, when that number is in question, no one will know what it's
basis was..


-- 
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux