From patchwork Thu Sep 17 00:41:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1365674 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=aoRh+68S; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=SiwlgovZ; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BsJ8j46BBzB41K for ; Thu, 17 Sep 2020 10:42:45 +1000 (AEST) 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:References:In-Reply-To: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:List-Owner; bh=qvPSFlM6POviKsQHVHAk43TM1vUxj4BJGDD9WuKqd9w=; b=aoRh+68SaAfwdwmjYhzi+C8W3E EE62/V3httMeF22Binagvx9C8ky9rAUkKKsOzevUGsrMtL9BfZ0VfALYCf6GLZuOKoDp7LUSrwX0T kMpItl0Mdt9hf71+eqQec/7mx+kyuryoDofaHD+pFTJJE08y/PhAWIeIwwNjzYkZ7pzVSifOD6Xk4 nzbZf/779PgFdySfbn2n2SFeaQ4NYCIvt6D7X6/P9T7sqhc832k4G1F84SFtkB20b5udjHlJgAqgC 5nZuqR+aE5loasz148vtQP/tA8zFpy8FLT+q4u3Jxvwg79XBXSGzJYCtYI4UjWmrEzEcCk5ECdVeW hQ0/G9Dw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIi0E-0002w2-0z; Thu, 17 Sep 2020 00:42:22 +0000 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIi04-0002tm-7Z for linux-arm-kernel@lists.infradead.org; Thu, 17 Sep 2020 00:42:13 +0000 Received: by mail-qk1-x741.google.com with SMTP id q63so534107qkf.3 for ; Wed, 16 Sep 2020 17:42:11 -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:in-reply-to:references; bh=O00e0BlUV8kkvwspamEh7oVTQIucZGjC0y9S45Yotv4=; b=SiwlgovZmDNttxeCa3bLuj0bH8SunFvfkKSDGopOSKH1AyB8/LgLQygn2C7dmxo10E 4hYiDhCi9pwkwAa2fsPTYx6TB+/O8LJYIqeK2QNKnxvSBNqXzEVQ1/ltTD+8AkQzIyRB OAgkiLz5+ti/g52tI2GJPW6glhAxrukmVBcskVzAPcivHPQ8Ng6C48U4fAtMtBFhD1op qgJDGl7dMuL/SXzOCCeuTkMqC168LMTIaBXnDxlXvNJe4x4Ivg6RrgY6Y7L1YHzWo1ry DHbKHZ9hv8n1aD90OVPgWnJ3CIpAm8gP5KtAMUyRjOUwzkD45BsamEXNqELKLxWjK9jc SZjQ== 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:in-reply-to :references; bh=O00e0BlUV8kkvwspamEh7oVTQIucZGjC0y9S45Yotv4=; b=fIiPWdG6rJ32dmqrykkeh+CcoWO2Pc9F5+IOOWecurwHWWt6A+NPsykgSrt9+IbYeY i1Mf3r2f8n0e0F8uxawaLloMT7m5+l0tkMvWX3avFftAj4BQ5FvqKjF++g5da9J7NEFc k155kGW5XxsYsZMZs517WZWV1dJTEQJ5LQx30xG5+JLKNvGdIu3rArgDmLJFRUWCW2Z/ qXbIWnH6uRO5sTSNOrOt1WNjln3QYSY/MtM98+c/xlscTxvgO1Oj+Vs1AOHymutKRJyz bpBFVKGnlXxYusT3v7gVAS6NSUz6es9ht4TvywBdnQPMarBGWlHcjmpru+VDdxzh9KWV L7kQ== X-Gm-Message-State: AOAM533OuV70Zjmqw3BOxg5pZjcwsEuy9CpmB1nNyr4cfgIQcDtnp5S5 baslo3eLpjJEqFQ8xsTl24k= X-Google-Smtp-Source: ABdhPJwhnS2ppOAbRFaDLddF6zhmNILpeI/fXmZA9Nqrx19CrtTwtWHozaNmStVkwwyHnWKoFkGyVg== X-Received: by 2002:a37:897:: with SMTP id 145mr26582910qki.82.1600303330547; Wed, 16 Sep 2020 17:42:10 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:640::1000]) by smtp.gmail.com with ESMTPSA id w6sm20127893qti.63.2020.09.16.17.42.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 17:42:09 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Subject: [PATCH v2 03/11] ARM: imx31: Retrieve the IIM base address from devicetree Date: Wed, 16 Sep 2020 21:41:17 -0300 Message-Id: <20200917004125.18487-4-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200917004125.18487-1-festevam@gmail.com> References: <20200917004125.18487-1-festevam@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200916_204212_296119_51269FC3 X-CRM114-Status: GOOD ( 14.73 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 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:741 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [festevam[at]gmail.com] -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 -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 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: linux-arm-kernel@lists.infradead.org, Fabio Estevam , arnd@arndb.de, linux-imx@nxp.com, kernel@pengutronix.de MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org Now that imx31 has been converted to a devicetree-only platform, retrieve the IIM base address from devicetree. Signed-off-by: Fabio Estevam --- Chamges since v1: - None arch/arm/mach-imx/cpu-imx31.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-imx/cpu-imx31.c b/arch/arm/mach-imx/cpu-imx31.c index 3ee684b71006..b9c24b851d1a 100644 --- a/arch/arm/mach-imx/cpu-imx31.c +++ b/arch/arm/mach-imx/cpu-imx31.c @@ -6,6 +6,7 @@ */ #include +#include #include #include "common.h" @@ -32,10 +33,16 @@ static struct { static int mx31_read_cpu_rev(void) { + void __iomem *iim_base; + struct device_node *np; u32 i, srev; + np = of_find_compatible_node(NULL, NULL, "fsl,imx31-iim"); + iim_base = of_iomap(np, 0); + BUG_ON(!iim_base); + /* read SREV register from IIM module */ - srev = imx_readl(MX31_IO_ADDRESS(MX31_IIM_BASE_ADDR + MXC_IIMSREV)); + srev = imx_readl(iim_base + MXC_IIMSREV); srev &= 0xff; for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++)