All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: ti: dra7xx: Reset the mcasp3_ahclkx_mux clock value
@ 2017-09-06 10:36 ` Keerthy
  0 siblings, 0 replies; 7+ messages in thread
From: Keerthy @ 2017-09-06 10:36 UTC (permalink / raw)
  To: sboyd, t-kristo; +Cc: linux-kernel, linux-clk, linux-omap, tony, j-keerthy

Reset the mcasp3_ahclkx_mux to abe_24m_fclk. This is needed
in case of kexec where the reset values might be wiped off.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/clk/ti/clk-7xx.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/ti/clk-7xx.c b/drivers/clk/ti/clk-7xx.c
index 9fd6043..2c3a36c 100644
--- a/drivers/clk/ti/clk-7xx.c
+++ b/drivers/clk/ti/clk-7xx.c
@@ -312,7 +312,7 @@
 int __init dra7xx_dt_clk_init(void)
 {
 	int rc;
-	struct clk *dpll_ck, *hdcp_ck;
+	struct clk *dpll_ck, *hdcp_ck, *mcasp3_ahclkx_ck, *abe_ck;
 
 	ti_dt_clocks_register(dra7xx_clks);
 
@@ -338,5 +338,12 @@ int __init dra7xx_dt_clk_init(void)
 	if (rc)
 		pr_err("%s: failed to set dss_deshdcp_clk\n", __func__);
 
+	mcasp3_ahclkx_ck = clk_get_sys(NULL, "mcasp3_ahclkx_mux");
+	abe_ck = clk_get_sys(NULL, "abe_24m_fclk");
+	rc = clk_set_parent(mcasp3_ahclkx_ck, abe_ck);
+	if (rc)
+		pr_err("%s: failed to set parent for mcasp3_ahclkx_mux\n",
+		       __func__);
+
 	return rc;
 }
-- 
1.9.1

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

* [PATCH] clk: ti: dra7xx: Reset the mcasp3_ahclkx_mux clock value
@ 2017-09-06 10:36 ` Keerthy
  0 siblings, 0 replies; 7+ messages in thread
From: Keerthy @ 2017-09-06 10:36 UTC (permalink / raw)
  To: sboyd, t-kristo; +Cc: linux-kernel, linux-clk, linux-omap, tony, j-keerthy

Reset the mcasp3_ahclkx_mux to abe_24m_fclk. This is needed
in case of kexec where the reset values might be wiped off.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/clk/ti/clk-7xx.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/ti/clk-7xx.c b/drivers/clk/ti/clk-7xx.c
index 9fd6043..2c3a36c 100644
--- a/drivers/clk/ti/clk-7xx.c
+++ b/drivers/clk/ti/clk-7xx.c
@@ -312,7 +312,7 @@
 int __init dra7xx_dt_clk_init(void)
 {
 	int rc;
-	struct clk *dpll_ck, *hdcp_ck;
+	struct clk *dpll_ck, *hdcp_ck, *mcasp3_ahclkx_ck, *abe_ck;
 
 	ti_dt_clocks_register(dra7xx_clks);
 
@@ -338,5 +338,12 @@ int __init dra7xx_dt_clk_init(void)
 	if (rc)
 		pr_err("%s: failed to set dss_deshdcp_clk\n", __func__);
 
+	mcasp3_ahclkx_ck = clk_get_sys(NULL, "mcasp3_ahclkx_mux");
+	abe_ck = clk_get_sys(NULL, "abe_24m_fclk");
+	rc = clk_set_parent(mcasp3_ahclkx_ck, abe_ck);
+	if (rc)
+		pr_err("%s: failed to set parent for mcasp3_ahclkx_mux\n",
+		       __func__);
+
 	return rc;
 }
-- 
1.9.1

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

* Re: [PATCH] clk: ti: dra7xx: Reset the mcasp3_ahclkx_mux clock value
  2017-09-06 10:36 ` Keerthy
  (?)
@ 2017-09-06 11:42   ` Tero Kristo
  -1 siblings, 0 replies; 7+ messages in thread
From: Tero Kristo @ 2017-09-06 11:42 UTC (permalink / raw)
  To: Keerthy, sboyd; +Cc: linux-kernel, linux-clk, linux-omap, tony


Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

On 06/09/17 13:36, Keerthy wrote:
> Reset the mcasp3_ahclkx_mux to abe_24m_fclk. This is needed
> in case of kexec where the reset values might be wiped off.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Why not do this in DT with the assigned-clock-xyz properties available?

-Tero

> ---
>   drivers/clk/ti/clk-7xx.c | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/ti/clk-7xx.c b/drivers/clk/ti/clk-7xx.c
> index 9fd6043..2c3a36c 100644
> --- a/drivers/clk/ti/clk-7xx.c
> +++ b/drivers/clk/ti/clk-7xx.c
> @@ -312,7 +312,7 @@
>   int __init dra7xx_dt_clk_init(void)
>   {
>   	int rc;
> -	struct clk *dpll_ck, *hdcp_ck;
> +	struct clk *dpll_ck, *hdcp_ck, *mcasp3_ahclkx_ck, *abe_ck;
>   
>   	ti_dt_clocks_register(dra7xx_clks);
>   
> @@ -338,5 +338,12 @@ int __init dra7xx_dt_clk_init(void)
>   	if (rc)
>   		pr_err("%s: failed to set dss_deshdcp_clk\n", __func__);
>   
> +	mcasp3_ahclkx_ck = clk_get_sys(NULL, "mcasp3_ahclkx_mux");
> +	abe_ck = clk_get_sys(NULL, "abe_24m_fclk");
> +	rc = clk_set_parent(mcasp3_ahclkx_ck, abe_ck);
> +	if (rc)
> +		pr_err("%s: failed to set parent for mcasp3_ahclkx_mux\n",
> +		       __func__);
> +
>   	return rc;
>   }
> 

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

* Re: [PATCH] clk: ti: dra7xx: Reset the mcasp3_ahclkx_mux clock value
@ 2017-09-06 11:42   ` Tero Kristo
  0 siblings, 0 replies; 7+ messages in thread
From: Tero Kristo @ 2017-09-06 11:42 UTC (permalink / raw)
  To: Keerthy, sboyd; +Cc: linux-kernel, linux-clk, linux-omap, tony

=EF=BB=BF
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Bu=
siness ID: 0615521-4. Kotipaikka/Domicile: Helsinki

On 06/09/17 13:36, Keerthy wrote:
> Reset the mcasp3_ahclkx_mux to abe_24m_fclk. This is needed
> in case of kexec where the reset values might be wiped off.
>=20
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Why not do this in DT with the assigned-clock-xyz properties available?

-Tero

> ---
>   drivers/clk/ti/clk-7xx.c | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
>=20
> diff --git a/drivers/clk/ti/clk-7xx.c b/drivers/clk/ti/clk-7xx.c
> index 9fd6043..2c3a36c 100644
> --- a/drivers/clk/ti/clk-7xx.c
> +++ b/drivers/clk/ti/clk-7xx.c
> @@ -312,7 +312,7 @@
>   int __init dra7xx_dt_clk_init(void)
>   {
>   	int rc;
> -	struct clk *dpll_ck, *hdcp_ck;
> +	struct clk *dpll_ck, *hdcp_ck, *mcasp3_ahclkx_ck, *abe_ck;
>  =20
>   	ti_dt_clocks_register(dra7xx_clks);
>  =20
> @@ -338,5 +338,12 @@ int __init dra7xx_dt_clk_init(void)
>   	if (rc)
>   		pr_err("%s: failed to set dss_deshdcp_clk\n", __func__);
>  =20
> +	mcasp3_ahclkx_ck =3D clk_get_sys(NULL, "mcasp3_ahclkx_mux");
> +	abe_ck =3D clk_get_sys(NULL, "abe_24m_fclk");
> +	rc =3D clk_set_parent(mcasp3_ahclkx_ck, abe_ck);
> +	if (rc)
> +		pr_err("%s: failed to set parent for mcasp3_ahclkx_mux\n",
> +		       __func__);
> +
>   	return rc;
>   }
>=20



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

* Re: [PATCH] clk: ti: dra7xx: Reset the mcasp3_ahclkx_mux clock value
@ 2017-09-06 11:42   ` Tero Kristo
  0 siblings, 0 replies; 7+ messages in thread
From: Tero Kristo @ 2017-09-06 11:42 UTC (permalink / raw)
  To: Keerthy, sboyd; +Cc: linux-kernel, linux-clk, linux-omap, tony


Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

On 06/09/17 13:36, Keerthy wrote:
> Reset the mcasp3_ahclkx_mux to abe_24m_fclk. This is needed
> in case of kexec where the reset values might be wiped off.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Why not do this in DT with the assigned-clock-xyz properties available?

-Tero

> ---
>   drivers/clk/ti/clk-7xx.c | 9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/ti/clk-7xx.c b/drivers/clk/ti/clk-7xx.c
> index 9fd6043..2c3a36c 100644
> --- a/drivers/clk/ti/clk-7xx.c
> +++ b/drivers/clk/ti/clk-7xx.c
> @@ -312,7 +312,7 @@
>   int __init dra7xx_dt_clk_init(void)
>   {
>   	int rc;
> -	struct clk *dpll_ck, *hdcp_ck;
> +	struct clk *dpll_ck, *hdcp_ck, *mcasp3_ahclkx_ck, *abe_ck;
>   
>   	ti_dt_clocks_register(dra7xx_clks);
>   
> @@ -338,5 +338,12 @@ int __init dra7xx_dt_clk_init(void)
>   	if (rc)
>   		pr_err("%s: failed to set dss_deshdcp_clk\n", __func__);
>   
> +	mcasp3_ahclkx_ck = clk_get_sys(NULL, "mcasp3_ahclkx_mux");
> +	abe_ck = clk_get_sys(NULL, "abe_24m_fclk");
> +	rc = clk_set_parent(mcasp3_ahclkx_ck, abe_ck);
> +	if (rc)
> +		pr_err("%s: failed to set parent for mcasp3_ahclkx_mux\n",
> +		       __func__);
> +
>   	return rc;
>   }
> 

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

* Re: [PATCH] clk: ti: dra7xx: Reset the mcasp3_ahclkx_mux clock value
  2017-09-06 11:42   ` Tero Kristo
@ 2017-09-06 13:29     ` Keerthy
  -1 siblings, 0 replies; 7+ messages in thread
From: Keerthy @ 2017-09-06 13:29 UTC (permalink / raw)
  To: Tero Kristo, sboyd; +Cc: linux-kernel, linux-clk, linux-omap, tony



On Wednesday 06 September 2017 05:12 PM, Tero Kristo wrote:
> On 06/09/17 13:36, Keerthy wrote:
>> Reset the mcasp3_ahclkx_mux to abe_24m_fclk. This is needed
>> in case of kexec where the reset values might be wiped off.
>>
>> Signed-off-by: Keerthy <j-keerthy@ti.com>
> 
> Why not do this in DT with the assigned-clock-xyz properties available?

Works for me. I will send a v2 with your suggested-by.

Thanks,
Keerthy

> 
> -Tero
> 
>> ---
>>   drivers/clk/ti/clk-7xx.c | 9 ++++++++-
>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/ti/clk-7xx.c b/drivers/clk/ti/clk-7xx.c
>> index 9fd6043..2c3a36c 100644
>> --- a/drivers/clk/ti/clk-7xx.c
>> +++ b/drivers/clk/ti/clk-7xx.c
>> @@ -312,7 +312,7 @@
>>   int __init dra7xx_dt_clk_init(void)
>>   {
>>       int rc;
>> -    struct clk *dpll_ck, *hdcp_ck;
>> +    struct clk *dpll_ck, *hdcp_ck, *mcasp3_ahclkx_ck, *abe_ck;
>>         ti_dt_clocks_register(dra7xx_clks);
>>   @@ -338,5 +338,12 @@ int __init dra7xx_dt_clk_init(void)
>>       if (rc)
>>           pr_err("%s: failed to set dss_deshdcp_clk\n", __func__);
>>   +    mcasp3_ahclkx_ck = clk_get_sys(NULL, "mcasp3_ahclkx_mux");
>> +    abe_ck = clk_get_sys(NULL, "abe_24m_fclk");
>> +    rc = clk_set_parent(mcasp3_ahclkx_ck, abe_ck);
>> +    if (rc)
>> +        pr_err("%s: failed to set parent for mcasp3_ahclkx_mux\n",
>> +               __func__);
>> +
>>       return rc;
>>   }
>>
> 

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

* Re: [PATCH] clk: ti: dra7xx: Reset the mcasp3_ahclkx_mux clock value
@ 2017-09-06 13:29     ` Keerthy
  0 siblings, 0 replies; 7+ messages in thread
From: Keerthy @ 2017-09-06 13:29 UTC (permalink / raw)
  To: Tero Kristo, sboyd; +Cc: linux-kernel, linux-clk, linux-omap, tony



On Wednesday 06 September 2017 05:12 PM, Tero Kristo wrote:
> On 06/09/17 13:36, Keerthy wrote:
>> Reset the mcasp3_ahclkx_mux to abe_24m_fclk. This is needed
>> in case of kexec where the reset values might be wiped off.
>>
>> Signed-off-by: Keerthy <j-keerthy@ti.com>
> 
> Why not do this in DT with the assigned-clock-xyz properties available?

Works for me. I will send a v2 with your suggested-by.

Thanks,
Keerthy

> 
> -Tero
> 
>> ---
>>   drivers/clk/ti/clk-7xx.c | 9 ++++++++-
>>   1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/clk/ti/clk-7xx.c b/drivers/clk/ti/clk-7xx.c
>> index 9fd6043..2c3a36c 100644
>> --- a/drivers/clk/ti/clk-7xx.c
>> +++ b/drivers/clk/ti/clk-7xx.c
>> @@ -312,7 +312,7 @@
>>   int __init dra7xx_dt_clk_init(void)
>>   {
>>       int rc;
>> -    struct clk *dpll_ck, *hdcp_ck;
>> +    struct clk *dpll_ck, *hdcp_ck, *mcasp3_ahclkx_ck, *abe_ck;
>>         ti_dt_clocks_register(dra7xx_clks);
>>   @@ -338,5 +338,12 @@ int __init dra7xx_dt_clk_init(void)
>>       if (rc)
>>           pr_err("%s: failed to set dss_deshdcp_clk\n", __func__);
>>   +    mcasp3_ahclkx_ck = clk_get_sys(NULL, "mcasp3_ahclkx_mux");
>> +    abe_ck = clk_get_sys(NULL, "abe_24m_fclk");
>> +    rc = clk_set_parent(mcasp3_ahclkx_ck, abe_ck);
>> +    if (rc)
>> +        pr_err("%s: failed to set parent for mcasp3_ahclkx_mux\n",
>> +               __func__);
>> +
>>       return rc;
>>   }
>>
> 

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

end of thread, other threads:[~2017-09-06 13:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06 10:36 [PATCH] clk: ti: dra7xx: Reset the mcasp3_ahclkx_mux clock value Keerthy
2017-09-06 10:36 ` Keerthy
2017-09-06 11:42 ` Tero Kristo
2017-09-06 11:42   ` Tero Kristo
2017-09-06 11:42   ` Tero Kristo
2017-09-06 13:29   ` Keerthy
2017-09-06 13:29     ` Keerthy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.