From patchwork Thu Sep 17 00:41:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1365675 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=OOdOPmue; 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=r7jhGqmg; 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 4BsJ8s2c41zB41S for ; Thu, 17 Sep 2020 10:42:53 +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=TE1GZPpN+gTn2c72teSBYUTDzeze12Zq7kVEzzA7yio=; b=OOdOPmuecFugMZI14MzwA1v9RY orFcSUVYPbVTrfLbzwUwXdtdK00Y3teK/gfQuTpE6YClNWdh/jwxi6r+fN76f+GUWlGlYdNqDcvWJ FxffWtlMS9qKnaWcVTzQJchNah+j69UPzuMdOb8Ioio2Z6j4uRbCle+dgKp0cVzsQduPRxHMwdcmW /psg32hMvXEs/TzqcK7OMoolWm/8P5WEyQtcPquDE+/aThSh57mOoB3ghYnqJJ3jMll1u0Jne7Brn GN6njX4wQRR5xxWvy7cesKWSJ7mourG0DZDRNYzoFurqRRjSubYTELK+FXLP3jvBxqIoo3+3CBjXX I0bInJvg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIi0K-0002yA-V0; Thu, 17 Sep 2020 00:42:28 +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 1kIi06-0002uJ-RP for linux-arm-kernel@lists.infradead.org; Thu, 17 Sep 2020 00:42:15 +0000 Received: by mail-qt1-x841.google.com with SMTP id e7so492870qtj.11 for ; Wed, 16 Sep 2020 17:42:14 -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=QJ/mBchY22ty9J5REACd2Ur8bm6y8L3/dnB+xgMfcEE=; b=r7jhGqmgl+//yexSlIYAsGg129phcUNM9ZTAh6yGZgGMpN021A4oeaka5aacsZHIBg OX2bGOiMrdM/5qYURelIENB3ExP+28WJb4/oe1V07vC1Uxf8fxriQVKF056w1OEZxOdV VybMxi5Qv/0K427TdJyULhdhciH/iBNsDqCw7VRIRysTCFC8t0DmU8h/6zWXiZVWAFzf rJtLiONopm73nRtaScs0iPur67RabthyGtSXKN2QbeSjalGEmcMYoXMYYVN4Jn7xs7U9 +s0Ye1gfTiGER/HqbL5E19/NVkZxecgSFAaidKVZtFaWPW1nIhgxUKmt6zuoWWZ1ph1N 7cCQ== 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=QJ/mBchY22ty9J5REACd2Ur8bm6y8L3/dnB+xgMfcEE=; b=i+cylS1W+dU1s6Ty/K0VCnuGw3npW+o6+a4LJK8PmyQCMwb0GCsLrEr2w5+/eoXRfB drMc+x5wwTbzSixodLN3E1EMTYTzlun7fqaUI+O+II/HlzXo5MOK34mHXS7w6a8jQuZu t4aM2X7J0V564rOe0wp630/6M/BU2AzyQh4/44xQ9AqXnO6iPd1lwU6MBexbjxi9TqAC QkDRi+RjVR50ZcvSi2/5h6XAH8iH/6JktIMCOUV8Xpe0nARPbeTWJjCxmklJ0raws0nS hZcvMPoanbp5B78huJiDNLLi2g1UrB2u8nMH8wlI7j3AEZUwou+3wZ51nYet6lvcN3O7 7YOw== X-Gm-Message-State: AOAM530LZwxYdtl6p9fUg6yllY5xT4DUZxS0TjG9IGr9hA18AkQIntID 3YlF3L99Bcsjxq24aIbfVjQ0A7sUMHo= X-Google-Smtp-Source: ABdhPJzXaj2J8G3aXSq+IoQy2tvWZVACZpzM9No30Q8ee6bJdgUlm50OJowxoQCYY0NsyNIkQ+9brQ== X-Received: by 2002:aed:2e26:: with SMTP id j35mr13498211qtd.377.1600303333489; Wed, 16 Sep 2020 17:42:13 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 17:42:12 -0700 (PDT) From: Fabio Estevam To: shawnguo@kernel.org Subject: [PATCH v2 04/11] ARM: imx3: Retrieve the CCM base address from devicetree Date: Wed, 16 Sep 2020 21:41:18 -0300 Message-Id: <20200917004125.18487-5-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_204214_936152_75B5A457 X-CRM114-Status: GOOD ( 14.98 ) 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:841 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 and imx35 has been converted to a devicetree-only platform, retrieve the CCM base address from devicetree. Signed-off-by: Fabio Estevam --- Chamges since v1: - None arch/arm/mach-imx/mm-imx3.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c index 4df7edc7ae7c..b7c5e15bb972 100644 --- a/arch/arm/mach-imx/mm-imx3.c +++ b/arch/arm/mach-imx/mm-imx3.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -99,10 +100,14 @@ static void imx31_idle(void) void __init imx31_init_early(void) { + struct device_node *np; + mxc_set_cpu_type(MXC_CPU_MX31); arch_ioremap_caller = imx3_ioremap_caller; arm_pm_idle = imx31_idle; - mx3_ccm_base = MX31_IO_ADDRESS(MX31_CCM_BASE_ADDR); + np = of_find_compatible_node(NULL, NULL, "fsl,imx31-ccm"); + mx3_ccm_base = of_iomap(np, 0); + BUG_ON(!mx3_ccm_base); } void __init mx31_init_irq(void) @@ -137,10 +142,14 @@ static void imx35_idle(void) void __init imx35_init_early(void) { + struct device_node *np; + mxc_set_cpu_type(MXC_CPU_MX35); arm_pm_idle = imx35_idle; arch_ioremap_caller = imx3_ioremap_caller; - mx3_ccm_base = MX35_IO_ADDRESS(MX35_CCM_BASE_ADDR); + np = of_find_compatible_node(NULL, NULL, "fsl,imx35-ccm"); + mx3_ccm_base = of_iomap(np, 0); + BUG_ON(!mx3_ccm_base); } void __init mx35_init_irq(void)