diff options
author | Thor Thayer <thor.thayer@linux.intel.com> | 2018-09-25 08:49:01 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2018-09-25 21:22:20 +0200 |
commit | 064acbd4f4ab509dd3f31e1a2d1e04a43d5b1009 (patch) | |
tree | 910c83819a536732a25246e2bdea4c3f76319d82 /drivers/edac/altera_edac.h | |
parent | 08f08bfb7b4cc7b7037c8818acb1b6abccf2bd0e (diff) | |
download | linux-064acbd4f4ab509dd3f31e1a2d1e04a43d5b1009.tar.gz linux-064acbd4f4ab509dd3f31e1a2d1e04a43d5b1009.tar.bz2 linux-064acbd4f4ab509dd3f31e1a2d1e04a43d5b1009.zip |
EDAC, altera: Add Stratix10 peripheral support
Add a new peripheral ECC error injection algorithm for Stratix10 and
some Arria10 peripherals. Inject a single bit error and upon readback,
it will be corrected and the SBE IRQ handler will be called.
Add regmap selection for Stratix10 or Arria10 peripheral device memory
initialization.
Add checks for both Arria10 and Stratix10 to the peripheral ECC setup.
Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: dinguyen@kernel.org
Cc: robh+dt@kernel.org
Cc: mark.rutland@arm.com
Cc: mchehab@kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-edac@vger.kernel.org
Link: https://lkml.kernel.org/r/1537883342-30180-6-git-send-email-thor.thayer@linux.intel.com
Diffstat (limited to 'drivers/edac/altera_edac.h')
-rw-r--r-- | drivers/edac/altera_edac.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/edac/altera_edac.h b/drivers/edac/altera_edac.h index e9e3f9b61947..4213cb0bb2a7 100644 --- a/drivers/edac/altera_edac.h +++ b/drivers/edac/altera_edac.h @@ -300,6 +300,31 @@ struct altr_sdram_mc_data { #define S10_DDR0_IRQ_MASK BIT(16) +/* Define ECC Block Offsets for peripherals */ +#define ECC_BLK_ADDRESS_OFST 0x40 +#define ECC_BLK_RDATA0_OFST 0x44 +#define ECC_BLK_RDATA1_OFST 0x48 +#define ECC_BLK_RDATA2_OFST 0x4C +#define ECC_BLK_RDATA3_OFST 0x50 +#define ECC_BLK_WDATA0_OFST 0x54 +#define ECC_BLK_WDATA1_OFST 0x58 +#define ECC_BLK_WDATA2_OFST 0x5C +#define ECC_BLK_WDATA3_OFST 0x60 +#define ECC_BLK_RECC0_OFST 0x64 +#define ECC_BLK_RECC1_OFST 0x68 +#define ECC_BLK_WECC0_OFST 0x6C +#define ECC_BLK_WECC1_OFST 0x70 +#define ECC_BLK_DBYTECTRL_OFST 0x74 +#define ECC_BLK_ACCCTRL_OFST 0x78 +#define ECC_BLK_STARTACC_OFST 0x7C + +#define ECC_XACT_KICK 0x10000 +#define ECC_WORD_WRITE 0xF +#define ECC_WRITE_DOVR 0x101 +#define ECC_WRITE_EDOVR 0x103 +#define ECC_READ_EOVR 0x2 +#define ECC_READ_EDOVR 0x3 + struct altr_edac_device_dev; struct edac_device_prv_data { |