From patchwork Thu Jun 25 14:01:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Van Asbroeck X-Patchwork-Id: 11625459 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7C0E814B7 for ; Thu, 25 Jun 2020 14:03:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 54407206B7 for ; Thu, 25 Jun 2020 14:03:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Y27kORg8"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OB6P4UXq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54407206B7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=/HnqwBoc5mHVHURWc6Xzx4LCo7LIJkL2nvyp0v0kSfg=; b=Y27kORg8eJdyDgUr+5WZDw7zjE 7YGySxRQYe97ookSvyXKmw7+taBWwHnhuC4WlR/BneSwF59fmOeOkriRETbRKhH5KZ2xxBmasrQgJ wGYP54qLKYQkSZkf/y1rQJxzlKjjaETsPQ5mt3JqAH0xHvsJiomlavP0BIwsIdwPLc/Boop0eJFPE TA1PTPoYbk/0NWZOetYaDbt5jl4t1HoDEhqKruRgazdaF9yLoUy+VfYQNvXpyXjFTFN2Ix/ZJ5uxz CvBUZIQUXKr6Ip6DjR8JTw9Or6bTGgw7ElZK7ytX3FX3eIvVqtjlm9XF/E6F1VDG0MY0ziKLy7Twb t6+o/98A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joSRH-0008Mh-Ga; Thu, 25 Jun 2020 14:01:15 +0000 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joSRF-0008MB-FC for linux-arm-kernel@lists.infradead.org; Thu, 25 Jun 2020 14:01:14 +0000 Received: by mail-qt1-x841.google.com with SMTP id j10so4617214qtq.11 for ; Thu, 25 Jun 2020 07:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=xmHeLYCaw0g+TtCjwJeJ3J50snewkzB3BQXGW6qA/b8=; b=OB6P4UXqU2MNty9AwXP6n9oE/Z1JLPm536SlYulamUkDDzM5uvwHvne33+ZaP5Dyyp uewLuO9kUfZv8sfgv6iLi+e+pPVFpir2ZI2HLPMATUvrMhmBBMgEb4qxeVKJxh0mbAx0 Or8V3KfdeM5hPJY1vpQTj2evsm9P5ujMhD4k2gotd6Mf0QmictaJWM0YDSKEVR9M1Q4v tFdekITcq1fXubmwWZlJO9Kad8gqpz68pNJj5E1g8XoPxAqEs9GCgvrXRbPy9c0sKJKS 9D3voyowUm8BgYAfSSWKFd2A2NtSb1NChVv92RNH23C4N17W++fCnKUc4Hi3mgKa+A/O cqWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xmHeLYCaw0g+TtCjwJeJ3J50snewkzB3BQXGW6qA/b8=; b=rinwJdvR31nadMEW7N56lK/iJSqpTpuUdg3iHGf5Cif7rUNrPDJg2+IGfa09aHXu/w PMQ5BtIHCEoNLCrrIehW66WN2r4N+hKPgErRqYWUHaMj9rPmniRy6EAqlIb/mKfwA9T/ cxyfoW7Djpk/Rmzy1wg0SNd6Adx/TjKS8wV/StWzFXNKGDgxdffsQOkS+ase9Jm1xHpS P/eCBdsjnzC/xxG6Zi2nQE1Iz57AvHXvSR+DqbyeRjSSAKhpiM6Cfbkz3jgaCPnXY01A qsIk9HUMAP3AzGMxl8+8LTi5ioWGlN0V1ys1dGhVX+AHEg5gfnNSYaQagdoOSvIxwuEO Jbrw== X-Gm-Message-State: AOAM532OVY6ZKZgfLpF0CpYEMTtYdNKyweABlUydDX6T8WjFcdntNgwK cPcYC+YAlhgQ6XBfdXDveWQ= X-Google-Smtp-Source: ABdhPJwXJ2hlI1sfszdA2UXUkgOAQfdCwi5/qN1PAljUUsu/xdXtuzfYnXrvyVG40QRsxfncSdK8kw== X-Received: by 2002:ac8:1ac4:: with SMTP id h4mr19480556qtk.249.1593093671249; Thu, 25 Jun 2020 07:01:11 -0700 (PDT) Received: from localhost.localdomain ([72.53.229.195]) by smtp.gmail.com with ESMTPSA id f4sm5337691qtv.59.2020.06.25.07.01.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 07:01:10 -0700 (PDT) From: Sven Van Asbroeck X-Google-Original-From: Sven Van Asbroeck To: shawnguo@kernel.org, fugang.duan@nxp.com Subject: [PATCH v4 1/2] ARM: imx: mach-imx6q: Search for fsl, imx6q-iomuxc-gpr earlier Date: Thu, 25 Jun 2020 10:01:04 -0400 Message-Id: <20200625140105.14999-1-TheSven73@gmail.com> X-Mailer: git-send-email 2.17.1 X-Spam-Note: CRM114 invocation failed X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:841 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [thesven73[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [thesven73[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sascha Hauer , linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Fabio Estevam 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 --- Patch history: see [PATCH v4 2/2] ARM: imx6plus: enable internal routing of clk_enet_ref To: Shawn Guo To: Andy Duan Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.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: