aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/cavium-octeon/setup.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2012-10-16 18:39:09 -0400
committerRalf Baechle <ralf@linux-mips.org>2012-12-12 10:48:49 -0500
commitf65aad41772f6a0022e9763fe06f47604449964c (patch)
tree701d6ea74ac0c41f008c5554d876945fe4caf512 /arch/mips/cavium-octeon/setup.c
parentaa1762f49c81a14d0453e4f67f922e4f155510a3 (diff)
MIPS: Cavium: Add EDAC support.
Drivers for EDAC on Cavium. Supported subsystems are: o CPU primary caches. These are parity protected only, so only error reporting. o Second level cache - ECC protected, provides SECDED. o Memory: ECC / SECDEC if used with suitable DRAM modules. The driver will will only initialize if ECC is enabled on a system so is safe to run on non-ECC memory. o PCI: Parity error reporting Since it is very hard to test this sort of code the implementation is very conservative and uses polling where possible for now. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Reviewed-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'arch/mips/cavium-octeon/setup.c')
-rw-r--r--arch/mips/cavium-octeon/setup.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
index 04dd8ff0e0d8..60ed700a956d 100644
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -4,9 +4,11 @@
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 2004-2007 Cavium Networks 6 * Copyright (C) 2004-2007 Cavium Networks
7 * Copyright (C) 2008 Wind River Systems 7 * Copyright (C) 2008, 2009 Wind River Systems
8 * written by Ralf Baechle <ralf@linux-mips.org>
8 */ 9 */
9#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/kernel.h>
10#include <linux/console.h> 12#include <linux/console.h>
11#include <linux/delay.h> 13#include <linux/delay.h>
12#include <linux/export.h> 14#include <linux/export.h>
@@ -821,3 +823,29 @@ void __init device_tree_init(void)
821 } 823 }
822 unflatten_device_tree(); 824 unflatten_device_tree();
823} 825}
826
827static char *edac_device_names[] = {
828 "co_l2c_edac",
829 "co_lmc_edac",
830 "co_pc_edac",
831};
832
833static int __init edac_devinit(void)
834{
835 struct platform_device *dev;
836 int i, err = 0;
837 char *name;
838
839 for (i = 0; i < ARRAY_SIZE(edac_device_names); i++) {
840 name = edac_device_names[i];
841 dev = platform_device_register_simple(name, -1, NULL, 0);
842 if (IS_ERR(dev)) {
843 pr_err("Registation of %s failed!\n", name);
844 err = PTR_ERR(dev);
845 }
846 }
847
848 return err;
849}
850
851device_initcall(edac_devinit);