提交 27439a1a 编写于 作者: T Thor Thayer 提交者: Borislav Petkov

EDAC, altera: Abstract ECC Enable Mask in check_deps()

In preparation for the Arria10 peripheral ECCs, use the ECC Enable mask
in place of hard coded masks in the check dependency functions.
Signed-off-by: NThor Thayer <tthayer@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-5-git-send-email-tthayer@opensource.altera.comSigned-off-by: NBorislav Petkov <bp@suse.de>
上级 328ca7ae
...@@ -859,7 +859,9 @@ static void ocram_free_mem(void *p, size_t size, void *other) ...@@ -859,7 +859,9 @@ static void ocram_free_mem(void *p, size_t size, void *other)
static int altr_ocram_check_deps(struct altr_edac_device_dev *device) static int altr_ocram_check_deps(struct altr_edac_device_dev *device)
{ {
void __iomem *base = device->base; void __iomem *base = device->base;
if (readl(base) & ALTR_OCR_ECC_EN) const struct edac_device_prv_data *prv = device->data;
if (readl(base) & prv->ecc_enable_mask)
return 0; return 0;
edac_printk(KERN_ERR, EDAC_DEVICE, edac_printk(KERN_ERR, EDAC_DEVICE,
...@@ -926,7 +928,10 @@ static void l2_free_mem(void *p, size_t size, void *other) ...@@ -926,7 +928,10 @@ static void l2_free_mem(void *p, size_t size, void *other)
static int altr_l2_check_deps(struct altr_edac_device_dev *device) static int altr_l2_check_deps(struct altr_edac_device_dev *device)
{ {
void __iomem *base = device->base; void __iomem *base = device->base;
if (readl(base) & ALTR_L2_ECC_EN) const struct edac_device_prv_data *prv = device->data;
if ((readl(base) & prv->ecc_enable_mask) ==
prv->ecc_enable_mask)
return 0; return 0;
edac_printk(KERN_ERR, EDAC_DEVICE, edac_printk(KERN_ERR, EDAC_DEVICE,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册