From patchwork Mon Jun 13 21:19:10 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: 9174403 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 608276044F for ; Mon, 13 Jun 2016 21:17:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5085327BE5 for ; Mon, 13 Jun 2016 21:17:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44DFE27C0F; Mon, 13 Jun 2016 21:17:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id A26A127BE5 for ; Mon, 13 Jun 2016 21:17:27 +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 1bCZDA-0006yS-85; Mon, 13 Jun 2016 21:15:56 +0000 Received: from mail-bl2on0083.outbound.protection.outlook.com ([65.55.169.83] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bCZCr-0006Ks-IR for linux-arm-kernel@lists.infradead.org; Mon, 13 Jun 2016 21:15:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altera.onmicrosoft.com; s=selector1-opensource-altera-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9GeDUVoyAg5YxO2+9+xZ73Qy1hJtKxuWUmnz7Ciai2c=; b=jmNvYjs7NOEz06Yik9aQ4Oboptieks7ag9aRHt377PaPTJz+cV/Z5n0KmLCWnYc0Zp98l2959CnaBfNBLlSAgy5PGeQ5J2heAzMTX7QwE8sb2y6qIO3S65lmMimle8GtnDLrlqTsw5QHftjRmJ2Em+HyJyvIkrQO3IRDhb+8z5E= Received: from BY2PR03CA059.namprd03.prod.outlook.com (10.141.249.32) by CY1PR0301MB1547.namprd03.prod.outlook.com (10.162.165.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.511.8; Mon, 13 Jun 2016 21:15:15 +0000 Received: from BN1BFFO11FD025.protection.gbl (2a01:111:f400:7c10::1:120) by BY2PR03CA059.outlook.office365.com (2a01:111:e400:2c5d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.517.8 via Frontend Transport; Mon, 13 Jun 2016 21:15:15 +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 BN1BFFO11FD025.mail.protection.outlook.com (10.58.144.88) with Microsoft SMTP Server (TLS) id 15.1.511.7 via Frontend Transport; Mon, 13 Jun 2016 21:15:14 +0000 Received: from na01-bl2-obe.outbound.protection.outlook.com (207.46.163.203) by webmail.altera.com (66.35.236.227) with Microsoft SMTP Server (TLS) id 14.3.174.1; Mon, 13 Jun 2016 14:15:00 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altera.onmicrosoft.com; s=selector1-opensource-altera-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=9GeDUVoyAg5YxO2+9+xZ73Qy1hJtKxuWUmnz7Ciai2c=; b=jmNvYjs7NOEz06Yik9aQ4Oboptieks7ag9aRHt377PaPTJz+cV/Z5n0KmLCWnYc0Zp98l2959CnaBfNBLlSAgy5PGeQ5J2heAzMTX7QwE8sb2y6qIO3S65lmMimle8GtnDLrlqTsw5QHftjRmJ2Em+HyJyvIkrQO3IRDhb+8z5E= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=tthayer@opensource.altera.com; Received: from tthayer-HP-Z620-Ubuntu.137.57.187.33 (64.129.157.38) by BY1PR03MB1484.namprd03.prod.outlook.com (10.162.210.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.511.8; Mon, 13 Jun 2016 21:14:26 +0000 From: To: , , , , , , , , , , Subject: [PATCHv3 5/7] EDAC, altera: Add Arria10 ECC memory init functions Date: Mon, 13 Jun 2016 16:19:10 -0500 Message-ID: <1465852752-11018-6-git-send-email-tthayer@opensource.altera.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1465852752-11018-1-git-send-email-tthayer@opensource.altera.com> References: <1465852752-11018-1-git-send-email-tthayer@opensource.altera.com> MIME-Version: 1.0 X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BY1PR20CA0002.namprd20.prod.outlook.com (10.162.140.12) To BY1PR03MB1484.namprd03.prod.outlook.com (10.162.210.142) X-MS-Office365-Filtering-Correlation-Id: eaba61a3-68c3-42ed-75a2-08d393cfd037 X-Microsoft-Exchange-Diagnostics-untrusted: 1; BY1PR03MB1484; 2:TrK2abi1Q597c5YRiQwaiv2WrjZCkMCB4ZT2pTB4vywZROekozzrE6LXEVNulP8GtgZhQp1hpwGIVjOe36v160MOqgHLs+tfd6mnZPB9PcUHYW/G6kpARgTkwa0v1l6Jsl6krzToS1POl0fanhtpeigSNhIWh9Bec8x6PX4KVyJOholelIbmUgodboU2GWvD; 3:usalgS+FwI625LaLCnIiozUuSRk/bPyL+F+/w3yGliFrGMp7ajXnyknCmAMRNUFnE7VdAw6RfbAekRWMGr/ptAHfkukSdzssB6Q49Mw1hknQbZ0EZfyjkar09vaFMpen; 25:W0S4ndUY0VaT/uPUeOP/0aTUXCIbc2nlg9Z1Se2TyC47ssInlYkNDJI+Im4dTc3nQGhmRmE1RUjLk06Uqjz9T1oIptfkpj5sZk55eX7w/qJCMo8EMRMZ0FGj/FH2IWeW61UXC7rOYrw1i0SbWbkosYZRVoYbZnMQ+HNLZsH13WRV0mPFq6cw1yXXiHX63sNWEG8YvVWuVzOafvBUOmus+QoSDsY6WwIJ6KArkXchPdricN2TwfTaKnwY5EXdIEmCRJFZBdctfcR9F7B4ogZqmyACAJY9GA+SaCygXooOsYoPXDqVZkFLDXSmw5gU20frfNI4sZ6/dEEDCSI7iqJib552/Khk+VV4+xC07M4PsPrEL8c8zMJ5lIZdBUMtmZ22L4dadwHDOK6hlx5BEKghcyRV2xBXc1vFmhmvgB2RA/U=; 20:gOILelpuJCKQtMxb0/lT7Ov3yO29mpmYPkl8kOBu/kxK21xm5q23MdgunEmxlGOpCtqs93PGXKTLl8twuM50jjXZmRqsRouVoJooLYVCaLeIuEybH5nrrzCl9bCK/+0npPs3JDGLaRHuY2lVAzmhkwrh8YEguIbcm/TcbnyHSjE= X-Microsoft-Antispam-Untrusted: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1484; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(80048183373757); UriScan:(80048183373757); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:BY1PR03MB1484; BCL:0; PCL:0; RULEID:; SRVR:BY1PR03MB1484; BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13015025)(13017025)(13023025)(13018025)(13024025)(3002001)(10201501046)(6055026); SRVR:CY1PR0301MB1547; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1547; X-Microsoft-Exchange-Diagnostics-untrusted: 1; BY1PR03MB1484; 4:pq8KYI+eXgC7DIDfkMw01E+fskFZSnk7rV4EHWh44uF3u+BoFdSuAZwF6Smuu0izE+GOWmBcZ9nqL5eVgnQmUO2fK0nsM9+cKrVcO1MNZiUrHXcu2FaVzLxOiAvd52Ndu1c+jYz8vTgQ2sJ18jTjUr28PpDxwYEME54QmblTH1OfOlGcU2XCs41gnJVZXEDMvytzLT1DLO/3pSEmFtPyWVCwLOXWHWgwtmN9tR/RPEYf9rkB0Wdr/Mxc9yWEQhH+WwIIATQwy1nXQfGzQiEcn7ATaP4Fy0BawOR1MhPfTmdM4j7GWBIsiigcbQIcDqOSORS7AhPjje+FbPgY/Y09y2S3DoK0UcSrFAMmT/MnX07BclK4Bp3SJXeJlCteuhtMqDE0aMJbaKfHJcrO+pzFtnADU9/UPvePalHSQRLOJ9BkSs/53gbsmmU5ajTRNt+X X-Forefront-PRVS: 0972DEC1D9 X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6049001)(7916002)(199003)(189002)(2201001)(86152002)(42186005)(5008740100001)(50466002)(2950100001)(33646002)(106356001)(47776003)(77096005)(105586002)(48376002)(189998001)(229853001)(66066001)(50986999)(19580395003)(4001430100002)(68736007)(8676002)(107886002)(81166006)(76176999)(81156014)(101416001)(586003)(92566002)(97736004)(50226002)(5004730100002)(19580405001)(86362001)(2876002)(3846002)(6116002)(4326007)(5001770100001)(2906002)(5003940100001)(921003)(4720700001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR03MB1484; H:tthayer-HP-Z620-Ubuntu.137.57.187.33; FPR:; SPF:None; PTR:InfoNoRecords; A:0; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: opensource.altera.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1; BY1PR03MB1484; 23:7BMoeXg59GiDV/xDuug1Mwd61S0m6GdW2oW1RaxQq?= =?us-ascii?Q?1lCyoFPk0vYYh4xEe9zZaNYJd672z950e9RGSdDxctMy35lGTOxRlJyTDhzQ?= =?us-ascii?Q?7D/xAIsepJLySj+bKkptH8mDIZYD29v0bSzk0gmjUuvEbH99APPIsMG6Fn6W?= =?us-ascii?Q?QdGf31uPKp5wcHyMT3WtFcvXIKIjTKnLHSTDAKBWse4RpaweGqzjDRdOPjbS?= =?us-ascii?Q?XfdEt4qTry8fn/Pf2/J9RH+FJc0w10HZstv0KMEJj05KjnNPyaTNj4Zh+pAy?= =?us-ascii?Q?YJIm65ObVtqb9wf5lsX+4yqPsMtg01VSOTcxduhfQaOhU5CSwJkbxB0o581v?= =?us-ascii?Q?uQwRf9uA76m18jhrL6l7doXoJZq9y18o+MxQiEb05WLtKx0nAUCTavDhEF8C?= =?us-ascii?Q?F8o3UI01smTv5bFABbm0sUfxphKpNn8o7c0iY/pufN/PVg8ZH9Nt63/c7Gsy?= =?us-ascii?Q?7Qzu4hva2Egc2Dw2RRb8/soKE14tyfHg/r0/gWxOa2HNpSusBbyh3O9zXZbv?= =?us-ascii?Q?zowDHBqrTlg6UpgiIC7k5RF60oIFP6sr+D6u+aKrNNfF269AwktES49rC/Q9?= =?us-ascii?Q?K7xGThHBIOoJxY9O9NjOA9/UzIvkv7hpykqmQXMD9WUMPckgqVEwTZEvbwpJ?= =?us-ascii?Q?+2ntItdO6TlCuA4mfF5NNCBj5gA6YafM/RkxaFIkoAHKwkweiL+15jweL1/L?= =?us-ascii?Q?jBwsDhz5MR1VRmwFoPDh+txA8kAQjWDY8b/hAdR9l7D2yByqXWb+p2Jvvk5P?= =?us-ascii?Q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ROWmWJ7u/6PIvWWwu4jUJ40bZD32LMyiAt/BKErFcw0IPm6DA38Knx9pU7KXDCwkhREywuq60Vs=; 20:AN6hckvbiNmwS6mQlZluL9NcycTsY+1W6zE9UuqHwWqYS8pzmEEq0ZUxisZqRR42H5vpag9Og3N55H99b1tTog4KaygUC4cNKmORMMoFWY6M3jNdTGJwPpwJr2NE9R6sATC2uLJqP36sHyhFB4mYi74PRDCo8wRBBVj4lEhFoQg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1484 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1BFFO11FD025.protection.gbl X-Forefront-Antispam-Report: CIP:66.35.236.227; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(8676002)(11100500001)(47776003)(97736004)(189998001)(81166006)(2950100001)(6070500001)(5001770100001)(50226002)(5004730100002)(81156014)(19580395003)(19580405001)(3720700001)(356003)(68736007)(956001)(2201001)(86152002)(86362001)(5003940100001)(66066001)(8936002)(4001430100002)(107886002)(4326007)(106466001)(6806005)(50986999)(76176999)(2876002)(2906002)(85426001)(5008740100001)(105606002)(33646002)(92566002)(229853001)(16796002)(87936001)(50466002)(48376002)(77096005)(586003)(3846002)(6116002)(7099028)(921003)(4720700001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1547; H:sj-itexedge03.altera.priv.altera.com; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:0; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD025; 1:P1Q1rM7wrNsKQRZO/pbThpW3/a+RSaQjpyrDWSNR2KTJc1dBxM+LPoHMTo/6ADLgFaVrVrX7EKqLUHKcx6xuSlkiEbl1KcEkFFUE222OZKGBCqzBwjjqA+iaoVodU3satLkjwpBU8dpskyADY810L/iA7lSNDJLG7fHtMZ6UK/jeASdGcQGtN0Ne9BzD0LLiHfxeTdGLCGOXneySiLXxI/IL2WfYz9Nm+D7YnpfqMdD5SAUtCWwXRYy2bl/hctEwf2YarpbfXxVWsgoAVoP2bXVxAoMYxYN7I60YP7NE8zAizkJeBPR14sv64d/7J8Pvs5uysxO29gq/2bhymaUdkkxtcx2faVmkRiOt/UQ3+DJ9ff3O8EE5hVFnvn+F/Cl8PuUrX1jA8L5LqvYnerK/IisAYlLsKYud9Jh97qYRb4fGDTn62JZAbVJHmR3cpWeXgdosn51yx7jmLkQdYucajbF2ppNb2ER8Nx3Nwd+WRYU5inyvBA8z1SR2Kd+2NhidBn4SiDbvhfBFmj3fSZa3tVa0K8lPTVtgfmcXumGdkBY= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1547; 2:/lyyobHT2ScfTWOk3Cv3k3IsIVIvsxK3ER8os/XEll2P9wpzbbRHVVBNzWUU1Vc3RP6YxVAB2Gi6F+IpM/KVJHChyl2VEMV+5Lg0uS8GPLj14JSNCpb62XDALOs+eyMZUcp178YwblGvYw34Y6lGNXpgimCDuWOqlJqHcppLj1FJmeK48vIQaQDjfQ52MnsI; 3:ANC5lf0sY8bxiz6KMj+CACBMzCgUepDrH8lVw583/wRsiJfYgPmfebJRX0r3p6i0tNdfxkd900ep+lFsyVx5zn0JUbQpqfEzaNFoK9wIUjK+ih/6hDOGD4G1v2617QOFXW7j/EmfkwhCFPXeVMBtjfVI9faav8FDwJapzdrkaceqh/kAS1b/0IyauRpYJPJFupd3eWGjHpjgH7uppV0AmALBYqMYKTor0thsnBGZi6qAJjAUokIWKOoF0yHa8Sxn X-DkimResult-Test: Passed X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(3001016); SRVR:CY1PR0301MB1547; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1547; 25:r4lE2fBEkphpPyvDosDN/WcMYY/3K4Lxxy8CTaNPz8YDu3LAochYr3/2d23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oNs4Yu6BarsEk/Hd4HEasZPRxvcTf95S/waZoHSXhd5?= =?us-ascii?Q?3TxOgRvHvUIIdtWonB3B+i6gdsRysUv/F2MYh0oP8b/uarAtfcYPO?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1547; 5:CgaJgSRaVgg7cpa9FupKGS61anCVUZDabZhGsTnjMiFvxM2ZCO95qpvKXMAWXmVita0DTGW1f0TwtgMAXdrm17wTbqOazdndLuwNbZ+XnSEwtG5lghIbNcFhPeeVr6KbG+KDHyh4maJyK4o2/RjsvQ==; 24:9yata4INKTAQ1JShW/mc+JA1fwCJ+7hTKB+fdn9/R8bEOpd6fnAhIqhHidx6N/bAlMZGwGZxlhzgb43vTa69pY5aJbqgM1OOj79fy2FpnKg=; 7:DxM+EZPA/6umqI/YyRErpXGI7otTd3DITMNlHuTe7F46mD81FLS5en+bHpeXMfLg7PWityVsSAOoCDiEt0DzlY1LCCXXOs83F0eUGdU+n33ILlrFtdWSlr8eJWnZiIVROpSEO2L60hmHLcQgePObU4qie9oGKk2MqBEL/ebvTKy4IMcA56408HhwG1EZ1Leo; 20:sal91ISPdv5MXdT9F7X8E34xDrdrMHZdrkCobRcixHS6WqfL2Ip+dEfOAtrPghiHetvK28uKUkMX5r9fvAXsk4b7U4WL/+6THdANoizQKxcFokPW8fALrm0nJUptXEFqzySJIW2NY7Y+eQKPlXhiGralacBG1OArOHHLfntShag= X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2016 21:15:14.6749 (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: CY1PR0301MB1547 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160613_141537_984593_BB9D63A7 X-CRM114-Status: UNSURE ( 4.68 ) X-CRM114-Notice: Please train this message. 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, 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-Virus-Scanned: ClamAV using ClamSMTP From: Thor Thayer In preparation for additional memory module ECCs, add the memory initialization functions and helper functions used for memory initialization. Signed-off-by: Thor Thayer --- v2: Specify INTMODE selection -> IRQ on each ECC error. Insert functions above memory-specific functions so that function declarations are not required. Use ERRINTENS & ERRINTENR registers instead of read/modify/write. v3: Changes for common compatibility string: - Pass node instead of compatibility string. - New altr_init_a10_ecc_device_type() for peripherals. - Add __init to altr_init_a10_ecc_block(). - Add a10_get_irq_mask(). --- drivers/edac/altera_edac.c | 197 ++++++++++++++++++++++++++++++++++++++++++++ drivers/edac/altera_edac.h | 8 ++ 2 files changed, 205 insertions(+) diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index a3f490d..f27bb29 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -876,6 +877,202 @@ static irqreturn_t altr_edac_a10_ecc_irq(int irq, void *dev_id) #endif /* CONFIG_EDAC_ALTERA_OCRAM || CONFIG_EDAC_ALTERA_ETHERNET */ +/******************* Arria10 Memory Buffer Functions *********************/ + +#if defined(CONFIG_EDAC_ALTERA_ETHERNET) + +static inline int a10_get_irq_mask(struct device_node *np) +{ + int irq; + const u32 *handle = of_get_property(np, "interrupts", NULL); + + if (!handle) + return -ENODEV; + irq = be32_to_cpup(handle); + return irq; +} + +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 __init int altr_init_a10_ecc_block(struct device_node *np, 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_eccmgr; + + ecc_name = (char *)np->name; + + /* 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"); + return -ENODEV; + } + + /* 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); + return -ENODEV; + } + + /* Disable ECC */ + regmap_write(ecc_mgr_map, A10_SYSMGR_ECC_INTMASK_SET_OFST, irq_mask); + writel(ALTR_A10_ECC_SERRINTEN, + (ecc_block_base + ALTR_A10_ECC_ERRINTENR_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 out; + } + + 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 out; + } + } + + /* Interrupt mode set to every SBERR */ + regmap_write(ecc_mgr_map, ALTR_A10_ECC_INTMODE_OFST, + ALTR_A10_ECC_INTMODE); + /* Enable ECC */ + ecc_set_bits(ecc_ctrl_en_mask, (ecc_block_base + + ALTR_A10_ECC_CTRL_OFST)); + writel(ALTR_A10_ECC_SERRINTEN, + (ecc_block_base + ALTR_A10_ECC_ERRINTENS_OFST)); + regmap_write(ecc_mgr_map, A10_SYSMGR_ECC_INTMASK_CLR_OFST, irq_mask); + /* Ensure all writes complete */ + wmb(); +out: + iounmap(ecc_block_base); + return ret; +} + +static int validate_parent_available(struct device_node *np); +static const struct of_device_id altr_edac_a10_device_of_match[]; +static int __init altr_init_a10_ecc_device_type(char *compat) +{ + int irq; + struct device_node *child, *np = of_find_compatible_node(NULL, NULL, + "altr,socfpga-a10-ecc-manager"); + if (!np) { + edac_printk(KERN_ERR, EDAC_DEVICE, "ECC Manager not found\n"); + return -ENODEV; + } + + for_each_child_of_node(np, child) { + const struct of_device_id *pdev_id; + const struct edac_device_prv_data *prv; + + if (!of_device_is_available(child)) + continue; + if (!of_device_is_compatible(child, compat)) + continue; + + if (validate_parent_available(child)) + continue; + + irq = a10_get_irq_mask(child); + if (irq < 0) + continue; + + /* Get matching node and check for valid result */ + pdev_id = of_match_node(altr_edac_a10_device_of_match, child); + if (IS_ERR_OR_NULL(pdev_id)) + continue; + + /* Validate private data pointer before dereferencing */ + prv = pdev_id->data; + if (!prv) + continue; + + altr_init_a10_ecc_block(child, BIT(irq), + prv->ecc_enable_mask, 0); + } + + of_node_put(np); + return 0; +} + +#endif /* CONFIG_EDAC_ALTERA_ETHERNET */ + /*********************** OCRAM EDAC Device Functions *********************/ #ifdef CONFIG_EDAC_ALTERA_OCRAM diff --git a/drivers/edac/altera_edac.h b/drivers/edac/altera_edac.h index cf4e8cb..aa7c690 100644 --- a/drivers/edac/altera_edac.h +++ b/drivers/edac/altera_edac.h @@ -230,8 +230,13 @@ struct altr_sdram_mc_data { #define ALTR_A10_ECC_INITCOMPLETEB BIT(8) #define ALTR_A10_ECC_ERRINTEN_OFST 0x10 +#define ALTR_A10_ECC_ERRINTENS_OFST 0x14 +#define ALTR_A10_ECC_ERRINTENR_OFST 0x18 #define ALTR_A10_ECC_SERRINTEN BIT(0) +#define ALTR_A10_ECC_INTMODE_OFST 0x1C +#define ALTR_A10_ECC_INTMODE BIT(0) + #define ALTR_A10_ECC_INTSTAT_OFST 0x20 #define ALTR_A10_ECC_SERRPENA BIT(0) #define ALTR_A10_ECC_DERRPENA BIT(8) @@ -280,6 +285,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 {