From patchwork Thu Jul 2 17:53:50 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: 11640085 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 6CDA514B7 for ; Thu, 2 Jul 2020 17:55:26 +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 46F7B20760 for ; Thu, 2 Jul 2020 17:55:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nEu90dK3"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bb1PyoLT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46F7B20760 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=tsxLdFAxcj681+3m9DuEtmyy/HJQX7T4CfFzYqzfZjk=; b=nEu90dK3MjXJQEWqAg27Au1S29 Uc4BfI2TXPT3rQsksR/25N42RTawaa8BXM96gtrfmo6HFzdEjpGTKXT6xKPRsVRiS4XXuIXrq4yM8 SHC4NklC1XNWzqhofKXqxqV9hLwt/Cr1LKC3QjtX7abztBZQs6313dW3NzgwqadPFvoNQtN1jOHJj 2SB63DMOp6vAt+lrwC24mtR0iO5tMjjczNgR4RBldgJa7R2AckwjBUjnCStA5tYBkODDfLpGi8m27 S/n/XddmBGKhDK1Hbvpsh5ivu65D5OOnqB7UTHF8HN6f6BKHq1TOcD/tjMeO+07S7XMr08/XEZS9j xPUm0nHw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr3PO-0005Fy-Bz; Thu, 02 Jul 2020 17:54:02 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr3PL-0005EL-T6 for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 17:54:00 +0000 Received: by mail-qk1-x743.google.com with SMTP id b185so15866336qkg.1 for ; Thu, 02 Jul 2020 10:53:57 -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=0/GQxXxfGsYnBic5/RL6CAFNUaN6B/gl7pdQ8fVaHoY=; b=bb1PyoLTqgnmqpoyjiIqzjmgwRxbIg8/iGsNGwpirVNTcqI/GQWWEP9KFFNsCcQ10Y Ni/imIv6X56JStRHswX9whmutnIkp9Jwpyw17nRT4ye+1zS2B8WHUkvehHf6HtkRirUr zzJuHZC5HZrpJA0wVOqSeUSYAsh3oBtm0I5eOe8bKLXC8dpfaODBFsJFDB2Vn8gFNR/v WdX5Squi+dYMgYQR2SYNp5wy2DwPLQaCVC2RpOSHbFUfVtMI/q97tPM2I/aAwfNXWWpB imEUZFoBTZD10dU53SjxXkOV4t3X3K2X7Uq9ooGbmCV9xzi9qS/uULtffIR1Y/+AZ3qS Mmew== 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=0/GQxXxfGsYnBic5/RL6CAFNUaN6B/gl7pdQ8fVaHoY=; b=aOiuKAGIiHEuQCUk5682zKb9zUn2f40aik6uRXksDoSFfSRilH09iIg4jncsQIkUnz q84p7TE94VLvWnAIcl6hINvuVoeX2mS12+eU4B/1QsKezEdXhQAFV906mF0O1a8AV5Bm n2oA5ejMthxn3zDm5hgEEkyBhNVhBelxaW8VeGvWJPSxMD9dht7kXnae044P6Wucfvpm gGg4RF2UcH8RS2RfOO5YLeWSNO0tubZ5EtIqDMmsIDtc3j+hsMgnjScm7s4YtvwTtOsQ SUAiKuOdFGXKEAk4/IXvCbDt2rqKtvXucBrYKPUrRdCvFhm9YxgNuu1KQB1NwtaF/G8g 9XZQ== X-Gm-Message-State: AOAM530/qAf73jabboFY/POBfVN1LOt+53zWE2NgTSIZiVy3F45aG8/d fkYsy4tFedEb0gt4Fqt8hc5LZgWx X-Google-Smtp-Source: ABdhPJyHl0z1SgQYig6I2fdY7EXsTetGozQfTeorJpNp1pG+z4UU5fykSc183B/FAVq+lx8x9BbPzQ== X-Received: by 2002:a37:689:: with SMTP id 131mr22871561qkg.468.1593712436222; Thu, 02 Jul 2020 10:53:56 -0700 (PDT) Received: from localhost.localdomain ([72.53.229.195]) by smtp.gmail.com with ESMTPSA id w204sm9149937qka.41.2020.07.02.10.53.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 10:53:55 -0700 (PDT) From: Sven Van Asbroeck X-Google-Original-From: Sven Van Asbroeck To: shawnguo@kernel.org, fugang.duan@nxp.com, robh+dt@kernel.org Subject: [PATCH v5 1/3] ARM: imx: mach-imx6q: Search for fsl, imx6q-iomuxc-gpr earlier Date: Thu, 2 Jul 2020 13:53:50 -0400 Message-Id: <20200702175352.19223-1-TheSven73@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_135359_952505_DFAE23C8 X-CRM114-Status: GOOD ( 14.19 ) 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:743 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [thesven73[at]gmail.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [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 Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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: devicetree@vger.kernel.org, netdev@vger.kernel.org, Sascha Hauer , linux-kernel@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , Jakub Kicinski , Fabio Estevam , "David S. Miller" , 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 --- Tree: v5.8-rc3 Patch history: see [PATCH v5 3/3] To: Shawn Guo To: Andy Duan To: Rob Herring Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: devicetree@vger.kernel.org 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: