clk: microchip: use readl_poll_timeout() in pbclk_set_rate().
authorPurna Chandra Mandal <purna.mandal@microchip.com>
Tue, 17 May 2016 05:05:50 +0000 (10:35 +0530)
committerStephen Boyd <sboyd@codeaurora.org>
Wed, 24 Aug 2016 23:05:23 +0000 (16:05 -0700)
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>
drivers/clk/microchip/clk-core.c

index ca85cea178398277b9173b674fcc128fd8cc43fc..c3b301463425f171acb8153559f5391ac82de94e 100644 (file)
@@ -199,9 +199,9 @@ static int pbclk_set_rate(struct clk_hw *hw, unsigned long rate,
 
        spin_unlock_irqrestore(&pb->core->reg_lock, flags);
 
-       /* wait again, for pbdivready */
-       err = readl_poll_timeout_atomic(pb->ctrl_reg, v, v & PB_DIV_READY,
-                                       1, LOCK_TIMEOUT_US);
+       /* wait again for DIV_READY */
+       err = readl_poll_timeout(pb->ctrl_reg, v, v & PB_DIV_READY,
+                                1, LOCK_TIMEOUT_US);
        if (err)
                return err;