aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-socfpga/socfpga.c
diff options
context:
space:
mode:
authorThor Thayer <tthayer@opensource.altera.com>2016-03-21 12:01:45 -0400
committerBorislav Petkov <bp@suse.de>2016-03-29 04:42:34 -0400
commitff6fd1478c531a40279cf013227279f31ff90b41 (patch)
tree765a59dc03cb9a44d0fbd8a03ebacab4e45d637e /arch/arm/mach-socfpga/socfpga.c
parent588cb03ea208b303e6dee7e916f329043fd0fc26 (diff)
ARM: socfpga: Enable Arria10 L2 cache ECC on startup
Enable ECC for Arria10 L2 cache on machine startup. The ECC has to be enabled before data is stored in memory otherwise the ECC will fail on reads. Use DT_MACHINE to select Arria10 L2 cache function. Signed-off-by: Thor Thayer <tthayer@opensource.altera.com> Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com> Cc: devicetree@vger.kernel.org Cc: dinguyen@opensource.altera.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux@arm.linux.org.uk Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1458576106-24505-9-git-send-email-tthayer@opensource.altera.com Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/arm/mach-socfpga/socfpga.c')
-rw-r--r--arch/arm/mach-socfpga/socfpga.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/arm/mach-socfpga/socfpga.c b/arch/arm/mach-socfpga/socfpga.c
index 7e0aad2ec3d1..e9b5b603df4b 100644
--- a/arch/arm/mach-socfpga/socfpga.c
+++ b/arch/arm/mach-socfpga/socfpga.c
@@ -66,6 +66,14 @@ static void __init socfpga_init_irq(void)
66 socfpga_init_ocram_ecc(); 66 socfpga_init_ocram_ecc();
67} 67}
68 68
69static void __init socfpga_arria10_init_irq(void)
70{
71 irqchip_init();
72 socfpga_sysmgr_init();
73 if (IS_ENABLED(CONFIG_EDAC_ALTERA_L2C))
74 socfpga_init_arria10_l2_ecc();
75}
76
69static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd) 77static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)
70{ 78{
71 u32 temp; 79 u32 temp;
@@ -113,7 +121,7 @@ static const char *altera_a10_dt_match[] = {
113DT_MACHINE_START(SOCFPGA_A10, "Altera SOCFPGA Arria10") 121DT_MACHINE_START(SOCFPGA_A10, "Altera SOCFPGA Arria10")
114 .l2c_aux_val = 0, 122 .l2c_aux_val = 0,
115 .l2c_aux_mask = ~0, 123 .l2c_aux_mask = ~0,
116 .init_irq = socfpga_init_irq, 124 .init_irq = socfpga_arria10_init_irq,
117 .restart = socfpga_arria10_restart, 125 .restart = socfpga_arria10_restart,
118 .dt_compat = altera_a10_dt_match, 126 .dt_compat = altera_a10_dt_match,
119MACHINE_END 127MACHINE_END