From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Brandt Subject: RE: [PATCH] ARM: dts: r7s72100: fix sdhi clock define Date: Tue, 17 Jan 2017 04:27:27 +0000 Message-ID: References: <20170112181149.29035-1-chris.brandt@renesas.com> <20170116114023.GA3029@katana> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20170116114023.GA3029@katana> Content-Language: en-US Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Wolfram Sang , Geert Uytterhoeven Cc: Simon Horman , Magnus Damm , Rob Herring , Mark Rutland , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Linux-Renesas , Wolfram Sang List-Id: devicetree@vger.kernel.org Hi Wolfram and Geert, On Monday, January 16, 2017, Wolfram Sang: > > > and then in the code do: > > > > > > struct *cd_clk; > > > cd_clk =3D devm_clk_get(&pdev->dev, "cd"); > > > if (cd_clk) { > > > clk_prepare_enable(cd_clk); > > > } > > > > > > (this simple 1-line fix patch is getting a lot more complicated) > > > > Disclaimer: I don't know how/if the SDHI core manages clocks, and may > > interfere. Adding Wolfram. >=20 > Thanks for the heads up. >=20 > We have special callbacks for en-/disabling clocks: > sh_mobile_sdhi_clk_enable() and sh_mobile_sdhi_clk_disable(). >=20 > I think those functions should get the above if-blocks (without curly > braces) to ensure we always have consistent 00 or 11 settings. Well.... I was going to try and cheat and in the probe, enable both the core and card-detect clocks, but, not save the card-detect clock pointer. Basically, once it is turned on, it is never turned off (since it was inten= ded to be used for low power operation anyway). The reason is that would then keep me from having to modify the existing functions sh_mobile_sdhi_clk_enable/disable. Is anyone going to have an issue if I turn the card-detect clock on but nev= er turn it off???? That was the patch that I was going to test out and submit. Chris -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relmlor3.renesas.com ([210.160.252.173]:24986 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750787AbdAQE1d (ORCPT ); Mon, 16 Jan 2017 23:27:33 -0500 From: Chris Brandt To: Wolfram Sang , Geert Uytterhoeven CC: Simon Horman , Magnus Damm , Rob Herring , Mark Rutland , "devicetree@vger.kernel.org" , Linux-Renesas , Wolfram Sang Subject: RE: [PATCH] ARM: dts: r7s72100: fix sdhi clock define Date: Tue, 17 Jan 2017 04:27:27 +0000 Message-ID: References: <20170112181149.29035-1-chris.brandt@renesas.com> <20170116114023.GA3029@katana> In-Reply-To: <20170116114023.GA3029@katana> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org List-ID: Hi Wolfram and Geert, On Monday, January 16, 2017, Wolfram Sang: > > > and then in the code do: > > > > > > struct *cd_clk; > > > cd_clk =3D devm_clk_get(&pdev->dev, "cd"); > > > if (cd_clk) { > > > clk_prepare_enable(cd_clk); > > > } > > > > > > (this simple 1-line fix patch is getting a lot more complicated) > > > > Disclaimer: I don't know how/if the SDHI core manages clocks, and may > > interfere. Adding Wolfram. >=20 > Thanks for the heads up. >=20 > We have special callbacks for en-/disabling clocks: > sh_mobile_sdhi_clk_enable() and sh_mobile_sdhi_clk_disable(). >=20 > I think those functions should get the above if-blocks (without curly > braces) to ensure we always have consistent 00 or 11 settings. Well.... I was going to try and cheat and in the probe, enable both the core and card-detect clocks, but, not save the card-detect clock pointer. Basically, once it is turned on, it is never turned off (since it was inten= ded to be used for low power operation anyway). The reason is that would then keep me from having to modify the existing functions sh_mobile_sdhi_clk_enable/disable. Is anyone going to have an issue if I turn the card-detect clock on but nev= er turn it off???? That was the patch that I was going to test out and submit. Chris