diff options
author | Fabio Estevam <festevam@gmail.com> | 2020-09-11 15:40:29 +0300 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2020-09-13 06:15:48 +0300 |
commit | fc673fbf8cc16f496b9a2d2ae65aab15beb5e3b8 (patch) | |
tree | 1b4ce67bd1b2f58ca20eeec5bbe3af703e771cd9 /arch/arm/mach-imx | |
parent | 86fa07075cf3f9bd15ac7aa0a18915f26a442ce8 (diff) | |
download | linux-fc673fbf8cc16f496b9a2d2ae65aab15beb5e3b8.tar.xz |
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 <festevam@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/mach-imx27.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/mach-imx27.c b/arch/arm/mach-imx/mach-imx27.c index 2d981d1eafbf..84396ccf23f2 100644 --- a/arch/arm/mach-imx/mach-imx27.c +++ b/arch/arm/mach-imx/mach-imx27.c @@ -5,6 +5,7 @@ #include <linux/init.h> #include <linux/irq.h> +#include <linux/of_address.h> #include <linux/of_irq.h> #include <linux/of_platform.h> #include <linux/mm.h> @@ -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 = { |