linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/11] clk: microchip: use readl_poll_timeout() in pbclk_set_rate().
@ 2016-05-17  5:05 Purna Chandra Mandal
  2016-05-17  5:05 ` [PATCH 02/11] clk: microchip: Initialize SOSC clock rate for PIC32MZDA Purna Chandra Mandal
  2016-08-24 23:05 ` [PATCH 01/11] clk: microchip: use readl_poll_timeout() in pbclk_set_rate() Stephen Boyd
  0 siblings, 2 replies; 4+ messages in thread
From: Purna Chandra Mandal @ 2016-05-17  5:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mips, Ralf Baechle, Purna Chandra Mandal, Michael Turquette,
	Stephen Boyd, linux-clk

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>
---
Note: Please pull this complete series through the MIPS tree.

---

 drivers/clk/microchip/clk-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/microchip/clk-core.c b/drivers/clk/microchip/clk-core.c
index ca85cea..c3b3014 100644
--- a/drivers/clk/microchip/clk-core.c
+++ b/drivers/clk/microchip/clk-core.c
@@ -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;
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 02/11] clk: microchip: Initialize SOSC clock rate for PIC32MZDA.
  2016-05-17  5:05 [PATCH 01/11] clk: microchip: use readl_poll_timeout() in pbclk_set_rate() Purna Chandra Mandal
@ 2016-05-17  5:05 ` Purna Chandra Mandal
  2016-08-24 23:05   ` Stephen Boyd
  2016-08-24 23:05 ` [PATCH 01/11] clk: microchip: use readl_poll_timeout() in pbclk_set_rate() Stephen Boyd
  1 sibling, 1 reply; 4+ messages in thread
From: Purna Chandra Mandal @ 2016-05-17  5:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mips, Ralf Baechle, Purna Chandra Mandal, Michael Turquette,
	Stephen Boyd, linux-clk

Optional SOSC is an external fixed clock running at 32768HZ.
So Initialize SOSC rate as per PIC32MZDA datasheet.

Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>

---
Note: Please pull this complete series through the MIPS tree.

---

 drivers/clk/microchip/clk-pic32mzda.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/microchip/clk-pic32mzda.c b/drivers/clk/microchip/clk-pic32mzda.c
index 020a29a..210694b 100644
--- a/drivers/clk/microchip/clk-pic32mzda.c
+++ b/drivers/clk/microchip/clk-pic32mzda.c
@@ -118,6 +118,7 @@ static const struct pic32_sec_osc_data sosc_clk = {
 	.status_reg = 0x1d0,
 	.enable_mask = BIT(1),
 	.status_mask = BIT(4),
+	.fixed_rate = 32768,
 	.init_data = {
 		.name = "sosc_clk",
 		.parent_names = NULL,
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 01/11] clk: microchip: use readl_poll_timeout() in pbclk_set_rate().
  2016-05-17  5:05 [PATCH 01/11] clk: microchip: use readl_poll_timeout() in pbclk_set_rate() Purna Chandra Mandal
  2016-05-17  5:05 ` [PATCH 02/11] clk: microchip: Initialize SOSC clock rate for PIC32MZDA Purna Chandra Mandal
@ 2016-08-24 23:05 ` Stephen Boyd
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2016-08-24 23:05 UTC (permalink / raw)
  To: Purna Chandra Mandal
  Cc: linux-kernel, linux-mips, Ralf Baechle, Michael Turquette,
	linux-clk

On 05/17, Purna Chandra Mandal wrote:
> 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>
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 02/11] clk: microchip: Initialize SOSC clock rate for PIC32MZDA.
  2016-05-17  5:05 ` [PATCH 02/11] clk: microchip: Initialize SOSC clock rate for PIC32MZDA Purna Chandra Mandal
@ 2016-08-24 23:05   ` Stephen Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2016-08-24 23:05 UTC (permalink / raw)
  To: Purna Chandra Mandal
  Cc: linux-kernel, linux-mips, Ralf Baechle, Michael Turquette,
	linux-clk

On 05/17, Purna Chandra Mandal wrote:
> Optional SOSC is an external fixed clock running at 32768HZ.
> So Initialize SOSC rate as per PIC32MZDA datasheet.
> 
> Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com>
> 
> ---

Applied to clk-next

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-24 23:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17  5:05 [PATCH 01/11] clk: microchip: use readl_poll_timeout() in pbclk_set_rate() Purna Chandra Mandal
2016-05-17  5:05 ` [PATCH 02/11] clk: microchip: Initialize SOSC clock rate for PIC32MZDA Purna Chandra Mandal
2016-08-24 23:05   ` Stephen Boyd
2016-08-24 23:05 ` [PATCH 01/11] clk: microchip: use readl_poll_timeout() in pbclk_set_rate() Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).