linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk/zynq/clkc: Add dedicated spinlock for the SWDT
@ 2013-06-17 22:03 Soren Brinkmann
  2013-06-24 15:58 ` Sören Brinkmann
  0 siblings, 1 reply; 3+ messages in thread
From: Soren Brinkmann @ 2013-06-17 22:03 UTC (permalink / raw)
  To: Michal Simek, Mike Turquette
  Cc: linux-kernel, linux-arm-kernel, Soren Brinkmann

The clk_mux for the system watchdog timer reused the register lock
dedicated to the Ethernet module - for no apparent reason.
Add a lock dedicated to the SWDT's clock register to remove this
wrong dependency.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
---
I don't know how this slipped in...
Anyway, the fix depends on armsoc/zynq/clk.

	Sören

 drivers/clk/zynq/clkc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/zynq/clkc.c b/drivers/clk/zynq/clkc.c
index 5c205b6..515a573 100644
--- a/drivers/clk/zynq/clkc.c
+++ b/drivers/clk/zynq/clkc.c
@@ -71,6 +71,7 @@ static DEFINE_SPINLOCK(armpll_lock);
 static DEFINE_SPINLOCK(ddrpll_lock);
 static DEFINE_SPINLOCK(iopll_lock);
 static DEFINE_SPINLOCK(armclk_lock);
+static DEFINE_SPINLOCK(swdtclk_lock);
 static DEFINE_SPINLOCK(ddrclk_lock);
 static DEFINE_SPINLOCK(dciclk_lock);
 static DEFINE_SPINLOCK(gem0clk_lock);
@@ -293,7 +294,7 @@ static void __init zynq_clk_setup(struct device_node *np)
 	}
 	clks[swdt] = clk_register_mux(NULL, clk_output_name[swdt],
 			swdt_ext_clk_mux_parents, 2, CLK_SET_RATE_PARENT,
-			SLCR_SWDT_CLK_SEL, 0, 1, 0, &gem0clk_lock);
+			SLCR_SWDT_CLK_SEL, 0, 1, 0, &swdtclk_lock);
 
 	/* DDR clocks */
 	clk = clk_register_divider(NULL, "ddr2x_div", "ddrpll", 0,
-- 
1.8.3.1


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

* Re: [PATCH] clk/zynq/clkc: Add dedicated spinlock for the SWDT
  2013-06-17 22:03 [PATCH] clk/zynq/clkc: Add dedicated spinlock for the SWDT Soren Brinkmann
@ 2013-06-24 15:58 ` Sören Brinkmann
  2013-06-26  9:57   ` Michal Simek
  0 siblings, 1 reply; 3+ messages in thread
From: Sören Brinkmann @ 2013-06-24 15:58 UTC (permalink / raw)
  To: Michal Simek, Mike Turquette; +Cc: linux-kernel, linux-arm-kernel

ping?

On Mon, Jun 17, 2013 at 03:03:46PM -0700, Soren Brinkmann wrote:
> The clk_mux for the system watchdog timer reused the register lock
> dedicated to the Ethernet module - for no apparent reason.
> Add a lock dedicated to the SWDT's clock register to remove this
> wrong dependency.
> 
> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
> ---
> I don't know how this slipped in...
> Anyway, the fix depends on armsoc/zynq/clk.
> 
> 	Sören
> 
>  drivers/clk/zynq/clkc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/zynq/clkc.c b/drivers/clk/zynq/clkc.c
> index 5c205b6..515a573 100644
> --- a/drivers/clk/zynq/clkc.c
> +++ b/drivers/clk/zynq/clkc.c
> @@ -71,6 +71,7 @@ static DEFINE_SPINLOCK(armpll_lock);
>  static DEFINE_SPINLOCK(ddrpll_lock);
>  static DEFINE_SPINLOCK(iopll_lock);
>  static DEFINE_SPINLOCK(armclk_lock);
> +static DEFINE_SPINLOCK(swdtclk_lock);
>  static DEFINE_SPINLOCK(ddrclk_lock);
>  static DEFINE_SPINLOCK(dciclk_lock);
>  static DEFINE_SPINLOCK(gem0clk_lock);
> @@ -293,7 +294,7 @@ static void __init zynq_clk_setup(struct device_node *np)
>  	}
>  	clks[swdt] = clk_register_mux(NULL, clk_output_name[swdt],
>  			swdt_ext_clk_mux_parents, 2, CLK_SET_RATE_PARENT,
> -			SLCR_SWDT_CLK_SEL, 0, 1, 0, &gem0clk_lock);
> +			SLCR_SWDT_CLK_SEL, 0, 1, 0, &swdtclk_lock);
>  
>  	/* DDR clocks */
>  	clk = clk_register_divider(NULL, "ddr2x_div", "ddrpll", 0,
> -- 
> 1.8.3.1
> 
> 


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

* Re: [PATCH] clk/zynq/clkc: Add dedicated spinlock for the SWDT
  2013-06-24 15:58 ` Sören Brinkmann
@ 2013-06-26  9:57   ` Michal Simek
  0 siblings, 0 replies; 3+ messages in thread
From: Michal Simek @ 2013-06-26  9:57 UTC (permalink / raw)
  To: Sören Brinkmann
  Cc: Michal Simek, Mike Turquette, linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1929 bytes --]

On 06/24/2013 05:58 PM, Sören Brinkmann wrote:
> ping?
> 
> On Mon, Jun 17, 2013 at 03:03:46PM -0700, Soren Brinkmann wrote:
>> The clk_mux for the system watchdog timer reused the register lock
>> dedicated to the Ethernet module - for no apparent reason.
>> Add a lock dedicated to the SWDT's clock register to remove this
>> wrong dependency.
>>
>> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
>> ---
>> I don't know how this slipped in...
>> Anyway, the fix depends on armsoc/zynq/clk.
>>
>> 	Sören
>>
>>  drivers/clk/zynq/clkc.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/zynq/clkc.c b/drivers/clk/zynq/clkc.c
>> index 5c205b6..515a573 100644
>> --- a/drivers/clk/zynq/clkc.c
>> +++ b/drivers/clk/zynq/clkc.c
>> @@ -71,6 +71,7 @@ static DEFINE_SPINLOCK(armpll_lock);
>>  static DEFINE_SPINLOCK(ddrpll_lock);
>>  static DEFINE_SPINLOCK(iopll_lock);
>>  static DEFINE_SPINLOCK(armclk_lock);
>> +static DEFINE_SPINLOCK(swdtclk_lock);
>>  static DEFINE_SPINLOCK(ddrclk_lock);
>>  static DEFINE_SPINLOCK(dciclk_lock);
>>  static DEFINE_SPINLOCK(gem0clk_lock);
>> @@ -293,7 +294,7 @@ static void __init zynq_clk_setup(struct device_node *np)
>>  	}
>>  	clks[swdt] = clk_register_mux(NULL, clk_output_name[swdt],
>>  			swdt_ext_clk_mux_parents, 2, CLK_SET_RATE_PARENT,
>> -			SLCR_SWDT_CLK_SEL, 0, 1, 0, &gem0clk_lock);
>> +			SLCR_SWDT_CLK_SEL, 0, 1, 0, &swdtclk_lock);
>>  
>>  	/* DDR clocks */
>>  	clk = clk_register_divider(NULL, "ddr2x_div", "ddrpll", 0,
>> -- 
>> 1.8.3.1

Applied.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

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

end of thread, other threads:[~2013-06-26  9:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-17 22:03 [PATCH] clk/zynq/clkc: Add dedicated spinlock for the SWDT Soren Brinkmann
2013-06-24 15:58 ` Sören Brinkmann
2013-06-26  9:57   ` Michal Simek

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).