Commit | Line | Data |
---|---|---|
ef4bac55 SH |
1 | /* |
2 | * Copyright 2012 Sascha Hauer, Pengutronix | |
3 | * | |
4 | * The code contained herein is licensed under the GNU General Public | |
5 | * License. You may obtain a copy of the GNU General Public License | |
6 | * Version 2 or later at the following locations: | |
7 | * | |
8 | * http://www.opensource.org/licenses/gpl-license.html | |
9 | * http://www.gnu.org/copyleft/gpl.html | |
10 | */ | |
11 | ||
12 | #include <linux/irq.h> | |
6869a22f | 13 | #include <linux/of_address.h> |
ef4bac55 SH |
14 | #include <linux/of_irq.h> |
15 | #include <linux/of_platform.h> | |
16 | #include <asm/mach/arch.h> | |
17 | #include <asm/mach/time.h> | |
18 | #include "common.h" | |
6869a22f FE |
19 | #include "hardware.h" |
20 | ||
21 | static void __init imx25_init_early(void) | |
22 | { | |
23 | mxc_set_cpu_type(MXC_CPU_MX25); | |
24 | } | |
25 | ||
26 | static void __init mx25_init_irq(void) | |
27 | { | |
28 | struct device_node *np; | |
29 | void __iomem *avic_base; | |
30 | ||
31 | np = of_find_compatible_node(NULL, NULL, "fsl,avic"); | |
32 | avic_base = of_iomap(np, 0); | |
33 | BUG_ON(!avic_base); | |
34 | mxc_init_irq(avic_base); | |
35 | } | |
ef4bac55 | 36 | |
ef4bac55 SH |
37 | static const char * const imx25_dt_board_compat[] __initconst = { |
38 | "fsl,imx25", | |
39 | NULL | |
40 | }; | |
41 | ||
42 | DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)") | |
ef4bac55 | 43 | .init_early = imx25_init_early, |
8c4300c2 | 44 | .init_late = imx25_pm_init, |
ef4bac55 | 45 | .init_irq = mx25_init_irq, |
ef4bac55 | 46 | .dt_compat = imx25_dt_board_compat, |
ef4bac55 | 47 | MACHINE_END |