Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758126AbcCaSoY (ORCPT ); Thu, 31 Mar 2016 14:44:24 -0400 Received: from mail-bn1bon0094.outbound.protection.outlook.com ([157.56.111.94]:4701 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758015AbcCaSoN (ORCPT ); Thu, 31 Mar 2016 14:44:13 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.227) smtp.mailfrom=opensource.altera.com; vger.kernel.org; dkim=pass (signature was verified) header.d=altera.onmicrosoft.com;vger.kernel.org; dmarc=none action=none header.from=opensource.altera.com; Authentication-Results: alien8.de; dkim=none (message not signed) header.d=none;alien8.de; dmarc=none action=none header.from=opensource.altera.com; From: To: , , , , , , , , , , CC: , , , , , Subject: [PATCHv2 5/7] EDAC, altera: Addition of Arria10 OCRAM ECC Date: Thu, 31 Mar 2016 13:48:05 -0500 Message-ID: <1459450087-24792-6-git-send-email-tthayer@opensource.altera.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1459450087-24792-1-git-send-email-tthayer@opensource.altera.com> References: <1459450087-24792-1-git-send-email-tthayer@opensource.altera.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: CY1PR0601CA0035.namprd06.prod.outlook.com (10.160.162.45) To BY1PR03MB1483.namprd03.prod.outlook.com (10.162.210.141) X-MS-Office365-Filtering-Correlation-Id: 8fc1b92b-66eb-4664-e4e2-08d359947236 X-Microsoft-Exchange-Diagnostics-untrusted: 1;BY1PR03MB1483;2:b/V2RJHPxz7p0XOPQTnRUdMa+TwdB5i31JA+/pfCb35gKQqRvwTdqDAiHJMUZhPz5nRq4aEXnKNMmfLetNaUzSEdjhtC0YzJAyJ7sn6xg8BGIzHneuTBMN4jA7xXAa54pkVFNr5DN+zUcXp5RsWciJ8xwNiDgXpkjGM/JUlyGQCyo9/2UvleLNsJzDjFiFLv;3:ZMNOceSDXRbpfI38carskG2WouyHcVtoF5EFGhX5LE7B5shJP3wRnQyNi0N4bTNkEdVeLTtY3NjDnUE6LvmSMTvPq7bNXbYPQ5z9zOy39O/RtWfNeid4kDvJ22idZf+M;25:AWHiMRAxfvWjfh8kBBbzux4teF3lLyI3e0C2bu9N741BiLedl9y98pE0yal5q4kyj2HXaq46OTSfAWfg9/bIRvmBXvilpF3LTmdQ3FHZ3kjvQ0QMKfQ07Zec8/lUzWleJjpeHj+HHNufGXN2ZCpOo4q6h8gpZ7H2CM/e3Gwye04r6wgZ2EU4imyg8NM3+yxldq5CqxPYOuyZJcE2/Rkng9un1Ik3jNTVNCE7N18BpIQnh9XOpB3nP25czzVv14bfSGQlFJb1veulR55AfuVMzORWP5paYo263DXOltuCjUtbMx81zIR0LAdyOvHI4jFXD4EEzzdj1VftX1/njOueZ3kFLQxHbvKes2t+eECgn1o=;20:N8QOhVpoihQCTG7ad2xDkJxWfWdfK2fPJjWNgo4siGPkpIdzSYM+xopXnsirDWZTrDPRNWeR7dmTVzNBu57bGa77G5jDEN3iCYh+aO3KHxYZWoA1UoxWAX12wjWGIqZGWMKUtxoJSKDmHXsm2BrrTgmS37FVUAJT1vyjfRXAqiQ= X-Microsoft-Antispam-Untrusted: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1483; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001);SRVR:BY1PR03MB1483;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1483;BCL:0;PCL:0;RULEID:(601004)(2401047)(13023025)(13018025)(5005006)(13017025)(13024025)(8121501046)(13015025)(3002001)(10201501046);SRVR:BY1PR0301MB1288;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0301MB1288; X-Microsoft-Exchange-Diagnostics-untrusted: 1;BY1PR03MB1483;4:KyCjHyNLESW8iRDJMwmiDXAWsarjWFUS3DEx8cObSwDf6oTG2UYGrEFR4w4Nzc5JshVlPXJtfqtJDBdSNdwzKptQNg/9bHeIsScWbGw29KXkjf0HOEHBmLhl9NLsf3JA7ecOtMctLKwug3DMn1rGhMF5qtidUfW6FQQEg72bBERTqaR+tIuTZr71mAmE7iDJWqNBaprbNSx8Veob+RF7GE7/vKtZP/xwEWKQmo+jMJAhgiurwJ2NSRDd0FsSmMPTUNbDeLa8VSluR8TuBQ3SzT17pyw7i4oPt7touAHGuKF/CrkhtK5N1lpjWqKnDtR2vmyYWjja80pVqhxtGljti09r9ynO1NJKvixS/IYafPBcRWwIhUDVL4MXhpCpYolG X-Forefront-PRVS: 0898A6E028 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(66066001)(19580405001)(19580395003)(5003940100001)(575784001)(5004730100002)(189998001)(2950100001)(33646002)(107886002)(48376002)(42186005)(47776003)(86152002)(229853001)(5001770100001)(50466002)(2201001)(4326007)(92566002)(2906002)(50986999)(81166005)(1096002)(76176999)(50226001)(586003)(3846002)(6116002)(77096005)(86362001)(4001430100002)(2876002)(5008740100001)(921003)(1121003)(4720700001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR03MB1483;H:tthayer-HP-Z620-Ubuntu.137.57.187.33;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1;BY1PR03MB1483;23:iCIPFQd/ZKurSnAuV9C/sX2ZI7PtfEaceWlVWTnBZ?= =?us-ascii?Q?lMJMypgz0ascwtPMOJgvQ4CgzXBYLCljZRJG78UfntQf8IwgrMCOBPIIQiSc?= =?us-ascii?Q?MY8Q/s6MG/1N1FnMVv1/GTAeWRebbtkzG/vSjtH2lpY+iJ4Mmad/ClEm6FPf?= =?us-ascii?Q?j1yiC//3LQWXI0h5lZ/ewHCZoSZ4XMpjBnGi1cRN5QVFCRoT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microsoft-Exchange-Diagnostics-untrusted: 1;BY1PR03MB1483;5:oRrlEZeDx7ewzXUd4cMjHB/xI3paowyPSmcn57LR+vMSPDcBPGZ+UpbzOvQmUHTWs2+tvZSQ6debyzTmMCDMb9NID+ojKVT2/4j0ES+xmeCIuO/YfL8gTk6TbqMm+B6VFX8PbJ0lw3oQybCKl0R9bw==;24:blU2RyxR/r3BjGtu8rjMCoG8jcCMzxINCncEcBtz5CuDAnxnns8rHI1L1cB9eSI0JXXjlsI88UCmteG+kgKxHbUlFatCGG266M39LzlXrz8=;20:Hx6rQ48BnKZ37Ml6afdQ6iMTL98KxKw/SsF5m/MHIC21M0q+gLwYKNtKS/x9dG9+CJyTCK7LDXL1HsV08/QQdZGj8fUTP+6lfqNwELJmVySsHzYqIRXhF1CMxVtkvgXrC91fjiL7VZt+uyHuzaNe63TDMrRrboukFVLOkMymwT4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1483 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1BFFO11FD001.protection.gbl X-Forefront-Antispam-Report: CIP:66.35.236.227;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(19580405001)(2876002)(3846002)(21840400001)(4326007)(5004730100002)(2201001)(86152002)(6116002)(50986999)(2950100001)(586003)(87936001)(86362001)(77096005)(1220700001)(1096002)(575784001)(81166005)(19580395003)(229853001)(85426001)(106466001)(76176999)(5003940100001)(105606002)(189998001)(5001770100001)(33646002)(4001430100002)(3720700001)(50226001)(50466002)(48376002)(16796002)(92566002)(107886002)(11100500001)(6806005)(956001)(66066001)(47776003)(2906002)(5008740100001)(7099028)(921003)(1121003)(4720700001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0301MB1288;H:sj-itexedge03.altera.priv.altera.com;FPR:;SPF:Fail;MLV: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+vIa X-DkimResult-Test: Passed X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(3001016);SRVR:BY1PR0301MB1288; X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1288;25:/xiNPKwJm0xSLrHgYpcTMJmngyGLOD8jMn/7lYJ6RAr4dYxyvnbtw+W+U8fdr+kKnvCqhQtalPHUXR+Th/8H6rcI0/LwUOXoXCy4GfPjtah1F+3qCKGKeryPQWQmiG4UsoX8yPUaM7dSAJWXk2dThiVYPrQFPm8LGa0tjtl8JkymNul7JXZDc+EZvkuMLC0ygYGqGjZisBhzcFdEakm8BCRGv2yzczdHG+odC/48kuAkM6+uQ3xt8zGHlW+ePz7r+jT4LNAqCUHGucXoEbS9p5wkH4Fp2gufGOGsJ8EcoAbUq0nOYIY3YcjKnntEtc+Ls6yh89P+Vi7y+RIWDMG01KKPz4efMlw6oFqw36eF0Ta1WxDVCTloT+6z6XGymLBqKQfyLC1of9tOEd5qAIGtwC7VNdc4ReJP+RoI/gMKU+COnIMU6uuttjTl0Hh5iscvBWKSR4cLXVlgCV5QV2l4ZzIrIJNKFdHbcumJJPcL6YtiNicX5Ijl1bVgm1h1vsff5NY6Z2g84MkfsZ+N2wRXJELYeooSsIWe+wFrE3RoRQyNKnF7iGlmUggTlL+vrO9Q7+viUCBOtyFGxyxtQcAEfudj9LdrvudbFa63MN4d+Uw=;20:Fg3nlMD+SoXQQMMOvhZa0rAH4F86jW14zUpeMDzXUp8NriNA5m5gyG6nx15doM0isTgv9WI1VsDnay04uf9v0aYbiUhzCosXatL8t+rX8tKnvwfAdt3Rx7vthHJ3UtKygekPNNIb7nvubSNbPbuXZMzV4qnWXbtKEAiB5/RO/78= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1288;4:ppTUkRXH8xESlKDjY/wEBQAwjGnTc48tl7cWtdsw6iMpY+gfwida6fYafTgyBdjYvSk0MWlH/frLm85hrv/o1rvfVLIxhcFnAyVVbVaHvwpauy9eSZIMpEVkD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pA?= X-Microsoft-Exchange-Diagnostics: 1;BY1PR0301MB1288;5:UbqMjn/7NILPsTkzY0hVO+JHcnQa3JsAvgJ2FDOfVlAgL/tizNEip/lcsTwjrqGwXbIHzPkuDeC0uXLQLBxMvkxZjgK6o4zHUwoPd3PKnPWFEbcRfHpBDIPL14oVUpmZufmc2PNZI9cg3D4Wt7dRSA==;24:d2OXWUeQYp9KNudQ6huyP9P5FMtkqd/iiWt0Ncp3tgia8LRcCG6PWYhRp/jDR3ee+EBm0WeHe4QSpcRRWSkaDzVidgKNEsdkUph4lAN9RJI=;20:mrnOK5xl4BUZqS9yolQ7wWSH7CU+uCFvxDCafCAOdGKTi1CrA73o79IHWh4iKfPXF4FO55hx7Be/eXquUyQXj+3b3zYe7tkBJxDdFzVPD41/5YedZfT+pAfgHHAq/qrxXRN8Nwb14OQGpXYfe0WFoXyBdS/LRzogR/biRTolWbs= X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2016 18:44:09.0767 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a;Ip=[66.35.236.227];Helo=[sj-itexedge03.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0301MB1288 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6867 Lines: 197 From: Thor Thayer Addition of the Arria10 On-Chip RAM ECC handling. Addition of private data structure for Arria10 OCRAM ECC. Addition of a new file operations function and trigger function for Arria10 OCRAM and other peripheral memories. Signed-off-by: Thor Thayer --- v2: Remove the Arria10 ECC block init functions. --- drivers/edac/altera_edac.c | 78 ++++++++++++++++++++++++++++++++++++++++++++ drivers/edac/altera_edac.h | 35 ++++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index f7ffc77..11775dc 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -550,6 +550,7 @@ module_platform_driver(altr_edac_driver); const struct edac_device_prv_data ocramecc_data; const struct edac_device_prv_data l2ecc_data; +const struct edac_device_prv_data a10_ocramecc_data; const struct edac_device_prv_data a10_l2ecc_data; static irqreturn_t altr_edac_device_handler(int irq, void *dev_id) @@ -674,6 +675,16 @@ static const struct file_operations altr_edac_device_inject_fops = { .llseek = generic_file_llseek, }; +static ssize_t altr_edac_a10_device_trig(struct file *file, + const char __user *user_buf, + size_t count, loff_t *ppos); + +static const struct file_operations altr_edac_a10_device_inject_fops = { + .open = simple_open, + .write = altr_edac_a10_device_trig, + .llseek = generic_file_llseek, +}; + static void altr_create_edacdev_dbgfs(struct edac_device_ctl_info *edac_dci, const struct edac_device_prv_data *priv) { @@ -701,6 +712,8 @@ static const struct of_device_id altr_edac_device_of_match[] = { #ifdef CONFIG_EDAC_ALTERA_OCRAM { .compatible = "altr,socfpga-ocram-ecc", .data = (void *)&ocramecc_data }, + { .compatible = "altr,socfpga-a10-ocram-ecc", + .data = (void *)&a10_ocramecc_data }, #endif {}, }; @@ -889,6 +902,24 @@ const struct edac_device_prv_data ocramecc_data = { .inject_fops = &altr_edac_device_inject_fops, }; +static irqreturn_t altr_edac_a10_ecc_irq(struct altr_edac_device_dev *dci, + bool sberr); + +const struct edac_device_prv_data a10_ocramecc_data = { + .setup = altr_check_ecc_deps, + .ce_clear_mask = ALTR_A10_ECC_SERRPENA, + .ue_clear_mask = ALTR_A10_ECC_DERRPENA, + .irq_status_mask = A10_SYSMGR_ECC_INTSTAT_OCRAM, + .dbgfs_name = "altr_ocram_trigger", + .ecc_enable_mask = ALTR_A10_OCRAM_ECC_EN_CTL, + .ecc_en_ofst = ALTR_A10_ECC_CTRL_OFST, + .ce_set_mask = ALTR_A10_ECC_TSERRA, + .ue_set_mask = ALTR_A10_ECC_TDERRA, + .set_err_ofst = ALTR_A10_ECC_INTTEST_OFST, + .ecc_irq_handler = altr_edac_a10_ecc_irq, + .inject_fops = &altr_edac_a10_device_inject_fops, +}; + #endif /* CONFIG_EDAC_ALTERA_OCRAM */ /********************* L2 Cache EDAC Device Functions ********************/ @@ -1007,6 +1038,50 @@ const struct edac_device_prv_data a10_l2ecc_data = { * Based on xgene_edac.c peripheral code. */ +static ssize_t altr_edac_a10_device_trig(struct file *file, + const char __user *user_buf, + size_t count, loff_t *ppos) +{ + struct edac_device_ctl_info *edac_dci = file->private_data; + struct altr_edac_device_dev *drvdata = edac_dci->pvt_info; + const struct edac_device_prv_data *priv = drvdata->data; + void __iomem *set_addr = (drvdata->base + priv->set_err_ofst); + unsigned long flags; + u8 trig_type; + + if (!user_buf || get_user(trig_type, user_buf)) + return -EFAULT; + + local_irq_save(flags); + if (trig_type == ALTR_UE_TRIGGER_CHAR) + writel(priv->ue_set_mask, set_addr); + else + writel(priv->ce_set_mask, set_addr); + /* Ensure the interrupt test bits are set */ + wmb(); + local_irq_restore(flags); + + return count; +} + +static irqreturn_t altr_edac_a10_ecc_irq(struct altr_edac_device_dev *dci, + bool sberr) +{ + void __iomem *base = dci->base; + + if (sberr) { + writel(ALTR_A10_ECC_SERRPENA, + base + ALTR_A10_ECC_INTSTAT_OFST); + edac_device_handle_ce(dci->edac_dev, 0, 0, dci->edac_dev_name); + } else { + writel(ALTR_A10_ECC_DERRPENA, + base + ALTR_A10_ECC_INTSTAT_OFST); + edac_device_handle_ue(dci->edac_dev, 0, 0, dci->edac_dev_name); + panic("\nEDAC:ECC_DEVICE[Uncorrectable errors]\n"); + } + return IRQ_HANDLED; +} + static irqreturn_t altr_edac_a10_irq_handler(int irq, void *dev_id) { irqreturn_t rc = IRQ_NONE; @@ -1171,6 +1246,9 @@ static int altr_edac_a10_probe(struct platform_device *pdev) continue; if (of_device_is_compatible(child, "altr,socfpga-a10-l2-ecc")) altr_edac_a10_device_add(edac, child); + else if (of_device_is_compatible(child, + "altr,socfpga-a10-ocram-ecc")) + altr_edac_a10_device_add(edac, child); } return 0; diff --git a/drivers/edac/altera_edac.h b/drivers/edac/altera_edac.h index cb6b2b9..42090f3 100644 --- a/drivers/edac/altera_edac.h +++ b/drivers/edac/altera_edac.h @@ -220,9 +220,41 @@ struct altr_sdram_mc_data { #define ALTR_L2_ECC_INJD BIT(2) /* Arria10 General ECC Block Module Defines */ +#define ALTR_A10_ECC_CTRL_OFST 0x08 +#define ALTR_A10_ECC_EN BIT(0) +#define ALTR_A10_ECC_INITA BIT(16) +#define ALTR_A10_ECC_INITB BIT(24) + +#define ALTR_A10_ECC_INITSTAT_OFST 0x0C +#define ALTR_A10_ECC_INITCOMPLETEA BIT(0) +#define ALTR_A10_ECC_INITCOMPLETEB BIT(8) + +#define ALTR_A10_ECC_ERRINTEN_OFST 0x10 +#define ALTR_A10_ECC_SERRINTEN BIT(0) + +#define ALTR_A10_ECC_INTSTAT_OFST 0x20 +#define ALTR_A10_ECC_SERRPENA BIT(0) +#define ALTR_A10_ECC_DERRPENA BIT(8) +#define ALTR_A10_ECC_ERRPENA_MASK (ALTR_A10_ECC_SERRPENA | \ + ALTR_A10_ECC_DERRPENA) +#define ALTR_A10_ECC_SERRPENB BIT(16) +#define ALTR_A10_ECC_DERRPENB BIT(24) +#define ALTR_A10_ECC_ERRPENB_MASK (ALTR_A10_ECC_SERRPENB | \ + ALTR_A10_ECC_DERRPENB) + +#define ALTR_A10_ECC_INTTEST_OFST 0x24 +#define ALTR_A10_ECC_TSERRA BIT(0) +#define ALTR_A10_ECC_TDERRA BIT(8) + +/* ECC Manager Defines */ +#define A10_SYSMGR_ECC_INTMASK_SET_OFST 0x94 +#define A10_SYSMGR_ECC_INTMASK_CLR_OFST 0x98 +#define A10_SYSMGR_ECC_INTMASK_OCRAM BIT(1) + #define A10_SYSMGR_ECC_INTSTAT_SERR_OFST 0x9C #define A10_SYSMGR_ECC_INTSTAT_DERR_OFST 0xA0 #define A10_SYSMGR_ECC_INTSTAT_L2 BIT(0) +#define A10_SYSMGR_ECC_INTSTAT_OCRAM BIT(1) #define A10_SYSGMR_MPU_CLEAR_L2_ECC_OFST 0xA8 #define A10_SYSGMR_MPU_CLEAR_L2_ECC_SB BIT(15) @@ -245,6 +277,9 @@ struct altr_sdram_mc_data { #define ALTR_A10_L2_ECC_CE_INJ_MASK 0x00000101 #define ALTR_A10_L2_ECC_UE_INJ_MASK 0x00010101 +/* Arria 10 OCRAM ECC Management Group Defines */ +#define ALTR_A10_OCRAM_ECC_EN_CTL (BIT(1) | BIT(0)) + struct altr_edac_device_dev; struct edac_device_prv_data { -- 1.7.9.5