Quoting Dmitry Osipenko (2019-07-22 00:12:17)Actually added comment during function usage instead of during include as iopoll.h is removed.
22.07.2019 10:09, Dmitry Osipenko ÐÐÑÐÑ:And also add a comment to this location in the code because it's
22.07.2019 9:52, Sowjanya Komatineni ÐÐÑÐÑ:You should remove the 'iopoll.h' then, since it's not used anymore.
On 7/21/19 11:10 PM, Dmitry Osipenko wrote:Okay, thank you for the clarification.
22.07.2019 1:45, Sowjanya Komatineni ÐÐÑÐÑ:Sorry, replied incorrect. readx_poll_timeout_atomic uses ktime_get() and
On 7/21/19 2:38 PM, Dmitry Osipenko wrote:Atomic variant could be used from any context, not sure what do you
21.07.2019 22:40, Sowjanya Komatineni ÐÐÑÐÑ:during resume pllu init is needed and to use same terga210_init_pllu,
@@ -2853,9 +2859,8 @@ static int tegra210_enable_pllu(void)Why this is needed? Was there a bug?
ÂÂÂÂÂÂ reg |= PLL_ENABLE;
ÂÂÂÂÂÂ writel(reg, clk_base + PLLU_BASE);
ÂÂ -ÂÂÂ readl_relaxed_poll_timeout_atomic(clk_base + PLLU_BASE, reg,
-ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ reg & PLL_BASE_LOCK, 2, 1000);
-ÂÂÂ if (!(reg & PLL_BASE_LOCK)) {
+ÂÂÂ ret = tegra210_wait_for_mask(&pllu, PLLU_BASE, PLL_BASE_LOCK);
+ÂÂÂ if (ret) {
poll_timeout_atomic can't be used as its ony for atomic context.
So changed to use wait_for_mask which should work in both cases.
mean. The 'atomic' part only means that function won't cause scheduling
and that's it.
during resume timekeeping suspend/resume happens later than clock
suspend/resume. So using tegra210_wait_for_mask.
both timekeeping and clk-tegra210 drivers are registered as syscore but
not ordered.
[snip]
non-obvious that we can't use iopoll here.