ARM: socfpga: Initialize Arria10 OCRAM ECC on startup
Initialize ECC for Arria10 On-Chip RAM on machine startup. The OCRAM
memory must be initialized before data is stored in memory otherwise the
ECC will fail on reads. The previous check-in
2364d423a7
("ARM: socfpga: Enable Arria10 OCRAM ECC on startup")
added the OCRAM enable and initialization code but was not called on
startup.
Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
Acked-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1460394094-23326-1-git-send-email-tthayer@opensource.altera.com
Signed-off-by: Borislav Petkov <bp@suse.de>
This commit is contained in:
parent
993f88f1cc
commit
c5fb04cc96
|
@ -39,6 +39,7 @@ extern void socfpga_sysmgr_init(void);
|
||||||
void socfpga_init_l2_ecc(void);
|
void socfpga_init_l2_ecc(void);
|
||||||
void socfpga_init_ocram_ecc(void);
|
void socfpga_init_ocram_ecc(void);
|
||||||
void socfpga_init_arria10_l2_ecc(void);
|
void socfpga_init_arria10_l2_ecc(void);
|
||||||
|
void socfpga_init_arria10_ocram_ecc(void);
|
||||||
|
|
||||||
extern void __iomem *sys_manager_base_addr;
|
extern void __iomem *sys_manager_base_addr;
|
||||||
extern void __iomem *rst_manager_base_addr;
|
extern void __iomem *rst_manager_base_addr;
|
||||||
|
|
|
@ -72,6 +72,8 @@ static void __init socfpga_arria10_init_irq(void)
|
||||||
socfpga_sysmgr_init();
|
socfpga_sysmgr_init();
|
||||||
if (IS_ENABLED(CONFIG_EDAC_ALTERA_L2C))
|
if (IS_ENABLED(CONFIG_EDAC_ALTERA_L2C))
|
||||||
socfpga_init_arria10_l2_ecc();
|
socfpga_init_arria10_l2_ecc();
|
||||||
|
if (IS_ENABLED(CONFIG_EDAC_ALTERA_OCRAM))
|
||||||
|
socfpga_init_arria10_ocram_ecc();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)
|
static void socfpga_cyclone5_restart(enum reboot_mode mode, const char *cmd)
|
||||||
|
|
Loading…
Reference in New Issue