Extended testing has shown that the imx ahci driver sometimes requires
more than the 100 attempts currently alotted in the driver to perform a
successful temperature reading when running at minimum (throttled) CPU
frequency.
Debugging suggests that the read cycle can take 160 attempts (which given
that the driver averages 80 readings from the ADC equates to one failure
on each read).
Increase the attempt limit to 200 in order to greatly reduce the
likelihood of the driver failing to perform a temperature reading,
especially at low CPU frequency.
Signed-off-by: Egor Starkov <egor.starkov@ge.com>
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Tejun Heo <tj@kernel.org>
{
u16 adc_out_reg, read_sum;
u32 index, read_attempt;
- const u32 attempt_limit = 100;
+ const u32 attempt_limit = 200;
imx_phy_reg_addressing(SATA_PHY_CR_CLOCK_RTUNE_CTL, mmio);
imx_phy_reg_write(rtune_ctl_reg, mmio);