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>
This commit is contained in:
Fabio Estevam 2020-09-11 09:40:29 -03:00 committed by Shawn Guo
parent 86fa07075c
commit fc673fbf8c
1 changed files with 8 additions and 1 deletions

View File

@ -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 = {