]> git.baikalelectronics.ru Git - kernel.git/commit
clk: ti: clkctrl: Fix failed to enable error with double udelay timeout
authorTony Lindgren <tony@atomide.com>
Mon, 30 Sep 2019 15:40:01 +0000 (08:40 -0700)
committerStephen Boyd <sboyd@kernel.org>
Mon, 4 Nov 2019 17:56:53 +0000 (09:56 -0800)
commit5d1bfbd9f53e29762648a1a8d60539b77f282978
treeb752211c5877f2897cdcf9a535b22afc45657d12
parentc58595316cafec66a71bd9d4fbe28d9c24afa13e
clk: ti: clkctrl: Fix failed to enable error with double udelay timeout

Commit 16e68c8389db ("clk: ti: clkctrl: use fallback udelay approach if
timekeeping is suspended") added handling for cases when timekeeping is
suspended. But looks like we can still get occasional "failed to enable"
errors on the PM runtime resume path with udelay() returning faster than
expected.

With ti-sysc interconnect target module driver this leads into device
failure with PM runtime failing with "failed to enable" clkctrl error.

Let's fix the issue with a delay of two times the desired delay as in
often done for udelay() to account for the inaccuracy.

Fixes: 16e68c8389db ("clk: ti: clkctrl: use fallback udelay approach if timekeeping is suspended")
Cc: Keerthy <j-keerthy@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lkml.kernel.org/r/20190930154001.46581-1-tony@atomide.com
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/ti/clkctrl.c