EDAC/altera: Add Stratix10 SDMMC support
Add SDMMC support for Stratix10 which has IRQ differences from Arria10. Update comment accordingly. Signed-off-by: Thor Thayer <thor.thayer@linux.intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: devicetree@vger.kernel.org Cc: dinguyen@kernel.org Cc: James Morse <james.morse@arm.com> Cc: linux-edac <linux-edac@vger.kernel.org> Cc: mark.rutland@arm.com Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: robh+dt@kernel.org Link: https://lkml.kernel.org/r/1556030197-24534-4-git-send-email-thor.thayer@linux.intel.com
This commit is contained in:
parent
3c4fcb89db
commit
a428b4d348
|
@ -1583,8 +1583,12 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
|
||||||
dci->mod_name = ecc_name;
|
dci->mod_name = ecc_name;
|
||||||
dci->dev_name = ecc_name;
|
dci->dev_name = ecc_name;
|
||||||
|
|
||||||
/* Update the IRQs for PortB */
|
/* Update the PortB IRQs - A10 has 4, S10 has 2, Index accordingly */
|
||||||
|
#ifdef CONFIG_ARCH_STRATIX10
|
||||||
|
altdev->sb_irq = irq_of_parse_and_map(np, 1);
|
||||||
|
#else
|
||||||
altdev->sb_irq = irq_of_parse_and_map(np, 2);
|
altdev->sb_irq = irq_of_parse_and_map(np, 2);
|
||||||
|
#endif
|
||||||
if (!altdev->sb_irq) {
|
if (!altdev->sb_irq) {
|
||||||
edac_printk(KERN_ERR, EDAC_DEVICE, "Error PortB SBIRQ alloc\n");
|
edac_printk(KERN_ERR, EDAC_DEVICE, "Error PortB SBIRQ alloc\n");
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
|
@ -1599,6 +1603,15 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
|
||||||
goto err_release_group_1;
|
goto err_release_group_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARCH_STRATIX10
|
||||||
|
/* Use IRQ to determine SError origin instead of assigning IRQ */
|
||||||
|
rc = of_property_read_u32_index(np, "interrupts", 1, &altdev->db_irq);
|
||||||
|
if (rc) {
|
||||||
|
edac_printk(KERN_ERR, EDAC_DEVICE,
|
||||||
|
"Error PortB DBIRQ alloc\n");
|
||||||
|
goto err_release_group_1;
|
||||||
|
}
|
||||||
|
#else
|
||||||
altdev->db_irq = irq_of_parse_and_map(np, 3);
|
altdev->db_irq = irq_of_parse_and_map(np, 3);
|
||||||
if (!altdev->db_irq) {
|
if (!altdev->db_irq) {
|
||||||
edac_printk(KERN_ERR, EDAC_DEVICE, "Error PortB DBIRQ alloc\n");
|
edac_printk(KERN_ERR, EDAC_DEVICE, "Error PortB DBIRQ alloc\n");
|
||||||
|
@ -1613,6 +1626,7 @@ static int altr_portb_setup(struct altr_edac_device_dev *device)
|
||||||
edac_printk(KERN_ERR, EDAC_DEVICE, "PortB DBERR IRQ error\n");
|
edac_printk(KERN_ERR, EDAC_DEVICE, "PortB DBERR IRQ error\n");
|
||||||
goto err_release_group_1;
|
goto err_release_group_1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
rc = edac_device_add_device(dci);
|
rc = edac_device_add_device(dci);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
|
|
Loading…
Reference in New Issue