[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200702175352.19223-1-TheSven73@gmail.com>
Date: Thu, 2 Jul 2020 13:53:50 -0400
From: Sven Van Asbroeck <thesven73@...il.com>
To: shawnguo@...nel.org, fugang.duan@....com, robh+dt@...nel.org
Cc: Fabio Estevam <festevam@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
NXP Linux Team <linux-imx@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH v5 1/3] ARM: imx: mach-imx6q: Search for fsl,imx6q-iomuxc-gpr earlier
From: Fabio Estevam <festevam@...il.com>
Check the presence of fsl,imx6q-iomuxc-gpr earlier and exit in case
of failure.
This is done in preparation for adding support for configuring the
GPR5 register for i.MX6QP a bit easier.
Signed-off-by: Fabio Estevam <festevam@...il.com>
---
Tree: v5.8-rc3
Patch history: see [PATCH v5 3/3]
To: Shawn Guo <shawnguo@...nel.org>
To: Andy Duan <fugang.duan@....com>
To: Rob Herring <robh+dt@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org
Cc: devicetree@...r.kernel.org
Cc: Sascha Hauer <s.hauer@...gutronix.de>
Cc: Pengutronix Kernel Team <kernel@...gutronix.de>
Cc: Fabio Estevam <festevam@...il.com>
Cc: NXP Linux Team <linux-imx@....com>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org
arch/arm/mach-imx/mach-imx6q.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 85c084a716ab..ae89ad93ca83 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -169,6 +169,12 @@ static void __init imx6q_1588_init(void)
struct regmap *gpr;
u32 clksel;
+ gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");
+ if (IS_ERR(gpr)) {
+ pr_err("failed to find fsl,imx6q-iomuxc-gpr regmap\n");
+ return;
+ }
+
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-fec");
if (!np) {
pr_warn("%s: failed to find fec node\n", __func__);
@@ -195,13 +201,8 @@ static void __init imx6q_1588_init(void)
clksel = clk_is_match(ptp_clk, enet_ref) ?
IMX6Q_GPR1_ENET_CLK_SEL_ANATOP :
IMX6Q_GPR1_ENET_CLK_SEL_PAD;
- gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");
- if (!IS_ERR(gpr))
- regmap_update_bits(gpr, IOMUXC_GPR1,
- IMX6Q_GPR1_ENET_CLK_SEL_MASK,
- clksel);
- else
- pr_err("failed to find fsl,imx6q-iomuxc-gpr regmap\n");
+ regmap_update_bits(gpr, IOMUXC_GPR1, IMX6Q_GPR1_ENET_CLK_SEL_MASK,
+ clksel);
clk_put(enet_ref);
put_ptp_clk:
--
2.17.1
Powered by blists - more mailing lists