Message ID | 20211217155512.1877408-2-dario.binacchi@amarulasolutions.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | Fix and improve gpmi nand on mx28 | expand |
Quoting Dario Binacchi (2021-12-17 07:55:09) > From: Michael Trimarchi <michael@amarulasolutions.com> > > ref_gpmi is connected that is sourced from pll0. This allow > to get nand clk frequency to handle edo mode 5,4,3 > > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> > --- > > drivers/clk/mxs/clk-imx28.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c > index 62146ea4d5b8..9e0b9f8e5885 100644 > --- a/drivers/clk/mxs/clk-imx28.c > +++ b/drivers/clk/mxs/clk-imx28.c > @@ -243,6 +243,9 @@ static void __init mx28_clocks_init(struct device_node *np) > > clk_register_clkdev(clks[enet_out], NULL, "enet_out"); > > + /* GPMI set parent to ref_gpmi instead of osc */ > + clk_set_parent(clks[gpmi_sel], clks[ref_gpmi]); Please check the return value and print a warning or something if it fails. Also, can it be done through assigned-clock-parents instead? > + > for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) > clk_prepare_enable(clks[clks_init_on[i]]); > }
diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c index 62146ea4d5b8..9e0b9f8e5885 100644 --- a/drivers/clk/mxs/clk-imx28.c +++ b/drivers/clk/mxs/clk-imx28.c @@ -243,6 +243,9 @@ static void __init mx28_clocks_init(struct device_node *np) clk_register_clkdev(clks[enet_out], NULL, "enet_out"); + /* GPMI set parent to ref_gpmi instead of osc */ + clk_set_parent(clks[gpmi_sel], clks[ref_gpmi]); + for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) clk_prepare_enable(clks[clks_init_on[i]]); }