From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754555AbdIFN35 (ORCPT ); Wed, 6 Sep 2017 09:29:57 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:38902 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754238AbdIFN3z (ORCPT ); Wed, 6 Sep 2017 09:29:55 -0400 Subject: Re: [PATCH] clk: ti: dra7xx: Reset the mcasp3_ahclkx_mux clock value To: Tero Kristo , References: <1504694199-32227-1-git-send-email-j-keerthy@ti.com> <26063901-be4f-dbe3-514b-e9a1a8ab3b10@ti.com> CC: , , , From: Keerthy Message-ID: <46878cd0-9f7c-dc34-e230-8c4a11bcb096@ti.com> Date: Wed, 6 Sep 2017 18:59:46 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <26063901-be4f-dbe3-514b-e9a1a8ab3b10@ti.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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; >> } >> >