From: Abel Vesa <abel.vesa@linaro.org>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: abelvesa@kernel.org, mturquette@baylibre.com, sboyd@kernel.org,
shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, linux-imx@nxp.com,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Peng Fan <peng.fan@nxp.com>, Ye Li <ye.li@nxp.com>
Subject: Re: [PATCH V3 5/7] clk: imx: imx93: add mcore_booted module paratemter
Date: Sun, 9 Apr 2023 16:46:57 +0300 [thread overview]
Message-ID: <ZDLB0SMCyYFFovI/@linaro.org> (raw)
In-Reply-To: <20230403095300.3386988-6-peng.fan@oss.nxp.com>
On 23-04-03 17:52:58, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add mcore_booted boot parameter which could simplify AMP clock
> management. To i.MX93, there is CCM(clock control Module) to generate
> clock root clock, anatop(analog PLL module) to generate PLL, and LPCG
> (clock gating) to gate clocks to peripherals. As below:
> anatop->ccm->lpcg->peripheral
>
> Linux handles the clock management and the auxiliary core is under
> control of Linux. Although there is per hardware domain control for LPCG
> and CCM, auxiliary core normally only use LPCG hardware domain control
> to avoid linux gate off the clk to peripherals and leave CCM ana anatop
> to Linux.
>
> Reviewed-by: Ye Li <ye.li@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
> ---
> drivers/clk/imx/clk-composite-93.c | 8 +++++++-
> drivers/clk/imx/clk-imx93.c | 2 ++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/imx/clk-composite-93.c b/drivers/clk/imx/clk-composite-93.c
> index 74a66b0203e4..81164bdcd6cc 100644
> --- a/drivers/clk/imx/clk-composite-93.c
> +++ b/drivers/clk/imx/clk-composite-93.c
> @@ -222,7 +222,7 @@ struct clk_hw *imx93_clk_composite_flags(const char *name, const char * const *p
> hw = clk_hw_register_composite(NULL, name, parent_names, num_parents,
> mux_hw, &clk_mux_ro_ops, div_hw,
> &clk_divider_ro_ops, NULL, NULL, flags);
> - } else {
> + } else if (!mcore_booted) {
> gate = kzalloc(sizeof(*gate), GFP_KERNEL);
> if (!gate)
> goto fail;
> @@ -238,6 +238,12 @@ struct clk_hw *imx93_clk_composite_flags(const char *name, const char * const *p
> &imx93_clk_composite_divider_ops, gate_hw,
> &imx93_clk_composite_gate_ops,
> flags | CLK_SET_RATE_NO_REPARENT);
> + } else {
> + hw = clk_hw_register_composite(NULL, name, parent_names, num_parents,
> + mux_hw, &imx93_clk_composite_mux_ops, div_hw,
> + &imx93_clk_composite_divider_ops, NULL,
> + &imx93_clk_composite_gate_ops,
> + flags | CLK_SET_RATE_NO_REPARENT);
> }
>
> if (IS_ERR(hw))
> diff --git a/drivers/clk/imx/clk-imx93.c b/drivers/clk/imx/clk-imx93.c
> index 8d0974db6bfd..de1ed1d8ba54 100644
> --- a/drivers/clk/imx/clk-imx93.c
> +++ b/drivers/clk/imx/clk-imx93.c
> @@ -352,6 +352,8 @@ static struct platform_driver imx93_clk_driver = {
> },
> };
> module_platform_driver(imx93_clk_driver);
> +module_param(mcore_booted, bool, 0444);
> +MODULE_PARM_DESC(mcore_booted, "See Cortex-M core is booted or not");
>
> MODULE_DESCRIPTION("NXP i.MX93 clock driver");
> MODULE_LICENSE("GPL v2");
> --
> 2.37.1
>
WARNING: multiple messages have this Message-ID (diff)
From: Abel Vesa <abel.vesa@linaro.org>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: abelvesa@kernel.org, mturquette@baylibre.com, sboyd@kernel.org,
shawnguo@kernel.org, s.hauer@pengutronix.de,
kernel@pengutronix.de, festevam@gmail.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, linux-imx@nxp.com,
linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Peng Fan <peng.fan@nxp.com>, Ye Li <ye.li@nxp.com>
Subject: Re: [PATCH V3 5/7] clk: imx: imx93: add mcore_booted module paratemter
Date: Sun, 9 Apr 2023 16:46:57 +0300 [thread overview]
Message-ID: <ZDLB0SMCyYFFovI/@linaro.org> (raw)
In-Reply-To: <20230403095300.3386988-6-peng.fan@oss.nxp.com>
On 23-04-03 17:52:58, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add mcore_booted boot parameter which could simplify AMP clock
> management. To i.MX93, there is CCM(clock control Module) to generate
> clock root clock, anatop(analog PLL module) to generate PLL, and LPCG
> (clock gating) to gate clocks to peripherals. As below:
> anatop->ccm->lpcg->peripheral
>
> Linux handles the clock management and the auxiliary core is under
> control of Linux. Although there is per hardware domain control for LPCG
> and CCM, auxiliary core normally only use LPCG hardware domain control
> to avoid linux gate off the clk to peripherals and leave CCM ana anatop
> to Linux.
>
> Reviewed-by: Ye Li <ye.li@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
> ---
> drivers/clk/imx/clk-composite-93.c | 8 +++++++-
> drivers/clk/imx/clk-imx93.c | 2 ++
> 2 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clk/imx/clk-composite-93.c b/drivers/clk/imx/clk-composite-93.c
> index 74a66b0203e4..81164bdcd6cc 100644
> --- a/drivers/clk/imx/clk-composite-93.c
> +++ b/drivers/clk/imx/clk-composite-93.c
> @@ -222,7 +222,7 @@ struct clk_hw *imx93_clk_composite_flags(const char *name, const char * const *p
> hw = clk_hw_register_composite(NULL, name, parent_names, num_parents,
> mux_hw, &clk_mux_ro_ops, div_hw,
> &clk_divider_ro_ops, NULL, NULL, flags);
> - } else {
> + } else if (!mcore_booted) {
> gate = kzalloc(sizeof(*gate), GFP_KERNEL);
> if (!gate)
> goto fail;
> @@ -238,6 +238,12 @@ struct clk_hw *imx93_clk_composite_flags(const char *name, const char * const *p
> &imx93_clk_composite_divider_ops, gate_hw,
> &imx93_clk_composite_gate_ops,
> flags | CLK_SET_RATE_NO_REPARENT);
> + } else {
> + hw = clk_hw_register_composite(NULL, name, parent_names, num_parents,
> + mux_hw, &imx93_clk_composite_mux_ops, div_hw,
> + &imx93_clk_composite_divider_ops, NULL,
> + &imx93_clk_composite_gate_ops,
> + flags | CLK_SET_RATE_NO_REPARENT);
> }
>
> if (IS_ERR(hw))
> diff --git a/drivers/clk/imx/clk-imx93.c b/drivers/clk/imx/clk-imx93.c
> index 8d0974db6bfd..de1ed1d8ba54 100644
> --- a/drivers/clk/imx/clk-imx93.c
> +++ b/drivers/clk/imx/clk-imx93.c
> @@ -352,6 +352,8 @@ static struct platform_driver imx93_clk_driver = {
> },
> };
> module_platform_driver(imx93_clk_driver);
> +module_param(mcore_booted, bool, 0444);
> +MODULE_PARM_DESC(mcore_booted, "See Cortex-M core is booted or not");
>
> MODULE_DESCRIPTION("NXP i.MX93 clock driver");
> MODULE_LICENSE("GPL v2");
> --
> 2.37.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-04-09 13:47 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 9:52 [PATCH V3 0/7] clk: imx: imx93: fix and update Peng Fan (OSS)
2023-04-03 9:52 ` Peng Fan (OSS)
2023-04-03 9:52 ` [PATCH V3 1/7] clk: imx: fracn-gppll: fix the rate table Peng Fan (OSS)
2023-04-03 9:52 ` Peng Fan (OSS)
2023-04-09 13:44 ` Abel Vesa
2023-04-09 13:44 ` Abel Vesa
2023-04-03 9:52 ` [PATCH V3 2/7] clk: imx: fracn-gppll: disable hardware select control Peng Fan (OSS)
2023-04-03 9:52 ` Peng Fan (OSS)
2023-04-09 13:44 ` Abel Vesa
2023-04-09 13:44 ` Abel Vesa
2023-04-03 9:52 ` [PATCH V3 3/7] clk: imx: fracn-gppll: support integer pll Peng Fan (OSS)
2023-04-03 9:52 ` Peng Fan (OSS)
2023-04-09 13:45 ` Abel Vesa
2023-04-09 13:45 ` Abel Vesa
2023-04-03 9:52 ` [PATCH V3 4/7] clk: imx: fracn-gppll: Add 300MHz freq support for imx9 Peng Fan (OSS)
2023-04-03 9:52 ` Peng Fan (OSS)
2023-04-09 13:46 ` Abel Vesa
2023-04-09 13:46 ` Abel Vesa
2023-04-03 9:52 ` [PATCH V3 5/7] clk: imx: imx93: add mcore_booted module paratemter Peng Fan (OSS)
2023-04-03 9:52 ` Peng Fan (OSS)
2023-04-09 13:46 ` Abel Vesa [this message]
2023-04-09 13:46 ` Abel Vesa
2023-04-03 9:52 ` [PATCH V3 6/7] dt-bindings: clock: imx93: add NIC, A55 and ARM PLL CLK Peng Fan (OSS)
2023-04-03 9:52 ` Peng Fan (OSS)
2023-04-03 10:32 ` Krzysztof Kozlowski
2023-04-03 10:32 ` Krzysztof Kozlowski
2023-04-03 9:53 ` [PATCH V3 7/7] clk: imx: imx93: Add nic and A55 clk Peng Fan (OSS)
2023-04-03 9:53 ` Peng Fan (OSS)
2023-04-09 13:47 ` Abel Vesa
2023-04-09 13:47 ` Abel Vesa
2023-04-09 13:53 ` [PATCH V3 0/7] clk: imx: imx93: fix and update Abel Vesa
2023-04-09 13:53 ` Abel Vesa
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=ZDLB0SMCyYFFovI/@linaro.org \
--to=abel.vesa@linaro.org \
--cc=abelvesa@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--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=peng.fan@oss.nxp.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=shawnguo@kernel.org \
--cc=ye.li@nxp.com \
/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.