All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anson Huang <anson.huang@nxp.com>
To: Stephen Boyd <sboyd@kernel.org>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mturquette@baylibre.com" <mturquette@baylibre.com>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Jerome Forissier <jerome.forissier@linaro.org>,
	Peng Fan <peng.fan@nxp.com>, Rob Herring <robh@kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array
Date: Mon, 15 Oct 2018 09:33:35 +0000	[thread overview]
Message-ID: <DB3PR0402MB39169A3BA844F7833B62FF55F5FD0@DB3PR0402MB3916.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <153937368201.5275.2313781259297807972@swboyd.mtv.corp.google.com>

Hi, Stephen

Anson Huang
Best Regards!


> -----Original Message-----
> From: Stephen Boyd <sboyd@kernel.org>
> Sent: Saturday, October 13, 2018 3:48 AM
> 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 <anson.huang@nxp.com>; Fabio Estevam
> <fabio.estevam@nxp.com>; Jerome Forissier <jerome.forissier@linaro.org>;
> Peng Fan <peng.fan@nxp.com>; Rob Herring <robh@kernel.org>
> Cc: dl-linux-imx <linux-imx@nxp.com>
> Subject: RE: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array
> 
> Quoting Anson Huang (2018-10-08 01:34:59)
> > > Quoting Anson Huang (2018-09-03 00:20:53)
> > > > > > 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@kernel.org; s.hauer@pengutronix.de;
> > > > > > >>>>> kernel@pengutronix.de; Fabio Estevam
> > > > > > >>>>> <fabio.estevam@nxp.com>; 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 <linux-imx@nxp.com>
> > > > > > >>>>> 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 =
> <xxx>"
> > > > > > >>>> or "init-on-arrary=<xxx>"
> > > > > > >>>> 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?
> > > >
> > > > I do NOT think we should consider such case in this patch series,
> > > > whatever OP-TEE needs for its own feature, it should do necessary
> > > > operations
> > > either in its driver or somewhere else by adding new patch.
> > > >
> > >
> > > Why can't we add clks to the op-tee node in DT's /firmware container?
> > > Then any clks in there can be turned on forever and left enabled by
> > > the linux driver?
> >
> > I did NOT run op-tee with Linux-next kernel before, can you advise more?
> 
> Neither have I, so I can't advise more.
> 
> > And I think if op-tee has such requirement, can we have another patch
> > to cover it?
> 
> Yes.
> 
> 
> > I believe all other i.MX platforms also have same requirements if
> > considering op-tee support, so I think it should be another topic, what do you
> think?
> >
> 
> I'm going to drop these patches from my review queue. Please resend them
> and please include the op-tee patches too.


I do NOT know how to include the op-tee patch to meet special requirement, should
the op-tee related patch be added later when someone actually add the op-tee support for i.MX7?
It should NOT block this patch set, do you think we can add this patch set first?

Anson.




WARNING: multiple messages have this Message-ID (diff)
From: anson.huang@nxp.com (Anson Huang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array
Date: Mon, 15 Oct 2018 09:33:35 +0000	[thread overview]
Message-ID: <DB3PR0402MB39169A3BA844F7833B62FF55F5FD0@DB3PR0402MB3916.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <153937368201.5275.2313781259297807972@swboyd.mtv.corp.google.com>

Hi, Stephen

Anson Huang
Best Regards!


> -----Original Message-----
> From: Stephen Boyd <sboyd@kernel.org>
> Sent: Saturday, October 13, 2018 3:48 AM
> To: kernel at pengutronix.de; linux-arm-kernel at lists.infradead.org;
> linux-clk at vger.kernel.org; linux-kernel at vger.kernel.org;
> mturquette at baylibre.com; s.hauer at pengutronix.de; shawnguo at kernel.org;
> Anson Huang <anson.huang@nxp.com>; Fabio Estevam
> <fabio.estevam@nxp.com>; Jerome Forissier <jerome.forissier@linaro.org>;
> Peng Fan <peng.fan@nxp.com>; Rob Herring <robh@kernel.org>
> Cc: dl-linux-imx <linux-imx@nxp.com>
> Subject: RE: [PATCH 2/2] clk: imx: imx7d: remove clks_init_on array
> 
> Quoting Anson Huang (2018-10-08 01:34:59)
> > > Quoting Anson Huang (2018-09-03 00:20:53)
> > > > > > 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
> > > > > > >>>>> <fabio.estevam@nxp.com>; 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 <linux-imx@nxp.com>
> > > > > > >>>>> 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 =
> <xxx>"
> > > > > > >>>> or "init-on-arrary=<xxx>"
> > > > > > >>>> 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?
> > > >
> > > > I do NOT think we should consider such case in this patch series,
> > > > whatever OP-TEE needs for its own feature, it should do necessary
> > > > operations
> > > either in its driver or somewhere else by adding new patch.
> > > >
> > >
> > > Why can't we add clks to the op-tee node in DT's /firmware container?
> > > Then any clks in there can be turned on forever and left enabled by
> > > the linux driver?
> >
> > I did NOT run op-tee with Linux-next kernel before, can you advise more?
> 
> Neither have I, so I can't advise more.
> 
> > And I think if op-tee has such requirement, can we have another patch
> > to cover it?
> 
> Yes.
> 
> 
> > I believe all other i.MX platforms also have same requirements if
> > considering op-tee support, so I think it should be another topic, what do you
> think?
> >
> 
> I'm going to drop these patches from my review queue. Please resend them
> and please include the op-tee patches too.


I do NOT know how to include the op-tee patch to meet special requirement, should
the op-tee related patch be added later when someone actually add the op-tee support for i.MX7?
It should NOT block this patch set, do you think we can add this patch set first?

Anson.

  reply	other threads:[~2018-10-15  9:33 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08  4:39 [PATCH 1/2] clk: imx: imx7d: remove unnecessary clocks from clks_init_on array Anson Huang
2018-08-08  4:39 ` Anson Huang
2018-08-08  4:39 ` [PATCH 2/2] clk: imx: imx7d: remove " Anson Huang
2018-08-08  4:39   ` Anson Huang
2018-08-08  8:48   ` Peng Fan
2018-08-08  8:48     ` Peng Fan
2018-08-08  8:48     ` Peng Fan
2018-08-08  9:00     ` Anson Huang
2018-08-08  9:00       ` Anson Huang
2018-08-08  9:00       ` Anson Huang
2018-08-13  1:15       ` Peng Fan
2018-08-13  1:15         ` Peng Fan
2018-08-13  1:15         ` Peng Fan
2018-08-14  7:31         ` Anson Huang
2018-08-14  7:31           ` Anson Huang
2018-08-14  7:31           ` Anson Huang
2018-08-31  1:29         ` Stephen Boyd
2018-08-31  1:29           ` Stephen Boyd
2018-08-31  1:29           ` Stephen Boyd
2018-08-31  1:40           ` Anson Huang
2018-08-31  1:40             ` Anson Huang
2018-08-31  1:40             ` Anson Huang
2018-08-31  8:01           ` Jerome Forissier
2018-08-31  8:01             ` Jerome Forissier
2018-08-31  8:01             ` Jerome Forissier
2018-08-31 17:57             ` Stephen Boyd
2018-08-31 17:57               ` Stephen Boyd
2018-08-31 17:57               ` Stephen Boyd
2018-09-03  7:20               ` Anson Huang
2018-09-03  7:20                 ` Anson Huang
2018-09-03  7:20                 ` Anson Huang
2018-09-10  9:18                 ` Anson Huang
2018-09-10  9:18                   ` Anson Huang
2018-09-10  9:18                   ` Anson Huang
2018-10-08  7:40                 ` Stephen Boyd
2018-10-08  7:40                   ` Stephen Boyd
2018-10-08  8:34                   ` Anson Huang
2018-10-08  8:34                     ` Anson Huang
2018-10-12 19:48                     ` Stephen Boyd
2018-10-12 19:48                       ` Stephen Boyd
2018-10-15  9:33                       ` Anson Huang [this message]
2018-10-15  9:33                         ` Anson Huang
2018-10-15 16:45                         ` Stephen Boyd
2018-10-15 16:45                           ` Stephen Boyd
2018-10-16  4:37                           ` Anson Huang
2018-10-16  4:37                             ` Anson Huang
2018-10-16 22:24                             ` Stephen Boyd
2018-10-16 22:24                               ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB3PR0402MB39169A3BA844F7833B62FF55F5FD0@DB3PR0402MB3916.eurprd04.prod.outlook.com \
    --to=anson.huang@nxp.com \
    --cc=fabio.estevam@nxp.com \
    --cc=jerome.forissier@linaro.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=peng.fan@nxp.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.