Skip to content

Commit e5ef4cd

Browse files
rabarabp3tk0v
authored andcommitted
EDAC/altera: Use correct write width with the INTTEST register
On the SoCFPGA platform, the INTTEST register supports only 16-bit writes. A 32-bit write triggers an SError to the CPU so do 16-bit accesses only. [ bp: AI-massage the commit message. ] Fixes: c7b4be8 ("EDAC, altera: Add Arria10 OCRAM ECC support") Signed-off-by: Niravkumar L Rabara <[email protected]> Signed-off-by: Matthew Gerlach <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Acked-by: Dinh Nguyen <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/[email protected]
1 parent ada1b04 commit e5ef4cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/edac/altera_edac.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,9 +1746,9 @@ altr_edac_a10_device_trig(struct file *file, const char __user *user_buf,
17461746

17471747
local_irq_save(flags);
17481748
if (trig_type == ALTR_UE_TRIGGER_CHAR)
1749-
writel(priv->ue_set_mask, set_addr);
1749+
writew(priv->ue_set_mask, set_addr);
17501750
else
1751-
writel(priv->ce_set_mask, set_addr);
1751+
writew(priv->ce_set_mask, set_addr);
17521752

17531753
/* Ensure the interrupt test bits are set */
17541754
wmb();
@@ -1778,7 +1778,7 @@ altr_edac_a10_device_trig2(struct file *file, const char __user *user_buf,
17781778

17791779
local_irq_save(flags);
17801780
if (trig_type == ALTR_UE_TRIGGER_CHAR) {
1781-
writel(priv->ue_set_mask, set_addr);
1781+
writew(priv->ue_set_mask, set_addr);
17821782
} else {
17831783
/* Setup read/write of 4 bytes */
17841784
writel(ECC_WORD_WRITE, drvdata->base + ECC_BLK_DBYTECTRL_OFST);

0 commit comments

Comments
 (0)