diff mbox series

[v3,3/3] clk: imx: imx6sx: Remove hardcoded LCDIF1 parent

Message ID 20230712115301.690714-3-festevam@gmail.com (mailing list archive)
State Awaiting Upstream, archived
Headers show
Series [v3,1/3] ARM: dts: imx6sx: Remove LDB endpoint | expand

Commit Message

Fabio Estevam July 12, 2023, 11:53 a.m. UTC
From: Fabio Estevam <festevam@denx.de>

It is not a good idea to hardcode the LCDIF1 parent inside the
clock driver because some users may want to use a different clock
parent for LCDIF1. One of the reasons could be related to EMI tests.

Remove the harcoded LCDIF1 parent as this is better described via
devicetree.

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Changes since v2:
- Rebased against 6.5-rc1.

 drivers/clk/imx/clk-imx6sx.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Fabio Estevam Aug. 15, 2023, 12:34 p.m. UTC | #1
Hi Abel,

On Wed, Jul 12, 2023 at 8:53 AM Fabio Estevam <festevam@gmail.com> wrote:
>
> From: Fabio Estevam <festevam@denx.de>
>
> It is not a good idea to hardcode the LCDIF1 parent inside the
> clock driver because some users may want to use a different clock
> parent for LCDIF1. One of the reasons could be related to EMI tests.
>
> Remove the harcoded LCDIF1 parent as this is better described via
> devicetree.
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
> Changes since v2:
> - Rebased against 6.5-rc1.

Shawn has already applied patches 1/3 and 2/3.

Could this one go via your tree, please?
Fabio Estevam Aug. 15, 2023, 12:49 p.m. UTC | #2
On Tue, Aug 15, 2023 at 9:34 AM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Abel,
>
> On Wed, Jul 12, 2023 at 8:53 AM Fabio Estevam <festevam@gmail.com> wrote:
> >
> > From: Fabio Estevam <festevam@denx.de>
> >
> > It is not a good idea to hardcode the LCDIF1 parent inside the
> > clock driver because some users may want to use a different clock
> > parent for LCDIF1. One of the reasons could be related to EMI tests.
> >
> > Remove the harcoded LCDIF1 parent as this is better described via
> > devicetree.
> >
> > Signed-off-by: Fabio Estevam <festevam@denx.de>
> > ---
> > Changes since v2:
> > - Rebased against 6.5-rc1.
>
> Shawn has already applied patches 1/3 and 2/3.
>
> Could this one go via your tree, please?

Actually, please discard this one. I missed adding the following
suggestion from Stephen:

"Do you need to check for the DT property and skip these clk_set_parent()
calls if they're present? How does this work if the DT isn't updated at
the same time?"

I will revisit this after 6.6-rc1 is out.

Thanks
diff mbox series

Patch

diff --git a/drivers/clk/imx/clk-imx6sx.c b/drivers/clk/imx/clk-imx6sx.c
index 3f1502933e59..b110258b9036 100644
--- a/drivers/clk/imx/clk-imx6sx.c
+++ b/drivers/clk/imx/clk-imx6sx.c
@@ -498,10 +498,6 @@  static void __init imx6sx_clocks_init(struct device_node *ccm_node)
 	clk_set_parent(hws[IMX6SX_CLK_EIM_SLOW_SEL]->clk, hws[IMX6SX_CLK_PLL2_PFD2]->clk);
 	clk_set_rate(hws[IMX6SX_CLK_EIM_SLOW]->clk, 132000000);
 
-	/* set parent clock for LCDIF1 pixel clock */
-	clk_set_parent(hws[IMX6SX_CLK_LCDIF1_PRE_SEL]->clk, hws[IMX6SX_CLK_PLL5_VIDEO_DIV]->clk);
-	clk_set_parent(hws[IMX6SX_CLK_LCDIF1_SEL]->clk, hws[IMX6SX_CLK_LCDIF1_PODF]->clk);
-
 	/* Set the parent clks of PCIe lvds1 and pcie_axi to be pcie ref, axi */
 	if (clk_set_parent(hws[IMX6SX_CLK_LVDS1_SEL]->clk, hws[IMX6SX_CLK_PCIE_REF_125M]->clk))
 		pr_err("Failed to set pcie bus parent clk.\n");