diff options
Diffstat (limited to 'arch/arm/mach-socfpga/socfpga.c')
-rw-r--r-- | arch/arm/mach-socfpga/socfpga.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c index 6732924a5fee..1042c023cf24 100644 --- a/arch/arm/mach-socfpga/socfpga.c +++ b/arch/arm/mach-socfpga/socfpga.c | |||
@@ -15,12 +15,12 @@ | |||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #include <linux/dw_apb_timer.h> | 17 | #include <linux/dw_apb_timer.h> |
18 | #include <linux/irqchip.h> | ||
18 | #include <linux/of_address.h> | 19 | #include <linux/of_address.h> |
19 | #include <linux/of_irq.h> | 20 | #include <linux/of_irq.h> |
20 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
21 | 22 | ||
22 | #include <asm/hardware/cache-l2x0.h> | 23 | #include <asm/hardware/cache-l2x0.h> |
23 | #include <asm/hardware/gic.h> | ||
24 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
25 | #include <asm/mach/map.h> | 25 | #include <asm/mach/map.h> |
26 | 26 | ||
@@ -29,6 +29,7 @@ | |||
29 | void __iomem *socfpga_scu_base_addr = ((void __iomem *)(SOCFPGA_SCU_VIRT_BASE)); | 29 | void __iomem *socfpga_scu_base_addr = ((void __iomem *)(SOCFPGA_SCU_VIRT_BASE)); |
30 | void __iomem *sys_manager_base_addr; | 30 | void __iomem *sys_manager_base_addr; |
31 | void __iomem *rst_manager_base_addr; | 31 | void __iomem *rst_manager_base_addr; |
32 | unsigned long cpu1start_addr; | ||
32 | 33 | ||
33 | static struct map_desc scu_io_desc __initdata = { | 34 | static struct map_desc scu_io_desc __initdata = { |
34 | .virtual = SOCFPGA_SCU_VIRT_BASE, | 35 | .virtual = SOCFPGA_SCU_VIRT_BASE, |
@@ -62,25 +63,25 @@ static void __init socfpga_map_io(void) | |||
62 | early_printk("Early printk initialized\n"); | 63 | early_printk("Early printk initialized\n"); |
63 | } | 64 | } |
64 | 65 | ||
65 | const static struct of_device_id irq_match[] = { | ||
66 | { .compatible = "arm,cortex-a9-gic", .data = gic_of_init, }, | ||
67 | {} | ||
68 | }; | ||
69 | |||
70 | void __init socfpga_sysmgr_init(void) | 66 | void __init socfpga_sysmgr_init(void) |
71 | { | 67 | { |
72 | struct device_node *np; | 68 | struct device_node *np; |
73 | 69 | ||
74 | np = of_find_compatible_node(NULL, NULL, "altr,sys-mgr"); | 70 | np = of_find_compatible_node(NULL, NULL, "altr,sys-mgr"); |
71 | |||
72 | if (of_property_read_u32(np, "cpu1-start-addr", | ||
73 | (u32 *) &cpu1start_addr)) | ||
74 | pr_err("SMP: Need cpu1-start-addr in device tree.\n"); | ||
75 | |||
75 | sys_manager_base_addr = of_iomap(np, 0); | 76 | sys_manager_base_addr = of_iomap(np, 0); |
76 | 77 | ||
77 | np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr"); | 78 | np = of_find_compatible_node(NULL, NULL, "altr,rst-mgr"); |
78 | rst_manager_base_addr = of_iomap(np, 0); | 79 | rst_manager_base_addr = of_iomap(np, 0); |
79 | } | 80 | } |
80 | 81 | ||
81 | static void __init gic_init_irq(void) | 82 | static void __init socfpga_init_irq(void) |
82 | { | 83 | { |
83 | of_irq_init(irq_match); | 84 | irqchip_init(); |
84 | socfpga_sysmgr_init(); | 85 | socfpga_sysmgr_init(); |
85 | } | 86 | } |
86 | 87 | ||
@@ -98,16 +99,14 @@ static void __init socfpga_cyclone5_init(void) | |||
98 | 99 | ||
99 | static const char *altera_dt_match[] = { | 100 | static const char *altera_dt_match[] = { |
100 | "altr,socfpga", | 101 | "altr,socfpga", |
101 | "altr,socfpga-cyclone5", | ||
102 | NULL | 102 | NULL |
103 | }; | 103 | }; |
104 | 104 | ||
105 | DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA") | 105 | DT_MACHINE_START(SOCFPGA, "Altera SOCFPGA") |
106 | .smp = smp_ops(socfpga_smp_ops), | 106 | .smp = smp_ops(socfpga_smp_ops), |
107 | .map_io = socfpga_map_io, | 107 | .map_io = socfpga_map_io, |
108 | .init_irq = gic_init_irq, | 108 | .init_irq = socfpga_init_irq, |
109 | .handle_irq = gic_handle_irq, | 109 | .init_time = dw_apb_timer_init, |
110 | .timer = &dw_apb_timer, | ||
111 | .init_machine = socfpga_cyclone5_init, | 110 | .init_machine = socfpga_cyclone5_init, |
112 | .restart = socfpga_cyclone5_restart, | 111 | .restart = socfpga_cyclone5_restart, |
113 | .dt_compat = altera_dt_match, | 112 | .dt_compat = altera_dt_match, |