From patchwork Tue Apr 12 22:12:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tthayer@opensource.altera.com X-Patchwork-Id: 8816921 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A44FB9F3D1 for ; Tue, 12 Apr 2016 22:11:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8765620373 for ; Tue, 12 Apr 2016 22:11:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B3A5201C8 for ; Tue, 12 Apr 2016 22:11:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aq6V5-0003bJ-Ai; Tue, 12 Apr 2016 22:09:35 +0000 Received: from mail-bl2on0074.outbound.protection.outlook.com ([65.55.169.74] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aq6UX-00036Y-Jt for linux-arm-kernel@lists.infradead.org; Tue, 12 Apr 2016 22:09:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altera.onmicrosoft.com; s=selector1-opensource-altera-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dJ9VvwtHPqAY5o1cjMESbwSJK/hn+gf+KAPFqfK5HHw=; b=hFsjnpcam1qheKj89qC3q07uGN2qM5V9mfiHpYaC6R7fQt53qSCQ5JlDgJOVb+FiaIIzoGn9k3VkflFAwvdxe/pVesiopXJGdOsrmPOUMF2CPXEfhi2q902LLbdL1gs3ZAEEthS804zZt0nz8ES2qvxlGXaGW2uZh88AKkkW+t8= Received: from DM2PR03CA0040.namprd03.prod.outlook.com (10.141.96.39) by DM2PR0301MB1296.namprd03.prod.outlook.com (10.160.222.15) with Microsoft SMTP Server (TLS) id 15.1.447.15; Tue, 12 Apr 2016 22:08:39 +0000 Received: from BY2FFO11FD017.protection.gbl (2a01:111:f400:7c0c::122) by DM2PR03CA0040.outlook.office365.com (2a01:111:e400:2428::39) with Microsoft SMTP Server (TLS) id 15.1.453.26 via Frontend Transport; Tue, 12 Apr 2016 22:08:39 +0000 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; Received-SPF: Fail (protection.outlook.com: domain of opensource.altera.com does not designate 66.35.236.227 as permitted sender) receiver=protection.outlook.com; client-ip=66.35.236.227; helo=sj-itexedge03.altera.priv.altera.com; Received: from sj-itexedge03.altera.priv.altera.com (66.35.236.227) by BY2FFO11FD017.mail.protection.outlook.com (10.1.14.105) with Microsoft SMTP Server (TLS) id 15.1.453.6 via Frontend Transport; Tue, 12 Apr 2016 22:08:38 +0000 Received: from na01-by2-obe.outbound.protection.outlook.com (207.46.163.242) by webmail.altera.com (66.35.236.227) with Microsoft SMTP Server (TLS) id 14.3.174.1; Tue, 12 Apr 2016 15:06:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altera.onmicrosoft.com; s=selector1-opensource-altera-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=dJ9VvwtHPqAY5o1cjMESbwSJK/hn+gf+KAPFqfK5HHw=; b=hFsjnpcam1qheKj89qC3q07uGN2qM5V9mfiHpYaC6R7fQt53qSCQ5JlDgJOVb+FiaIIzoGn9k3VkflFAwvdxe/pVesiopXJGdOsrmPOUMF2CPXEfhi2q902LLbdL1gs3ZAEEthS804zZt0nz8ES2qvxlGXaGW2uZh88AKkkW+t8= Authentication-Results: alien8.de; dkim=none (message not signed) header.d=none;alien8.de; dmarc=none action=none header.from=opensource.altera.com; Received: from tthayer-HP-Z620-Ubuntu.137.57.187.33 (64.129.157.38) by CY1PR03MB1485.namprd03.prod.outlook.com (10.163.17.158) with Microsoft SMTP Server (TLS) id 15.1.453.26; Tue, 12 Apr 2016 22:08:33 +0000 From: To: , , , , , , , , , , Subject: [PATCH 3/6] EDAC, altera: Add Arria10 ECC memory init functions Date: Tue, 12 Apr 2016 17:12:58 -0500 Message-ID: <1460499181-23080-4-git-send-email-tthayer@opensource.altera.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1460499181-23080-1-git-send-email-tthayer@opensource.altera.com> References: <1460499181-23080-1-git-send-email-tthayer@opensource.altera.com> MIME-Version: 1.0 X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BLUPR11CA0038.namprd11.prod.outlook.com (10.141.240.48) To CY1PR03MB1485.namprd03.prod.outlook.com (10.163.17.158) X-MS-Office365-Filtering-Correlation-Id: 845b3fb9-11b3-47f9-51b5-08d3631f006f X-Microsoft-Exchange-Diagnostics-untrusted: 1; CY1PR03MB1485; 2:omeDt1pF42Sp2ponfq8/nLhnnkD5sfE4/vdBhwJLbl+PoeUdwig1anEeaLFjDsYa1Co5LQli0/AVSy/wVopNaUnuI2LvWA7kVarZLSAXpw18ZYAiHH6m3uUNTBqP/dJW/GAPvLrNOuCAJfymKfWDOkL5T5mj/dns5uz/s7r7hcEU+akK62O3induvlgLNr5q; 3:mBouC/Kuk2AJf/c79TEIE3Cmw7ib8qxAz8jE+ytMCiNpROF58ze5kNOQt3wT3ADXgBdwTIYm/jM/EZu2X71SQEKvRGRz5iCmHNwaTvRR2GuMrfnll1fH3cVvez2LlISz; 25:54BahqWA9QwsZLL3t0KovbHobUpg2WoVT9C4g+vK9+X/dvSwOh9EaBz5DDJnMzgC+wNyhXXHOWafH2OSYtia0l2htzklVhD4hJSLnaM74vHSjMSHxRFQ+StiYJwATD00fDCsiY78VLxQE5yhwrFvUO5j7f4fdNkRZrS+DIrLZaIC8Pw27HDtZ608pfEp9SiWABjxZaJO7Adt8vyjigUdXX5FRD4w2KR0MnkOBHxGfkJDywkwJ2f8j518BYrr3cswPWNJtn3zEMtyF8d/YTPfSDfzg74skthePk+3A4YTcEcU8NMLlpd9A+/1rYLVlUgbEo/EE4dywjIhDoJepeeMsg==; 20:BTuHFayhyb/5kHnBzFAqEAssdglRn4zrKbRmOQt+5cYZvXIgohjW/ykUpOCcDNIAhunPVhvTCkgrMVa53ALpNGslFz6Jf4JocMErSItQu3lkY5SwoRU27ilOtzE8s5kzSWFOc4/qw0xbMUJRvPEcONdP2Gy06nvrhcFuYAmmuCo= X-Microsoft-Antispam-Untrusted: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB1485; 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:CY1PR03MB1485; BCL:0; PCL:0; RULEID:; SRVR:CY1PR03MB1485; BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(13023025)(13018025)(13024025)(13017025)(13015025)(3002001)(10201501046); SRVR:DM2PR0301MB1296; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0301MB1296; X-Microsoft-Exchange-Diagnostics-untrusted: 1; CY1PR03MB1485; 4:/XVbxzX4fMszzTK8LGKBqGQ4OTrGSdwH8B2H6xL3Ri/Rd3NqY9yWCxfZ9WmBDcZIFwYED5HQQbN8cfoh+0TEZP9dfzJTu5Vpcn1GmuHZyLWNVljJ5tC2FqrLPRyR+p3gGgYVflcm7tERZaDS0REOUIJZB7na7eWsZeqVuK7oeLCBbWdhn2eGzA/AdOUSYgUUbbf80IJLaZyAAvbhKNIdoZ9cInGxsjsE3fos4fCwe1m5lMhHfxkVksb7iXiewTtXLIDlbW/JTnAeXGiLMGEcUY+DDO6lXt4OSmuH1F+9ujFUhzxMNtvPyEH6R+hha8OusxIYh104SM3hX2IKTBeAn97yh7FDrm/kdRwys/R7Pdyfe1GoLNzhW8qOBxqVYARL X-Forefront-PRVS: 0910AAF391 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(5008740100001)(48376002)(189998001)(5001770100001)(50466002)(92566002)(107886002)(2906002)(4001430100002)(42186005)(4326007)(5003940100001)(33646002)(2876002)(229853001)(50986999)(76176999)(50226001)(2950100001)(47776003)(19580395003)(1096002)(19580405001)(586003)(77096005)(6116002)(3846002)(2201001)(5004730100002)(86362001)(86152002)(81166005)(921003)(4720700001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB1485; 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; CY1PR03MB1485; 23:FAhoLhuMZ9aqkoSFPvwL98p0jbWAmn+WmcSLvSRJ5?= =?us-ascii?Q?1fw3r2jJxgls95mUA43QeT8hxJ2AP8PRBeMMkCvrwOxqVF6TLovL1Q0cO9gX?= =?us-ascii?Q?Px3CaKb1OZ8Lrn0lUgPmmooyLAlZxcxZ2gzQh4EjglRGJyD0fiSvfRKpcbAQ?= =?us-ascii?Q?JST9Oo51Fs80EUgwLhHXSNBI4toOlBHkEsnZor+7VHUmpPzc52ET+/x0u+mm?= =?us-ascii?Q?DNRo71X9NSNr+PF5sdoHcVot6fcYFCVa8rbVe1yWpgrrv7EQQUgY5E3FDu+2?= =?us-ascii?Q?Fel4tgLnm3wAOb+dPgI1bTl7pk54VnNELJMN0XIZ75MxKrJxThTJifpkutyb?= =?us-ascii?Q?h9JzfVIMZESbFXQYAgYWoBiPn5D5qf64o1ygOQlLXTTDoap5q8imPS4Jj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s3EU+m6gouz4jBNcBepPUIfP/ve2b5CNAk2yOA8VWaY=; 20:4HE+aLgkRMHtVOOdeGb6KjGBQeEY/VCB0LSI1TOanl1YTwtzudBu9Mi9MHaHHLTJ037fQmDfhvgOCexf2YeMlF3XhJFaQ1bYml163ytw4NhPSb3NYoYMiLg8mf9EySAE3mBjeoByIjbOxocvXKZufYHPcN1zE+CtV+X6kgbJ9tk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB1485 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BY2FFO11FD017.protection.gbl X-Forefront-Antispam-Report: CIP:66.35.236.227; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(87936001)(4326007)(6116002)(2906002)(86152002)(2876002)(106466001)(2201001)(586003)(107886002)(3846002)(19580395003)(50226001)(5004730100002)(6806005)(3720700001)(189998001)(33646002)(11100500001)(229853001)(47776003)(5003940100001)(50986999)(86362001)(92566002)(5001770100001)(2950100001)(4001430100002)(48376002)(76176999)(1096002)(50466002)(21840400001)(956001)(16796002)(19580405001)(5008740100001)(105606002)(1220700001)(77096005)(81166005)(85426001)(7099028)(921003)(4720700001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0301MB1296; H:sj-itexedge03.altera.priv.altera.com; FPR:; SPF:Fail; MLV:sfv; MX:1; A:0; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD017; 1:/O8lMCkv1M/UpZPYmchHAwWz/aswdgc61O15UmsAPACngGFQHuXiWHJKJ3qim3YNTvfsi1LhXHrhuX5c5yiAEO2lmO9Th0fTIYSUKfFtP8fqv+1liu1nYRA3K3D76wujFlvfo55FKn/db1GCzwCvP3+OVa64KGLN70T3fCza4cwq57KswTnDbUrP65MSWEpHyvqJ+z7z9T5L9bxV6R6wTS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zB48V0eNegxK5U7irtSe+MuGy9eUcNU4aOysccjerjkmOzJPYSLMOjWO3C2mhz1MYSC9AOUJa33cz2n8pHYoJY5gmQyTn+7GZcMDwXomKJHmdJAiu5a8Q== X-DkimResult-Test: Passed X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(3001016); SRVR:DM2PR0301MB1296; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1296; 20:z+0Xy/gqUad17YWZyr15EqUcgI3EvSTXurCX5ePiP/A3iZU2zwAlKY7/N/Qj6EuJYGWn0oPH/N4VS9NsWg+2IFOYhCUUxGxzN/M2xFcAlDQHQXW/X5bKIOQWisAO0qXvz8gWkPPsDryK5CHKJ/Qo7nMzhblvq5SDukzbdiO60C8=; 4:9HCy7uspza1r8TDtIYg3b9npMMI6vtTocCeWdaOmWoCLJVal1zskfg44oA3AbunRB7zMYDuYiokDWKcB84/olLHPY2/0M/JRYZnMr1ljB9PjeLXi4f0ILBM+awV5aEvx2YQWnrE+6hZlRSmfQMBQ2+vlspH/aOY1y038iJKT03/G9zHPAwtCoMCJgjGoULqXhQBKyGyM/3fNCpODhPpCp++ZnXRtmFQEkWMZXIMcuc50+NDiEEhhDeE5z6lDXl63AYc9Y11utoZjLVXQL7ofLZIdE84L3YyYc12VVcwXQlZM9bgjuP8O5kZ+GRIGzVGgX8iN/agdkvHR9ExUywJ7ppmDNhRDKHDHisZFCetUaXfiqHvBl5G1iW4o2JhNYRC0uooic7s+V62VgdOcT5InrsjudyADlngJHcrfBjH9XD8TXUsJO9xaIK3LNBv53ALiIYG6mgI9eJIKxALcXze4uQ== X-Forefront-PRVS: 0910AAF391 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0301MB1296; 23:bU4ib6eSUbTv3APvT4bo7oci/YgrvoCSRgGJ1TX?= =?us-ascii?Q?pVWuf4J+aueLyzPI1AOt4vXzgK8AruO2IVe1JkKKGQqT1kNHVVe0Xl5+4Uw7?= =?us-ascii?Q?efW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us-ascii?Q?kpYyq+ofz8JE4pgAFScyOFlnBHEuC0vR0g1CFsbojKgZ1etOglyaak9LpvCD?= =?us-ascii?Q?NTDD/9OZeiCH10/LjcuRgHzNQnY2a+z1bmzZMaIEBmnkJwPRU7d1y19AfmSv?= =?us-ascii?Q?ZZKJrL9ODYuKk2pFUI27feBr9Cb4bphs4qrIS+a8w3oXZUa5eylXAXDQW6W9?= =?us-ascii?Q?WBZYPr1kwIx1Owylnyf4z2MQ/mvrZoUkAi9NfukB1gtho1lwJr2BEGofQpr4?= =?us-ascii?Q?7yEmYkC/Ub/3tnea/pzgsRYJj3fbCqO+zQ3enLDoCkdbDLBmUIVYWnWnOFc9?= =?us-ascii?Q?qqNR3Xmqa2heWaVTooU9ko/EPryE6h61KIHiFyrE9omMSEY6MvPe9npOoo8U?= =?us-ascii?Q?wgMa93w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1296; 5:87fgz5YR7nHGyIlZODz8S4EuCuCiX6pltlo5c0apPggg66ohxoVGHzGqk3IIvg+6OQqaUyVwnAuR5yIBLS9YyrhM06b3U7O1dV/s6+LYu4/dla5P5TxyOeKckZfks/lV+E3Jq6NL1MgxGz/LnL8TNQ==; 24:ZMSs69DRavoDQ0MEJpCQPABu2nbTOlFzpC8fCsQbv10+GqqkGETlGkp9ns4bNFVqvpslTuivNQ+08G4Z2WWhhhA7hH7xAPRFLdrDAE2Hfv8=; 20:CCZn/m15YXE+qnFd8TDnUUasslbjQDoCLkITBK8roRdjpG29BfJ3qR9af1u4Dph4h9qGsoRvFYCu5D/ZHt0AK5oaAWrnMTCPP7EqxGSQLeqDZv1ppUOfJ5SUgBhz1wTdf5AA3nF6IuVErfyB5MVcctHu1NYIiq9+nxFE0JmHqy8= X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2016 22:08:38.9619 (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: DM2PR0301MB1296 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160412_150902_212780_BCBDCC7A X-CRM114-Status: UNSURE ( 8.33 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, tthayer.linux@gmail.com, tthayer@opensource.altera.com, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.1 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Thor Thayer In preparation for additional memory module ECCs, add the memory initialization functions. Signed-off-by: Thor Thayer --- drivers/edac/altera_edac.c | 152 ++++++++++++++++++++++++++++++++++++++++++++ drivers/edac/altera_edac.h | 3 + 2 files changed, 155 insertions(+) diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index 226e650..0955ab0 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -851,6 +852,8 @@ module_platform_driver(altr_edac_device_driver); /********************* Arria10 Function Declarations *********************/ static irqreturn_t altr_edac_a10_ecc_irq(struct altr_edac_device_dev *dci, bool sberr); +static int altr_init_a10_ecc_block(const char *compat, u32 irq_mask, + u32 ecc_ctrl_en_mask, bool dual_port); /*********************** OCRAM EDAC Device Functions *********************/ @@ -1039,6 +1042,155 @@ const struct edac_device_prv_data a10_l2ecc_data = { * Based on xgene_edac.c peripheral code. */ +static inline void ecc_set_bits(u32 bit_mask, void __iomem *ioaddr) +{ + u32 value = readl(ioaddr); + + value |= bit_mask; + writel(value, ioaddr); +} + +static inline void ecc_clear_bits(u32 bit_mask, void __iomem *ioaddr) +{ + u32 value = readl(ioaddr); + + value &= ~bit_mask; + writel(value, ioaddr); +} + +static inline int ecc_test_bits(u32 bit_mask, void __iomem *ioaddr) +{ + u32 value = readl(ioaddr); + + return (value & bit_mask) ? 1 : 0; +} + +/* + * This function uses the memory initialization block in the Arria10 ECC + * controller to initialize/clear the entire memory data and ECC data. + */ +static int altr_init_memory_port(void __iomem *ioaddr, int port) +{ + int limit = ALTR_A10_ECC_INIT_WATCHDOG_10US; + u32 init_mask = ALTR_A10_ECC_INITA; + u32 stat_mask = ALTR_A10_ECC_INITCOMPLETEA; + u32 clear_mask = ALTR_A10_ECC_ERRPENA_MASK; + int ret = 0; + + if (port) { + init_mask = ALTR_A10_ECC_INITB; + stat_mask = ALTR_A10_ECC_INITCOMPLETEB; + clear_mask = ALTR_A10_ECC_ERRPENB_MASK; + } + + ecc_set_bits(init_mask, (ioaddr + ALTR_A10_ECC_CTRL_OFST)); + while (limit--) { + if (ecc_test_bits(stat_mask, + (ioaddr + ALTR_A10_ECC_INITSTAT_OFST))) + break; + udelay(1); + } + if (limit < 0) + ret = -EBUSY; + + /* Clear any pending ECC interrupts */ + writel(clear_mask, (ioaddr + ALTR_A10_ECC_INTSTAT_OFST)); + + return ret; +} + +/* + * Aside from the L2 ECC, the Arria10 ECC memories have a common register + * layout so the following functions can be shared between all peripherals. + */ +static int altr_init_a10_ecc_block(const char *compat, u32 irq_mask, + u32 ecc_ctrl_en_mask, bool dual_port) +{ + int ret = 0; + void __iomem *ecc_block_base; + struct regmap *ecc_mgr_map; + char *ecc_name; + struct device_node *np, *parent, *np_eccmgr; + + np = of_find_compatible_node(NULL, NULL, compat); + if (!np) { + pr_err("SOCFPGA: Unable to find %s in dtb\n", compat); + ret = -ENODEV; + goto out; + } + ecc_name = (char *)np->name; + + /* Ensure device is enabled before calling init, otherwise exit */ + parent = of_parse_phandle(np, "parent", 0); + if (!parent || !of_device_is_available(parent)) { + ret = -ENODEV; + goto out1; + } + + /* Get the ECC Manager - parent of the device EDACs */ + np_eccmgr = of_get_parent(np); + ecc_mgr_map = syscon_regmap_lookup_by_phandle(np_eccmgr, + "altr,sysmgr-syscon"); + of_node_put(np_eccmgr); + if (IS_ERR(ecc_mgr_map)) { + edac_printk(KERN_ERR, EDAC_DEVICE, + "Unable to get syscon altr,sysmgr-syscon\n"); + ret = -ENODEV; + goto out1; + } + + /* Map the ECC Block */ + ecc_block_base = of_iomap(np, 0); + if (!ecc_block_base) { + edac_printk(KERN_ERR, EDAC_DEVICE, + "Unable to map %s ECC block\n", ecc_name); + ret = -ENODEV; + goto out1; + } + + /* Disable ECC */ + regmap_write(ecc_mgr_map, A10_SYSMGR_ECC_INTMASK_SET_OFST, irq_mask); + ecc_clear_bits(ALTR_A10_ECC_SERRINTEN, + (ecc_block_base + ALTR_A10_ECC_ERRINTEN_OFST)); + ecc_clear_bits(ecc_ctrl_en_mask, + (ecc_block_base + ALTR_A10_ECC_CTRL_OFST)); + /* Ensure all writes complete */ + wmb(); + /* Use HW initialization block to initialize memory for ECC */ + ret = altr_init_memory_port(ecc_block_base, 0); + if (ret) { + edac_printk(KERN_ERR, EDAC_DEVICE, + "ECC: cannot init %s PORTA memory\n", ecc_name); + goto out2; + } + + if (dual_port) { + ret = altr_init_memory_port(ecc_block_base, 1); + if (ret) { + edac_printk(KERN_ERR, EDAC_DEVICE, + "ECC: cannot init %s PORTB memory\n", + ecc_name); + goto out2; + } + } + + /* Enable ECC */ + ecc_set_bits(ecc_ctrl_en_mask, (ecc_block_base + + ALTR_A10_ECC_CTRL_OFST)); + ecc_set_bits(ALTR_A10_ECC_SERRINTEN, + (ecc_block_base + ALTR_A10_ECC_ERRINTEN_OFST)); + regmap_write(ecc_mgr_map, A10_SYSMGR_ECC_INTMASK_CLR_OFST, irq_mask); + /* Ensure all writes complete */ + wmb(); +out2: + iounmap(ecc_block_base); +out1: + of_node_put(parent); +out: + of_node_put(np); + return ret; +} + static ssize_t altr_edac_a10_device_trig(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) diff --git a/drivers/edac/altera_edac.h b/drivers/edac/altera_edac.h index 42090f3..7e66015 100644 --- a/drivers/edac/altera_edac.h +++ b/drivers/edac/altera_edac.h @@ -280,6 +280,9 @@ struct altr_sdram_mc_data { /* Arria 10 OCRAM ECC Management Group Defines */ #define ALTR_A10_OCRAM_ECC_EN_CTL (BIT(1) | BIT(0)) +/* A10 ECC Controller memory initialization timeout */ +#define ALTR_A10_ECC_INIT_WATCHDOG_10US 10000 + struct altr_edac_device_dev; struct edac_device_prv_data {