linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: shawnguo@kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	Fabio Estevam <festevam@gmail.com>,
	arnd@arndb.de, linux-imx@nxp.com, kernel@pengutronix.de
Subject: [PATCH 06/13] ARM: imx3: Retrieve the CCM base address from devicetree
Date: Wed, 16 Sep 2020 17:55:15 -0300	[thread overview]
Message-ID: <20200916205522.8783-7-festevam@gmail.com> (raw)
In-Reply-To: <20200916205522.8783-1-festevam@gmail.com>

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 <festevam@gmail.com>
---
 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 <linux/init.h>
 #include <linux/err.h>
 #include <linux/io.h>
+#include <linux/of_address.h>
 #include <linux/pinctrl/machine.h>
 
 #include <asm/system_misc.h>
@@ -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)
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-09-16 20:58 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 20:55 [PATCH 00/13] ARM: imx: Further cleanups due to dt-only conversion Fabio Estevam
2020-09-16 20:55 ` [PATCH 01/13] ARM: dts: imx27: Fix the register range for CCM Fabio Estevam
2020-09-16 20:55 ` [PATCH 02/13] ARM: dts: imx27: Add the SYSCTRL description Fabio Estevam
2020-09-16 20:55 ` [PATCH 03/13] ARM: imx27: Retrieve the SYSCTRL base address from devicetree Fabio Estevam
2020-09-16 21:30   ` Arnd Bergmann
2020-09-16 21:36     ` Fabio Estevam
2020-09-16 20:55 ` [PATCH 04/13] ARM: imx27: Retrieve the CCM " Fabio Estevam
2020-09-16 20:55 ` [PATCH 05/13] ARM: imx31: Retrieve the IIM " Fabio Estevam
2020-09-16 20:55 ` Fabio Estevam [this message]
2020-09-16 20:55 ` [PATCH 07/13] ARM: imx3: Retrieve the AVIC " Fabio Estevam
2020-09-16 20:55 ` [PATCH 08/13] ARM: imx35: Retrieve the IIM " Fabio Estevam
2020-09-16 20:55 ` [PATCH 09/13] ARM: imx: Remove unused IO_ADDRESS() macros Fabio Estevam
2020-09-16 21:34   ` Arnd Bergmann
2020-09-16 21:56     ` Fabio Estevam
2020-09-17  7:16       ` Arnd Bergmann
2020-09-17 10:17         ` Fabio Estevam
2020-09-29 13:11         ` Linus Walleij
2020-09-29 13:21           ` Arnd Bergmann
2020-09-30  9:34             ` Linus Walleij
2020-09-16 20:55 ` [PATCH 10/13] clk: imx: imx27: Remove mx27_clocks_init() Fabio Estevam
2020-09-16 20:55 ` [PATCH 11/13] clk: imx: imx31: Remove mx31_clocks_init() Fabio Estevam
2020-09-16 20:55 ` [PATCH 12/13] clk: imx: imx35: Remove mx35_clocks_init() Fabio Estevam
2020-09-16 20:55 ` [PATCH 13/13] clk: imx: imx21: Remove clock driver Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200916205522.8783-7-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=arnd@arndb.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).