linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] clk: imx25: Remove osc clock from driver
@ 2015-10-26  6:10 Markus Pargmann
  2015-11-24  3:53 ` Shawn Guo
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Pargmann @ 2015-10-26  6:10 UTC (permalink / raw)
  To: linux-arm-kernel

The 'osc' clock is already initialized by the fixed clock defined in
imx25.dtsi. The imx25 clock driver tries to add this clock for a second
time and fails with -EEXIST:
	i.MX clk 1: register failed with -17

As the clock is already properly setup in DT with a different driver, we
can completely remove the handling in the imx25 clock driver.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
---

Thanks for your review Lucas. I just removed the NULL assignment from the patch
you mentioned. That's the only change for v2.

Best Regards,

Markus

 drivers/clk/imx/clk-imx25.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/drivers/clk/imx/clk-imx25.c b/drivers/clk/imx/clk-imx25.c
index ec1a4c1dacf1..4df652cd912c 100644
--- a/drivers/clk/imx/clk-imx25.c
+++ b/drivers/clk/imx/clk-imx25.c
@@ -86,13 +86,11 @@ enum mx25_clks {
 
 static struct clk *clk[clk_max];
 
-static int __init __mx25_clocks_init(unsigned long osc_rate,
-				     void __iomem *ccm_base)
+static int __init __mx25_clocks_init(void __iomem *ccm_base)
 {
 	BUG_ON(!ccm_base);
 
 	clk[dummy] = imx_clk_fixed("dummy", 0);
-	clk[osc] = imx_clk_fixed("osc", osc_rate);
 	clk[mpll] = imx_clk_pllv1(IMX_PLLV1_IMX25, "mpll", "osc", ccm(CCM_MPCTL));
 	clk[upll] = imx_clk_pllv1(IMX_PLLV1_IMX25, "upll", "osc", ccm(CCM_UPCTL));
 	clk[mpll_cpu_3_4] = imx_clk_fixed_factor("mpll_cpu_3_4", "mpll", 3, 4);
@@ -238,22 +236,10 @@ static int __init __mx25_clocks_init(unsigned long osc_rate,
 
 static void __init mx25_clocks_init_dt(struct device_node *np)
 {
-	struct device_node *refnp;
-	unsigned long osc_rate = 24000000;
 	void __iomem *ccm;
 
-	/* retrieve the freqency of fixed clocks from device tree */
-	for_each_compatible_node(refnp, NULL, "fixed-clock") {
-		u32 rate;
-		if (of_property_read_u32(refnp, "clock-frequency", &rate))
-			continue;
-
-		if (of_device_is_compatible(refnp, "fsl,imx-osc"))
-			osc_rate = rate;
-	}
-
 	ccm = of_iomap(np, 0);
-	__mx25_clocks_init(osc_rate, ccm);
+	__mx25_clocks_init(ccm);
 
 	clk_data.clks = clk;
 	clk_data.clk_num = ARRAY_SIZE(clk);
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] clk: imx25: Remove osc clock from driver
  2015-10-26  6:10 [PATCH v2] clk: imx25: Remove osc clock from driver Markus Pargmann
@ 2015-11-24  3:53 ` Shawn Guo
  2015-11-24 11:19   ` Markus Pargmann
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn Guo @ 2015-11-24  3:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 26, 2015 at 07:10:48AM +0100, Markus Pargmann wrote:
> The 'osc' clock is already initialized by the fixed clock defined in
> imx25.dtsi. The imx25 clock driver tries to add this clock for a second
> time and fails with -EEXIST:
> 	i.MX clk 1: register failed with -17
> 
> As the clock is already properly setup in DT with a different driver, we
> can completely remove the handling in the imx25 clock driver.
> 
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>

Markus,

Please resend the patch with clock maintainers and list on copy.  If you
think it's a non-critical fix, I will queue it for v4.5-rc1.  Otherwise,
you ask clock maintainers to send it for v4.4-rc inclusion.

Shawn

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] clk: imx25: Remove osc clock from driver
  2015-11-24  3:53 ` Shawn Guo
@ 2015-11-24 11:19   ` Markus Pargmann
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Pargmann @ 2015-11-24 11:19 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Shawn,

On Tuesday 24 November 2015 11:53:49 Shawn Guo wrote:
> On Mon, Oct 26, 2015 at 07:10:48AM +0100, Markus Pargmann wrote:
> > The 'osc' clock is already initialized by the fixed clock defined in
> > imx25.dtsi. The imx25 clock driver tries to add this clock for a second
> > time and fails with -EEXIST:
> > 	i.MX clk 1: register failed with -17
> > 
> > As the clock is already properly setup in DT with a different driver, we
> > can completely remove the handling in the imx25 clock driver.
> > 
> > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> > Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
> 
> Markus,
> 
> Please resend the patch with clock maintainers and list on copy.  If you
> think it's a non-critical fix, I will queue it for v4.5-rc1.  Otherwise,
> you ask clock maintainers to send it for v4.4-rc inclusion.

I just resent this patch (and rebased it). This is a non-critical fix and
4.5-rc1 is fine.

Best Regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151124/7043dca7/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-24 11:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-26  6:10 [PATCH v2] clk: imx25: Remove osc clock from driver Markus Pargmann
2015-11-24  3:53 ` Shawn Guo
2015-11-24 11:19   ` Markus Pargmann

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).