Skip to content

Commit 445cf02

Browse files
fabioestevamShawn Guo
authored andcommitted
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>
1 parent 2cf98d1 commit 445cf02

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

arch/arm/mach-imx/mm-imx3.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,14 @@ void __init imx31_init_early(void)
112112

113113
void __init mx31_init_irq(void)
114114
{
115-
mxc_init_irq(MX31_IO_ADDRESS(MX31_AVIC_BASE_ADDR));
115+
void __iomem *avic_base;
116+
struct device_node *np;
117+
118+
np = of_find_compatible_node(NULL, NULL, "fsl,imx31-avic");
119+
avic_base = of_iomap(np, 0);
120+
BUG_ON(!avic_base);
121+
122+
mxc_init_irq(avic_base);
116123
}
117124
#endif /* ifdef CONFIG_SOC_IMX31 */
118125

@@ -154,6 +161,13 @@ void __init imx35_init_early(void)
154161

155162
void __init mx35_init_irq(void)
156163
{
157-
mxc_init_irq(MX35_IO_ADDRESS(MX35_AVIC_BASE_ADDR));
164+
void __iomem *avic_base;
165+
struct device_node *np;
166+
167+
np = of_find_compatible_node(NULL, NULL, "fsl,imx35-avic");
168+
avic_base = of_iomap(np, 0);
169+
BUG_ON(!avic_base);
170+
171+
mxc_init_irq(avic_base);
158172
}
159173
#endif /* ifdef CONFIG_SOC_IMX35 */

0 commit comments

Comments
 (0)