From: Fabio Estevam Date: Fri, 11 Sep 2020 12:40:29 +0000 (-0300) Subject: ARM: imx27: Retrieve AVIC base address from devicetree X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fc673fbf8cc16f496b9a2d2ae65aab15beb5e3b8;p=linux.git ARM: imx27: Retrieve AVIC base address from devicetree Now that imx27 has been converted to a devicetree-only platform, retrieve the AVIC base address from devicetree. Signed-off-by: Fabio Estevam Acked-by: Arnd Bergmann Signed-off-by: Shawn Guo --- diff --git a/arch/arm/mach-imx/mach-imx27.c b/arch/arm/mach-imx/mach-imx27.c index 2d981d1eafbf7..84396ccf23f28 100644 --- a/arch/arm/mach-imx/mach-imx27.c +++ b/arch/arm/mach-imx/mach-imx27.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -58,7 +59,13 @@ static void __init imx27_init_early(void) static void __init mx27_init_irq(void) { - mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR)); + void __iomem *avic_base; + struct device_node *np; + + np = of_find_compatible_node(NULL, NULL, "fsl,avic"); + avic_base = of_iomap(np, 0); + BUG_ON(!avic_base); + mxc_init_irq(avic_base); } static const char * const imx27_dt_board_compat[] __initconst = {