Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] clk: imx: Remove __init for imx_check_clocks() API
@ 2019-06-10  5:36 Anson.Huang
  2019-06-10  5:36 ` [PATCH 2/2] clk: imx8mq: Use imx_check_clocks() API directly Anson.Huang
  2019-06-18  6:51 ` [PATCH 1/2] clk: imx: Remove __init for imx_check_clocks() API Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Anson.Huang @ 2019-06-10  5:36 UTC (permalink / raw)
  To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam,
	abel.vesa, l.stach, ccaione, leonard.crestez, aisheng.dong,
	linux-clk, linux-arm-kernel, linux-kernel
  Cc: Linux-imx

From: Anson Huang <Anson.Huang@nxp.com>

Some of i.MX SoCs' clock driver use platform driver model,
and they need to call imx_check_clocks() API, so
imx_check_clocks() API should NOT be in .init section.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/clk/imx/clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c
index 9cd7097..b1416b2 100644
--- a/drivers/clk/imx/clk.c
+++ b/drivers/clk/imx/clk.c
@@ -23,7 +23,7 @@ void __init imx_mmdc_mask_handshake(void __iomem *ccm_base,
 	writel_relaxed(reg, ccm_base + CCM_CCDR);
 }
 
-void __init imx_check_clocks(struct clk *clks[], unsigned int count)
+void imx_check_clocks(struct clk *clks[], unsigned int count)
 {
 	unsigned i;
 
-- 
2.7.4


_______________________________________________
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

* [PATCH 2/2] clk: imx8mq: Use imx_check_clocks() API directly
  2019-06-10  5:36 [PATCH 1/2] clk: imx: Remove __init for imx_check_clocks() API Anson.Huang
@ 2019-06-10  5:36 ` Anson.Huang
  2019-06-18  6:51 ` [PATCH 1/2] clk: imx: Remove __init for imx_check_clocks() API Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Anson.Huang @ 2019-06-10  5:36 UTC (permalink / raw)
  To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam,
	abel.vesa, l.stach, ccaione, leonard.crestez, aisheng.dong,
	linux-clk, linux-arm-kernel, linux-kernel
  Cc: Linux-imx

From: Anson Huang <Anson.Huang@nxp.com>

Use imx_check_clocks() API to check clocks directly.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/clk/imx/clk-imx8mq.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/clk/imx/clk-imx8mq.c b/drivers/clk/imx/clk-imx8mq.c
index 7da1edb..5fbc2a7 100644
--- a/drivers/clk/imx/clk-imx8mq.c
+++ b/drivers/clk/imx/clk-imx8mq.c
@@ -278,7 +278,6 @@ static int imx8mq_clocks_probe(struct platform_device *pdev)
 	struct device_node *np = dev->of_node;
 	void __iomem *base;
 	int err;
-	int i;
 
 	clks[IMX8MQ_CLK_DUMMY] = imx_clk_fixed("dummy", 0);
 	clks[IMX8MQ_CLK_32K] = of_clk_get_by_name(np, "ckil");
@@ -548,10 +547,7 @@ static int imx8mq_clocks_probe(struct platform_device *pdev)
 					   clks[IMX8MQ_ARM_PLL_OUT],
 					   clks[IMX8MQ_SYS1_PLL_800M]);
 
-	for (i = 0; i < IMX8MQ_CLK_END; i++)
-		if (IS_ERR(clks[i]))
-			pr_err("i.MX8mq clk %u register failed with %ld\n",
-			       i, PTR_ERR(clks[i]));
+	imx_check_clocks(clks, ARRAY_SIZE(clks));
 
 	clk_data.clks = clks;
 	clk_data.clk_num = ARRAY_SIZE(clks);
-- 
2.7.4


_______________________________________________
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 1/2] clk: imx: Remove __init for imx_check_clocks() API
  2019-06-10  5:36 [PATCH 1/2] clk: imx: Remove __init for imx_check_clocks() API Anson.Huang
  2019-06-10  5:36 ` [PATCH 2/2] clk: imx8mq: Use imx_check_clocks() API directly Anson.Huang
@ 2019-06-18  6:51 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2019-06-18  6:51 UTC (permalink / raw)
  To: Anson.Huang
  Cc: aisheng.dong, abel.vesa, ccaione, sboyd, mturquette,
	linux-kernel, linux-clk, Linux-imx, kernel, leonard.crestez,
	festevam, s.hauer, linux-arm-kernel, l.stach

On Mon, Jun 10, 2019 at 01:36:33PM +0800, Anson.Huang@nxp.com wrote:
> From: Anson Huang <Anson.Huang@nxp.com>
> 
> Some of i.MX SoCs' clock driver use platform driver model,
> and they need to call imx_check_clocks() API, so
> imx_check_clocks() API should NOT be in .init section.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Applied both, 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, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-10  5:36 [PATCH 1/2] clk: imx: Remove __init for imx_check_clocks() API Anson.Huang
2019-06-10  5:36 ` [PATCH 2/2] clk: imx8mq: Use imx_check_clocks() API directly Anson.Huang
2019-06-18  6:51 ` [PATCH 1/2] clk: imx: Remove __init for imx_check_clocks() API Shawn Guo

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox