From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA38FC433F4 for ; Fri, 31 Aug 2018 17:58:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B4D92083C for ; Fri, 31 Aug 2018 17:58:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="LsbViYDx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B4D92083C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727346AbeHaWGe (ORCPT ); Fri, 31 Aug 2018 18:06:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:35416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727069AbeHaWGe (ORCPT ); Fri, 31 Aug 2018 18:06:34 -0400 Received: from localhost (unknown [104.132.0.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D98DB2083A; Fri, 31 Aug 2018 17:57:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1535738277; bh=/0+6AE22DEv29xF/frJehmj1/j6NuHM/t4zNa+6orUA=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=LsbViYDxxwOaHll1xuvBiOyCFCFZiNABRLrFeZbqpR4LXIcEmzAMvJWQgaUU6d5X/ ukd2aD4HX4b2p6X9q6w3BFl6NXfKosLrMjfqFBKz1il8Vynu8W5D9IaAcRjtoSRUOH wlKc4M5SdsedLnmjwCM8oz/Dqmd3B+UN4o0gRBuM= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: "kernel@pengutronix.de" , "linux-arm-kernel@lists.infradead.org" , "linux-clk@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "mturquette@baylibre.com" , "s.hauer@pengutronix.de" , "shawnguo@kernel.org" , Anson Huang , Fabio Estevam , Jerome Forissier , Peng Fan , Rob Herring From: Stephen Boyd In-Reply-To: Cc: dl-linux-imx References: <1533703167-26583-1-git-send-email-Anson.Huang@nxp.com> <1533703167-26583-2-git-send-email-Anson.Huang@nxp.com> <153567894721.93865.4092113232222931488@swboyd.mtv.corp.google.com> Message-ID: <153573827629.93865.6200966443862432044@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array Date: Fri, 31 Aug 2018 10:57:56 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Jerome Forissier (2018-08-31 01:01:44) > = > = > On 08/31/2018 03:29 AM, Stephen Boyd wrote: > > Quoting Peng Fan (2018-08-12 18:15:41) > >> Hi Anson, > >> > >>>>> -----Original Message----- > >>>>> From: Anson Huang > >>>>> Sent: 2018=E5=B9=B48=E6=9C=888=E6=97=A5 12:39 > >>>>> To: shawnguo@kernel.org; s.hauer@pengutronix.de; > >>>>> kernel@pengutronix.de; Fabio Estevam ; > >>>>> mturquette@baylibre.com; sboyd@kernel.org; > >>>>> linux-arm-kernel@lists.infradead.org; > >>>>> linux-clk@vger.kernel.org; linux-kernel@vger.kernel.org > >>>>> Cc: dl-linux-imx > >>>>> Subject: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array > >>>>> > >>>>> Clock framework will enable those clocks registered with > >>>>> CLK_IS_CRITICAL flag, so no need to have clks_init_on array during > >>>>> clock > >>>> initialization now. > >>>> > >>>> Will it be more flexible to parse dts saying "critical-clocks =3D " > >>>> or "init-on-arrary=3D" > >>>> and enable those clocks? > >>> > >>> Parsing the clocks arrays from dtb is another way of enabling critica= l clocks, but > >>> for current i.MX6/7 platforms, we implement it in same way as most of= other > >>> SoCs, currently I did NOT see any necessity of putting them in dtb, j= ust adding > >>> flag during clock registering is more simple, if there is any special= requirement > >>> for different clocks set to be enabled, then we can add support to en= able the > >>> method of parsing critical-clocks from dtb. Just my two cents. > >> > >> Thinking about OP-TEE want to use one device, but it's clocks are regi= stered > >> by Linux, because there is no module in Linux side use it, it will shu= tdown the clock, > >> which cause OP-TEE could not access the device. > >> > >> Then people have to modify clk code to add CLK_IS_CRITICAL flag to mak= e sure > >> the clocks are not shutdown by Linux. > >> > >> However adding a new property in clk node and let driver code parse th= e dts, > >> there is no need to modify clk driver code when OP-TEE needs another d= evice clock. > >> > > = > > If OP-TEE needs linux to keep things on then why can't the OP-TEE driver > > in Linux probe, acquire clocks, and keep the clks enabled forever? > = > Sounds reasonable, but how could this be done without introducing > platform-specific stuff in the OP-TEE driver? > = Why is that a goal? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 To: "kernel@pengutronix.de" , "linux-arm-kernel@lists.infradead.org" , "linux-clk@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "mturquette@baylibre.com" , "s.hauer@pengutronix.de" , "shawnguo@kernel.org" , Anson Huang , Fabio Estevam , Jerome Forissier , Peng Fan , Rob Herring From: Stephen Boyd In-Reply-To: Cc: dl-linux-imx References: <1533703167-26583-1-git-send-email-Anson.Huang@nxp.com> <1533703167-26583-2-git-send-email-Anson.Huang@nxp.com> <153567894721.93865.4092113232222931488@swboyd.mtv.corp.google.com> Message-ID: <153573827629.93865.6200966443862432044@swboyd.mtv.corp.google.com> Subject: Re: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array Date: Fri, 31 Aug 2018 10:57:56 -0700 List-ID: Quoting Jerome Forissier (2018-08-31 01:01:44) > = > = > On 08/31/2018 03:29 AM, Stephen Boyd wrote: > > Quoting Peng Fan (2018-08-12 18:15:41) > >> Hi Anson, > >> > >>>>> -----Original Message----- > >>>>> From: Anson Huang > >>>>> Sent: 2018=E5=B9=B48=E6=9C=888=E6=97=A5 12:39 > >>>>> To: shawnguo@kernel.org; s.hauer@pengutronix.de; > >>>>> kernel@pengutronix.de; Fabio Estevam ; > >>>>> mturquette@baylibre.com; sboyd@kernel.org; > >>>>> linux-arm-kernel@lists.infradead.org; > >>>>> linux-clk@vger.kernel.org; linux-kernel@vger.kernel.org > >>>>> Cc: dl-linux-imx > >>>>> Subject: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array > >>>>> > >>>>> Clock framework will enable those clocks registered with > >>>>> CLK_IS_CRITICAL flag, so no need to have clks_init_on array during > >>>>> clock > >>>> initialization now. > >>>> > >>>> Will it be more flexible to parse dts saying "critical-clocks =3D " > >>>> or "init-on-arrary=3D" > >>>> and enable those clocks? > >>> > >>> Parsing the clocks arrays from dtb is another way of enabling critica= l clocks, but > >>> for current i.MX6/7 platforms, we implement it in same way as most of= other > >>> SoCs, currently I did NOT see any necessity of putting them in dtb, j= ust adding > >>> flag during clock registering is more simple, if there is any special= requirement > >>> for different clocks set to be enabled, then we can add support to en= able the > >>> method of parsing critical-clocks from dtb. Just my two cents. > >> > >> Thinking about OP-TEE want to use one device, but it's clocks are regi= stered > >> by Linux, because there is no module in Linux side use it, it will shu= tdown the clock, > >> which cause OP-TEE could not access the device. > >> > >> Then people have to modify clk code to add CLK_IS_CRITICAL flag to mak= e sure > >> the clocks are not shutdown by Linux. > >> > >> However adding a new property in clk node and let driver code parse th= e dts, > >> there is no need to modify clk driver code when OP-TEE needs another d= evice clock. > >> > > = > > If OP-TEE needs linux to keep things on then why can't the OP-TEE driver > > in Linux probe, acquire clocks, and keep the clks enabled forever? > = > Sounds reasonable, but how could this be done without introducing > platform-specific stuff in the OP-TEE driver? > = Why is that a goal? From mboxrd@z Thu Jan 1 00:00:00 1970 From: sboyd@kernel.org (Stephen Boyd) Date: Fri, 31 Aug 2018 10:57:56 -0700 Subject: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array In-Reply-To: References: <1533703167-26583-1-git-send-email-Anson.Huang@nxp.com> <1533703167-26583-2-git-send-email-Anson.Huang@nxp.com> <153567894721.93865.4092113232222931488@swboyd.mtv.corp.google.com> Message-ID: <153573827629.93865.6200966443862432044@swboyd.mtv.corp.google.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Quoting Jerome Forissier (2018-08-31 01:01:44) > > > On 08/31/2018 03:29 AM, Stephen Boyd wrote: > > Quoting Peng Fan (2018-08-12 18:15:41) > >> Hi Anson, > >> > >>>>> -----Original Message----- > >>>>> From: Anson Huang > >>>>> Sent: 2018?8?8? 12:39 > >>>>> To: shawnguo at kernel.org; s.hauer at pengutronix.de; > >>>>> kernel at pengutronix.de; Fabio Estevam ; > >>>>> mturquette at baylibre.com; sboyd at kernel.org; > >>>>> linux-arm-kernel at lists.infradead.org; > >>>>> linux-clk at vger.kernel.org; linux-kernel at vger.kernel.org > >>>>> Cc: dl-linux-imx > >>>>> Subject: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array > >>>>> > >>>>> Clock framework will enable those clocks registered with > >>>>> CLK_IS_CRITICAL flag, so no need to have clks_init_on array during > >>>>> clock > >>>> initialization now. > >>>> > >>>> Will it be more flexible to parse dts saying "critical-clocks = " > >>>> or "init-on-arrary=" > >>>> and enable those clocks? > >>> > >>> Parsing the clocks arrays from dtb is another way of enabling critical clocks, but > >>> for current i.MX6/7 platforms, we implement it in same way as most of other > >>> SoCs, currently I did NOT see any necessity of putting them in dtb, just adding > >>> flag during clock registering is more simple, if there is any special requirement > >>> for different clocks set to be enabled, then we can add support to enable the > >>> method of parsing critical-clocks from dtb. Just my two cents. > >> > >> Thinking about OP-TEE want to use one device, but it's clocks are registered > >> by Linux, because there is no module in Linux side use it, it will shutdown the clock, > >> which cause OP-TEE could not access the device. > >> > >> Then people have to modify clk code to add CLK_IS_CRITICAL flag to make sure > >> the clocks are not shutdown by Linux. > >> > >> However adding a new property in clk node and let driver code parse the dts, > >> there is no need to modify clk driver code when OP-TEE needs another device clock. > >> > > > > If OP-TEE needs linux to keep things on then why can't the OP-TEE driver > > in Linux probe, acquire clocks, and keep the clks enabled forever? > > Sounds reasonable, but how could this be done without introducing > platform-specific stuff in the OP-TEE driver? > Why is that a goal?