* [PATCH] soc: imx: imx8mp-blk-ctrl: register HSIO PLL clock as bus_power_dev child
@ 2023-07-17 14:54 Lucas Stach
2023-07-18 6:23 ` Yannic Moog
2023-07-19 7:45 ` Shawn Guo
0 siblings, 2 replies; 3+ messages in thread
From: Lucas Stach @ 2023-07-17 14:54 UTC (permalink / raw)
To: Shawn Guo
Cc: Yannic Moog, Fabio Estevam, Pengutronix Kernel Team,
NXP Linux Team, linux-arm-kernel, patchwork-lst
The blk-ctrl device is deliberately placed outside of the GPC power
domain as it needs to control the power sequencing of the blk-ctrl
domains together with the GPC domains.
Clock runtime PM works by operating on the clock parent device, which
doesn't translate into the neccessary GPC power domain action if the
clk parent is not part of the GPC power domain. Use the bus_power_device
as the parent for the clock to trigger the proper GPC domain actions on
clock runtime power management.
Fixes: 2cbee26e5d59 ("soc: imx: imx8mp-blk-ctrl: expose high performance PLL clock")
Reported-by: Yannic Moog <Y.Moog@phytec.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/soc/imx/imx8mp-blk-ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c b/drivers/soc/imx/imx8mp-blk-ctrl.c
index 870aecc0202a..1c1fcab4979a 100644
--- a/drivers/soc/imx/imx8mp-blk-ctrl.c
+++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
@@ -164,7 +164,7 @@ static int imx8mp_hsio_blk_ctrl_probe(struct imx8mp_blk_ctrl *bc)
clk_hsio_pll->hw.init = &init;
hw = &clk_hsio_pll->hw;
- ret = devm_clk_hw_register(bc->dev, hw);
+ ret = devm_clk_hw_register(bc->bus_power_dev, hw);
if (ret)
return ret;
--
2.39.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: imx: imx8mp-blk-ctrl: register HSIO PLL clock as bus_power_dev child
2023-07-17 14:54 [PATCH] soc: imx: imx8mp-blk-ctrl: register HSIO PLL clock as bus_power_dev child Lucas Stach
@ 2023-07-18 6:23 ` Yannic Moog
2023-07-19 7:45 ` Shawn Guo
1 sibling, 0 replies; 3+ messages in thread
From: Yannic Moog @ 2023-07-18 6:23 UTC (permalink / raw)
To: l.stach@pengutronix.de, shawnguo@kernel.org
Cc: festevam@gmail.com, linux-arm-kernel@lists.infradead.org,
kernel@pengutronix.de, patchwork-lst@pengutronix.de,
linux-imx@nxp.com
Hello Lucas,
thank you for fixing this issue.
On Mon, 2023-07-17 at 16:54 +0200, Lucas Stach wrote:
> The blk-ctrl device is deliberately placed outside of the GPC power
> domain as it needs to control the power sequencing of the blk-ctrl
> domains together with the GPC domains.
>
> Clock runtime PM works by operating on the clock parent device, which
> doesn't translate into the neccessary GPC power domain action if the
> clk parent is not part of the GPC power domain. Use the
> bus_power_device
> as the parent for the clock to trigger the proper GPC domain actions
> on
> clock runtime power management.
>
> Fixes: 2cbee26e5d59 ("soc: imx: imx8mp-blk-ctrl: expose high
> performance PLL clock")
> Reported-by: Yannic Moog <Y.Moog@phytec.de>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
> drivers/soc/imx/imx8mp-blk-ctrl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/imx/imx8mp-blk-ctrl.c
> b/drivers/soc/imx/imx8mp-blk-ctrl.c
> index 870aecc0202a..1c1fcab4979a 100644
> --- a/drivers/soc/imx/imx8mp-blk-ctrl.c
> +++ b/drivers/soc/imx/imx8mp-blk-ctrl.c
> @@ -164,7 +164,7 @@ static int imx8mp_hsio_blk_ctrl_probe(struct
> imx8mp_blk_ctrl *bc)
> clk_hsio_pll->hw.init = &init;
>
> hw = &clk_hsio_pll->hw;
> - ret = devm_clk_hw_register(bc->dev, hw);
> + ret = devm_clk_hw_register(bc->bus_power_dev, hw);
> if (ret)
> return ret;
>
Tested-by: Yannic Moog <y.moog@phytec.de>
Yannic
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] soc: imx: imx8mp-blk-ctrl: register HSIO PLL clock as bus_power_dev child
2023-07-17 14:54 [PATCH] soc: imx: imx8mp-blk-ctrl: register HSIO PLL clock as bus_power_dev child Lucas Stach
2023-07-18 6:23 ` Yannic Moog
@ 2023-07-19 7:45 ` Shawn Guo
1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2023-07-19 7:45 UTC (permalink / raw)
To: Lucas Stach
Cc: Yannic Moog, Fabio Estevam, Pengutronix Kernel Team,
NXP Linux Team, linux-arm-kernel, patchwork-lst
On Mon, Jul 17, 2023 at 04:54:09PM +0200, Lucas Stach wrote:
> The blk-ctrl device is deliberately placed outside of the GPC power
> domain as it needs to control the power sequencing of the blk-ctrl
> domains together with the GPC domains.
>
> Clock runtime PM works by operating on the clock parent device, which
> doesn't translate into the neccessary GPC power domain action if the
> clk parent is not part of the GPC power domain. Use the bus_power_device
> as the parent for the clock to trigger the proper GPC domain actions on
> clock runtime power management.
>
> Fixes: 2cbee26e5d59 ("soc: imx: imx8mp-blk-ctrl: expose high performance PLL clock")
> Reported-by: Yannic Moog <Y.Moog@phytec.de>
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Applied, thanks!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-19 7:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 14:54 [PATCH] soc: imx: imx8mp-blk-ctrl: register HSIO PLL clock as bus_power_dev child Lucas Stach
2023-07-18 6:23 ` Yannic Moog
2023-07-19 7:45 ` Shawn Guo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).