Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: microchip: use readl_poll_timeout() in pbclk_set_rate().

pbclk_set_rate() is using readl_poll_timeout_atomic() even
though spinlock is released. Fix it by replacing with
readl_poll_timeout().

Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Purna Chandra Mandal and committed by
Stephen Boyd
12f53b24 49abf69f

+3 -3
+3 -3
drivers/clk/microchip/clk-core.c
··· 199 199 200 200 spin_unlock_irqrestore(&pb->core->reg_lock, flags); 201 201 202 - /* wait again, for pbdivready */ 203 - err = readl_poll_timeout_atomic(pb->ctrl_reg, v, v & PB_DIV_READY, 204 - 1, LOCK_TIMEOUT_US); 202 + /* wait again for DIV_READY */ 203 + err = readl_poll_timeout(pb->ctrl_reg, v, v & PB_DIV_READY, 204 + 1, LOCK_TIMEOUT_US); 205 205 if (err) 206 206 return err; 207 207