From patchwork Wed Jun 22 13:58:57 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: 9193037 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 757DF6075C for ; Wed, 22 Jun 2016 13:58:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6478428365 for ; Wed, 22 Jun 2016 13:58:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5879328402; Wed, 22 Jun 2016 13:58:16 +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=unavailable 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 C945B28365 for ; Wed, 22 Jun 2016 13:58:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bFict-0004Vd-42; Wed, 22 Jun 2016 13:55:31 +0000 Received: from mail-bl2on0091.outbound.protection.outlook.com ([65.55.169.91] helo=na01-bl2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bFic0-0002pc-UH for linux-arm-kernel@lists.infradead.org; Wed, 22 Jun 2016 13:54:38 +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=PpNxKH7oYEyyBywaAOywLbfXfL5OhBkhPcJjHvGcaZw=; b=JDX2nMpXdDEEBTUMJ9KV8dVD41LD+Kg2XkAzErJR7zId2/OMdJcGxp3OI85dBnrdNZidb1ms2GG0SdiRrhC/5Kg6CKXa3yHziJCJ0x2Bhc1RXSKbXAg+r6FFYlk5Y8qfTDk4DnJdv4fBPKZcbpT9LEYy3iTxulCOsdfrCku/Oxc= Received: from CH1PR03CA003.namprd03.prod.outlook.com (10.255.156.148) by BLUPR03MB102.namprd03.prod.outlook.com (10.255.212.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.517.8; Wed, 22 Jun 2016 13:54:14 +0000 Received: from BL2FFO11FD055.protection.gbl (10.255.156.132) by CH1PR03CA003.outlook.office365.com (10.255.156.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.523.12 via Frontend Transport; Wed, 22 Jun 2016 13:54:14 +0000 Authentication-Results: spf=fail (sender IP is 66.35.236.236) 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.236 as permitted sender) receiver=protection.outlook.com; client-ip=66.35.236.236; helo=sj-itexedge04.altera.priv.altera.com; Received: from sj-itexedge04.altera.priv.altera.com (66.35.236.236) by BL2FFO11FD055.mail.protection.outlook.com (10.173.161.183) with Microsoft SMTP Server (TLS) id 15.1.517.7 via Frontend Transport; Wed, 22 Jun 2016 13:54:14 +0000 Received: from na01-bn1-obe.outbound.protection.outlook.com (207.46.163.139) by webmail.altera.com (66.35.236.236) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 22 Jun 2016 06:53:53 -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=PpNxKH7oYEyyBywaAOywLbfXfL5OhBkhPcJjHvGcaZw=; b=JDX2nMpXdDEEBTUMJ9KV8dVD41LD+Kg2XkAzErJR7zId2/OMdJcGxp3OI85dBnrdNZidb1ms2GG0SdiRrhC/5Kg6CKXa3yHziJCJ0x2Bhc1RXSKbXAg+r6FFYlk5Y8qfTDk4DnJdv4fBPKZcbpT9LEYy3iTxulCOsdfrCku/Oxc= 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 BLUPR03MB1475.namprd03.prod.outlook.com (10.163.81.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.523.12; Wed, 22 Jun 2016 13:54:07 +0000 From: To: , , , , , , , , , , Subject: [PATCHv5 6/8] EDAC, altera: Add Arria10 ECC memory init functions Date: Wed, 22 Jun 2016 08:58:57 -0500 Message-ID: <1466603939-7526-7-git-send-email-tthayer@opensource.altera.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1466603939-7526-1-git-send-email-tthayer@opensource.altera.com> References: <1466603939-7526-1-git-send-email-tthayer@opensource.altera.com> MIME-Version: 1.0 X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: BLUPR0301CA0036.namprd03.prod.outlook.com (10.162.113.174) To BLUPR03MB1475.namprd03.prod.outlook.com (10.163.81.17) X-MS-Office365-Filtering-Correlation-Id: 18257f79-981d-467b-277f-08d39aa4b26f X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1475; 2:aMGOXu4yC+UNRJxXcfhswcGzbSe3MfnnMTLbI1LnEq1FbxlCIAEQZ/b3DFDuKip4eVAh/l9axbF7jgKF4bUaJ/p7LpaedKE5tLCjJ+lRnQ1Mu9On3zNTNf8jkmcWuY+RyV6nIBdqxNXF9ZC0sKdp675fJDWn4dSSLzv2Dxwmx/i7Nr6nnOvwT2j/H5/VaxjL; 3:c3qf+SphCgkckC5SRS5M9l6b1T5S5cHLyvU7jbqbrbZpdAH6k5d33m+Nzdd33WG+z0+fCqBW8c0eF9A4n0IDd2WBbQdtuR1NofPjh89bpo6PhMLStmVmqqj9L/7fpAvE; 25:lUsFnNckt9zxn5inDeajpWy6vE50PuZ6sqfDPTdYezq8ylyxq8zhRcqtgzrdIkuPC6l3qRgmC/9lucZ4k6pWqZMeWx4xQvNoF8f2smlI2+u+sXaVuEjV+UZS4482q8tPUmBlQrPs1RxuagrkHrePdCnKdtVm2WkDcXR9bIioOMt2cAudv+x0WmKwlhuASFLLG7384vPir8o8CYx4XB9fW0WS5Gb56QLLbqRUx2dllsj0CA7NKuk4vuqJQSV9zNiNMXlAPQIf1zPef72Yohaptkkj2cfUoY+Lszna1JUVI/V29o7I00gUYJQ9q3C+BL5IHDwCTGf88l9ttiUMLIxw04VUAoVyWGKhyqmB/wt66ykbsYbIukpDnA4r2IJUsYrCfNxTBRAwxI5zUNKV9KU18f7J/GAPlotDO5JCxGtjHQw=; 20:9ZDbldiatIXfrgf1PHDoAWeMLHVUDWP+PtAggbmD0U6fNsfv6PgNsRNd+EGnos+Cd/ZhWg04zFBqSzv+1Ulcui1QfEVEPGKZcatHFmLczTihvHRj9haZufgXXAFwg/N7jDClYN4uQrHmcuJCWCPrgSXaTEWJy8hsrHWbhC11KKQ= X-Microsoft-Antispam-Untrusted: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1475; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(80048183373757)(788757137089); UriScan:(80048183373757)(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:BLUPR03MB1475; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1475; BCL:0; PCL:0; RULEID:(601004)(2401047)(13017025)(13023025)(5005006)(13015025)(13024025)(13018025)(8121501046)(3002001)(10201501046)(6055026); SRVR:BLUPR03MB102; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB102; X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1475; 4:n4a3r2sv0eaLb3Rfq/3TOp6I+MY9Xh1ep+AYtprjhuFZf/5NOV+5CAXWhtAp89LkmmN+5gBRYRFPv8BPw52Xz0QcPDLXSnmRrAXxMFKK2hXscgykWZr2pY2pveFj3/WI8eXW30Y413zq18V0LkWR5ozYB+IdPl+d+HvPGPO+3BWu/XaVXSSLp9PbLdomUHZrLGJTfkhCh3TcGBb4/braNyceJewqr4QuNe4iJZw52A8Af8BISUvcwGavoCu2lIxUbPuhKYXF73hzgj/JlCaRyxLbeL+bRaPCr2doo/8Ua8YExmmjUdpcB7e82OQv8dI7BYijCxpZ9UX7i0LhyZu1MINFqBpotgLA2vHEwGeLYCJtkKagn5DpmSWgXzuALDp/Mb1a/dD0lrWMqK18zw9lZnKq61sgSLDuPNXSXmnm3apTmlEiuCJaxHFk0qCylZNA4MupFASytHzoKGGrh8dqWg== X-Forefront-PRVS: 0981815F2F X-Forefront-Antispam-Report-Untrusted: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(199003)(189002)(2201001)(229853001)(6116002)(2950100001)(3846002)(101416001)(4326007)(586003)(106356001)(2876002)(50986999)(19580395003)(86152002)(48376002)(19580405001)(76176999)(4001430100002)(33646002)(92566002)(8676002)(81156014)(77096005)(7736002)(7846002)(105586002)(50466002)(5001770100001)(107886002)(68736007)(2906002)(47776003)(66066001)(189998001)(86362001)(50226002)(81166006)(42186005)(5003940100001)(97736004)(921003)(4720700001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB1475; 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; BLUPR03MB1475; 23:jifqjvhsyf9JEKBs3IYtqZPfYR95OYFqu628nv7vE?= =?us-ascii?Q?jS4/jCOp82GlVzPSxBeOigkEEgjK9BOGk8xH1GQILfwQkltfPZ3d4Xtw8ZhA?= =?us-ascii?Q?2PbdwXJ1ux2LrOeyiNv7uhjCD4/dnBppSJDGmRUWouA84Bx/hFpmcPiyVKy8?= =?us-ascii?Q?UBbOZmEgwCcPBvl+G5YXyYhFlwMdD69eGaZ+dNrsUO2fC9dsPxx9hVscZy0B?= =?us-ascii?Q?ZyBbgkhMchPOqYE1QScD1oOTS1HI8/GAWT7o6EpwuZnWQj2HN7+/QIKe3Qyy?= =?us-ascii?Q?3AaWFvWKotkd5aiLexymXfK/qTj7pbby2tmsdvCDHjRkFp1rFDSUQiMvN95o?= =?us-ascii?Q?ofwhtFTiAR8Q/+KKJX/iem4wmTdYYDjO0uA2vzX1Qh1NLeCxWrMYvl4FR6EW?= =?us-ascii?Q?usLM+vuNEKvBeSQeozsDAK7iNFmZx085xDfaxkuegob1sd3leZKQkYDWzRL6?= =?us-ascii?Q?RJRo/z0Bm1SgfTDdlVFqSEPEtOXW93T8eGas5Tf2oLvvISvNP1scsFpDck3F?= =?us-ascii?Q?DPgFCQYcwkAdS1BWIpOZTgKEw0O4pyBbsG2gwYWYnH+JW2cuaB5yUjO3yhG/?= =?us-ascii?Q?wXvCTPxrIPibKNxa4Xb6XTewd+/ETy9CS31/HTR4AdUMpW7V1LF2P9+epI6E?= =?us-ascii?Q?pYNzAsFpG0Ic+rbmbHnOBARfAcsPPht5T4gxU/UDRPeXwb235r+z1LftoFaX?= =?us-ascii?Q?qAwFdyHyFpUGyyUwwwUgZRl3TiCdckTO3+10zq4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LYj7nWfqydiqdmGA3ghBg==; 24:XiCg/mDM+NtpOPjMoGwx1e0ETxVZ9e+2eJX4ZTrr52WWemFXL7S1nXyhhqYEjfSAafN531FCKtYtqfhAcxMfmKd3lgtojfFLwFHA2if2u84=; 7:BME18MoOsTCNSi48XHyO4k1tA+NRNV/duXPPExNrTS0iijR6Flthboqmr9z+GTUTgOb1+wXe/GYfJg55r6MKFBgLKx7XUKvJRharS+aRBhrALovdPZz6C7ugcsX9VI4VZKK00Nn8M1aBTsO2f9nQcXxu4T8EC9+Kp34iMOX/JdYvNPFR9ba7zO9PTNGhfqXywkJ6eL/PxLLjgJ6qr3S8E6cmeNqEo9U6G/ZJ8YFji+wc1KT/aDcOxbUxhHQ2r0SoiOvkPZxsz22yDF1mTzflPQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics-untrusted: 1; BLUPR03MB1475; 20:tP6YQkxtT0+YRgGgIhuc8p7j6A7aONy6HCWf7SN3HFzzPYkgsUq6ygaHf3jtpjtlb9mRtL/hRKaNytsueNWbggHm0QH8DlzUZ3GWOOmonPcoIDtcfJYFIuiZ4ZLDE8052U4MDe4d8HEXa9oTF8A/CW7As3C1PtFSWeQctMyw+PU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1475 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BL2FFO11FD055.protection.gbl X-Forefront-Antispam-Report: CIP:66.35.236.236; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(21840400001)(106466001)(8676002)(92566002)(47776003)(7846002)(11100500001)(66066001)(2906002)(107886002)(16796002)(6070500001)(81166006)(4326007)(97736004)(105606002)(956001)(5001770100001)(50986999)(229853001)(356003)(5003940100001)(33646002)(2876002)(81156014)(76176999)(189998001)(8936002)(19580395003)(50466002)(586003)(77096005)(68736007)(19580405001)(85426001)(50226002)(6806005)(2950100001)(4001430100002)(87936001)(3846002)(48376002)(2201001)(3720700001)(86152002)(7736002)(6116002)(86362001)(7099028)(921003)(4720700001)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB102; H:sj-itexedge04.altera.priv.altera.com; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:0; MX:1; CAT:NONE; LANG:en; CAT:NONE; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD055; 1:d8rSOYNfe3bxu3afRDyZWuWbeQ2X/EUEifaQLz1BFkEhmEsEm0FattBb7xmvYxFl1myZupm/KrlmLdOVmZG80P2blOkWxQr/AIaYZKSVBIXvhlav6SIfAtQ8CySN+2WcT7J7y3FML7yiVHWBtBxxOECoGwrQz6Pj1vGSsCIgcTKz8HZCKy87SbSL5WIoTTeDOBRGJSCANP1Ss5odkt60Av6tf66izLDtrJIYuot+WniGOVTFYK3YeRoUGZm8TYbsyPh/dSsxdLIp0NZqogbCi5B4H+G5W9qpOaOsEm4hKRN2FKqdT92OXX9vwHZA/RKiVdhbBaZ5YOvHivITLrZVyc5M28iQsn3+Jo6KF23Lr6bNLmSIHs67NcoJFFO+ZPZI1NfT2AjyHyou4j0Yq49epDfWJgpiQqcMQHuU4FIED38Jq3Ol70ZC8qGpw6tNSs2VqDs0SdaGAJ9F3Cy05vN2gblYmoOWPuCOimr4wmJFmvW8wF4qRKdLtr2iuNDAd87k8gUz/gfIA/ebrOl5CmpeS/srmHAJPMEi2brl3GBQKSI= X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB102; 2:UUwgT+4Sh+Ix97l6DEVBikDztefziub4uiRVDkwrX1vvCEVHw7wkbyGkyhmnyHoNJJM3gE5A7L8Y2mn5v3byIZ09Wybq1pHjasrjnkv6jCVDFjq5+VGJc0wk53g4QN9UDF2dYufq2R0BFfBf3p7cHcaKwsSGgORPi6r2pB1UHXZTu8fMk0oOvmiU6tn1U8rR; 3:+1tnEOnffLBedVUIZY3zQHDbBgIp1PZT4QBlCC2skUf5Ybh/ldfvSsuvWbLbeCjS7k+FS3rdA9Px6VYTh2f/mR5QBWJrmg19h3SNsLrETycgz+mqkyhdLsOPVNcanuniuisnzodDQ/nJ7F4GaZOX8WK9jgcYLbyblZZN5oL/lVQuo4PzygjuWssm7qBo+OWj/fkxBRoYwAFsliEzJ6rdBneLkdsQmKLwa0FByAGOlUjt8hc4iTzm/H1qHUieNRRf; 25:8wMFUvQnqY0a67hPLFNaxG7HVk841r5Kp4xKYR77tTOeVkqSei6lVAm7zgT7aBJ8VpBufxVA1Os5imzEP5M0gUmJoL3ZXVviQgNJVnRMQUDyYAP+xeyW1/xERueDnoAIAGo1ySanD05ImUBZkVPjhFZPHsn31LLnfXiGZrJqbdlfeOHBAablvzxrVflmIm2DXo7R4LcpXelAcHCtraGFOxVfR/qrRhTsq+ftpoQoDu5Svnpg5ErAHQOiU+FIGA0KuSc3f3xcTPZf0Zfzb5VItYP5/G1XhrsUP2dWHwyAz7tCKqrAJwuMgAjyLsWMLh94SIuFURf93NOa+Vy51ofQPuHRNd7zdZn/ZvGrSLWCTznFwXlTWcG9pwlFo436GwrTxv2Bj/bfHhY0x0uss2tPTU0oen7qIoqnVEhU6L6Q3DQ= X-DkimResult-Test: Passed X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(3001016); SRVR:BLUPR03MB102; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB102; 20:VDHHZVYA8tIX+MQMuX5brhGs748MatX9w2gBPmkxBnCvhCOMSv+tn0uJqa7VFXM7EGiLBsr+MyRpBymTIehHR7OcV+06lRNF/b50VmPwH1jPwPBOujVqWIVpQjj/JEDJvScVFzFtpqtDUtHIommUHSWZuFBV+zXcZZxlJapZx4U=; 4:CgirIaIxF8ZyYGlATR0Avr1ORnYqng64CbPO/ru6pbduXUvxcijBxBL9webo8Y1NxthlYWRQUMdlwGh3zHny4X0JPPxvWau+PiZ6lduA32WaTkZtzXun8x8a/rkPq7k9bKi67ZYTgIJH/Q+TAzGRJw5EbQ7C2xADObDhoAnjQl3LbAeo01/IX+Ro7Xh9rdFh3TRVmlLbodAOf3wKDUY4m2xPpplZJYhJuty+QjN+H2tj9fmx4/SVCzEFHzvmXxDz6EJuyeYVFKkyS9AC5+EyDzN88wWaA1Z2aUvhi288FBZXT/UZvc+mBptCchGMch+YQb92b28Axe9r6B5H0Mp0Q59rH/+pWu0Af9gA9aAbdv6gc+vetiZwUD5TUl7m+UVve9qy8AoQWYx43xx+qI9hbHZhyXB0+UrdwE4LANv8JBHH/mhNZXM0Dx2QfGiwMd+EFR7Er0a6BXhaXjitdiZZjVIjurSH0uLPdSpNvZtxRJq88rOkPLJsKJcGOeSwRhasf6jMKlrtMfuBt6amQijhd8kbflibDaOC/FuwHvwe42o= X-Forefront-PRVS: 0981815F2F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB102; 23:ryfsmpOaUDvpmmPiUcwJoO2AAK2+h/+3sJCOYUn/H0?= =?us-ascii?Q?2BZ13uAm+2Se/coZStXUA9nA4ZOid/9Te449/bRJVf8s344Hm8nSYzJ9z4SS?= =?us-ascii?Q?wZqHVijH56lUPKTSdnDf6nsLPsHlDKbeBppNCf73XOUhm8KoglCRJLHmH/1Q?= =?us-ascii?Q?NSqumMjYsmX8zgs2Etpe4FjITHTT7zbuBWW2MURy2P/o9lW4zenm6jwR94e2?= =?us-ascii?Q?vv6r5I9mfyGHa1ksREDqszRTO7fjySsU+1ZMrch7CpoOWOuDL77pczZvo8tQ?= =?us-ascii?Q?1IQM556TvJUU8waemxjxKyAPly8CuxfzAk+pdtnBqoewymbL/1qqjOITegcT?= =?us-ascii?Q?W0cLKbig8bgL+5uRqMExxAzccyrClPnKYBYJKZkrlMJfkjMdQZgkPy7uhbWI?= =?us-ascii?Q?fdNoZsM0Z3ytXhdL1cuUM9YMztCuXtlK6g1HKYvFMVli8MxjpAeKeCLdJKHD?= =?us-ascii?Q?3H+kA4pdRyAlUXbg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Yr46wt4F8UWyZ0pI5Xdtmxgnl/rnpc7wP9XnnBNZu5aq2kbjaTaIixTb/UFlOEdrA31KS81ZmqEqpK6NaLbgyyHwoZHsNB8aPQsFyfwvp8xA2tI2Iy319rcXoWS+9TVSwJxtK6qUveOUD7OIt/EuB2SUESebWloIQ= X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2016 13:54:14.5039 (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.236]; Helo=[sj-itexedge04.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB102 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160622_065437_397739_983150D2 X-CRM114-Status: UNSURE ( 4.82 ) 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, 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-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(). v4 Replace ifdefs with __maybe_unused macro Improve if,else statement in altr_init_memory_port() Remove confusing comment about shared function. v5 No change --- drivers/edac/altera_edac.c | 192 ++++++++++++++++++++++++++++++++++++++++++++ drivers/edac/altera_edac.h | 8 ++ 2 files changed, 200 insertions(+) diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index 2e5940e..6091b76 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -874,6 +875,197 @@ static irqreturn_t __maybe_unused altr_edac_a10_ecc_irq(int irq, void *dev_id) return IRQ_NONE; } +/******************* Arria10 Memory Buffer Functions *********************/ + +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 __maybe_unused altr_init_memory_port(void __iomem *ioaddr, int port) +{ + int limit = ALTR_A10_ECC_INIT_WATCHDOG_10US; + u32 init_mask, stat_mask, clear_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; + } else { + init_mask = ALTR_A10_ECC_INITA; + stat_mask = ALTR_A10_ECC_INITCOMPLETEA; + clear_mask = ALTR_A10_ECC_ERRPENA_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; +} + +static __init int __maybe_unused +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 __maybe_unused 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; +} + /*********************** 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 {