aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Estevam2020-09-16 21:41:19 -0300
committerShawn Guo2020-09-22 14:08:08 +0800
commit445cf02cada4b32f95c2bbce3fdaf184ef3ff3ce (patch)
treec58064fb94d6a085d020d824cb29cd3820a5ddfc
parent2cf98d12958cbb52c23e9e613687171dd6e60120 (diff)
ARM: imx3: Retrieve the AVIC base address from devicetree
Now that imx31 and imx35 has been converted to a devicetree-only platform, retrieve the AVIC base address from devicetree. Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r--arch/arm/mach-imx/mm-imx3.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index b7c5e15bb972..5056438e5b42 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -112,7 +112,14 @@ void __init imx31_init_early(void)
void __init mx31_init_irq(void)
{
- mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR));
+ void __iomem *avic_base;
+ struct device_node *np;
+
+ np = of_find_compatible_node(NULL, NULL, "fsl,imx31-avic");
+ avic_base = of_iomap(np, 0);
+ BUG_ON(!avic_base);
+
+ mxc_init_irq(avic_base);
}
#endif /* ifdef CONFIG_SOC_IMX31 */
@@ -154,6 +161,13 @@ void __init imx35_init_early(void)
void __init mx35_init_irq(void)
{
- mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
+ void __iomem *avic_base;
+ struct device_node *np;
+
+ np = of_find_compatible_node(NULL, NULL, "fsl,imx35-avic");
+ avic_base = of_iomap(np, 0);
+ BUG_ON(!avic_base);
+
+ mxc_init_irq(avic_base);
}
#endif /* ifdef CONFIG_SOC_IMX35 */