diff options
author | Douglas Anderson <dianders@chromium.org> | 2016-06-27 13:39:27 -0400 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-07-25 04:38:00 -0400 |
commit | 95cc46fee6e177668087f18549c07daec30c16c8 (patch) | |
tree | d68f2909f88b5514b228f7382d02fc48b95f2080 /drivers/phy | |
parent | 4e2ea670861f2068082da310f25815c7498a41dc (diff) |
phy: rockchip-emmc: Wait even longer for the DLL to lock
Two times out of 2000 reboots I ran into the error message
"rockchip_emmc_phy_power: dllrdy timeout". Presumably there is some
corner case where the DLL just takes a little longer to timeout. Let's
give it even more time to handle these corner cases.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/phy-rockchip-emmc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c index a2aa6aca7dec..fd57345ffed2 100644 --- a/drivers/phy/phy-rockchip-emmc.c +++ b/drivers/phy/phy-rockchip-emmc.c | |||
@@ -206,8 +206,18 @@ static int rockchip_emmc_phy_power(struct phy *phy, bool on_off) | |||
206 | * per the math: 10.2 us * (50000000 Hz / 100000 Hz) => 5.1 ms | 206 | * per the math: 10.2 us * (50000000 Hz / 100000 Hz) => 5.1 ms |
207 | * Hopefully we won't be running at 100 kHz, but we should still make | 207 | * Hopefully we won't be running at 100 kHz, but we should still make |
208 | * sure we wait long enough. | 208 | * sure we wait long enough. |
209 | * | ||
210 | * NOTE: There appear to be corner cases where the DLL seems to take | ||
211 | * extra long to lock for reasons that aren't understood. In some | ||
212 | * extreme cases we've seen it take up to over 10ms (!). We'll be | ||
213 | * generous and give it 50ms. We still busy wait here because: | ||
214 | * - In most cases it should be super fast. | ||
215 | * - This is not called lots during normal operation so it shouldn't | ||
216 | * be a power or performance problem to busy wait. We expect it | ||
217 | * only at boot / resume. In both cases, eMMC is probably on the | ||
218 | * critical path so busy waiting a little extra time should be OK. | ||
209 | */ | 219 | */ |
210 | timeout = jiffies + msecs_to_jiffies(10); | 220 | timeout = jiffies + msecs_to_jiffies(50); |
211 | do { | 221 | do { |
212 | udelay(1); | 222 | udelay(1); |
213 | 223 | ||