From patchwork Thu Oct 25 06:06:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10655453 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 241D813B5 for ; Thu, 25 Oct 2018 06:08:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C0FB2ABB1 for ; Thu, 25 Oct 2018 06:08:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF4822AC61; Thu, 25 Oct 2018 06:08:21 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6B77A2ABB1 for ; Thu, 25 Oct 2018 06:08:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kYjj3LKstX/DfFk0krKVT1Bqk7KWTfoCcLbb89SBSKw=; b=SHbTl8Z9RpvaTZ yW0TNcJ3LdSs8Y4vJAIIQH1ucSDgHQsQtqPQvucqLzk9N6IGGLZzJGOWxUmrvUy0dTbdgFLyAgW8i IDwsXqgbMc9EZyIXYXRJnK1dsjJmkKaj4L39/DFD/seqNDGXv8OS2qf/qNVvboEYiM8rnUh5uSxsy tEbqC7QjYFYbdj7sAttntBxX69719OPXFzgepHwd9ZFcX7KmMj3/6gOOR8+sqy7audPRKtiPG67xP du9G1q49EP6taBGik39akTHx+qX7PYTkNOJpmSRVCrcu5jOTfMXDxRmM1/tYA36abezPzwwyg37Cr qXHpJVrZKeDs0Tx/1aWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYoZ-0006Be-OD; Thu, 25 Oct 2018 06:08:15 +0000 Received: from mail-bn3nam01on0080.outbound.protection.outlook.com ([104.47.33.80] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYo1-0005rG-Tt for linux-arm-kernel@lists.infradead.org; Thu, 25 Oct 2018 06:07:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QWrBHj5E/kiM/5o3MS/ShoMSIk219+sRT1yXPTUQHCw=; b=zLu7b60v2CWc927jp/LnbbRh0n2KZLyy2fF8VEemLZze2TDFhVbMh8/idS5LY1WHT8URSFTmy3STIQFnKYclNYCFrSPXLw2SkTjCyEmuYTv0O46tG49G5k55BdB1rKjWUh/sUIGFqqx5wryVJsgbEZhQqu3qXhfDFZFjnG1+1EI= Received: from BL0PR02CA0091.namprd02.prod.outlook.com (2603:10b6:208:51::32) by MWHPR0201MB3516.namprd02.prod.outlook.com (2603:10b6:301:77::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Thu, 25 Oct 2018 06:07:28 +0000 Received: from BL2NAM02FT027.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::206) by BL0PR02CA0091.outlook.office365.com (2603:10b6:208:51::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.21 via Frontend Transport; Thu, 25 Oct 2018 06:07:28 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT027.mail.protection.outlook.com (10.152.77.160) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1273.13 via Frontend Transport; Thu, 25 Oct 2018 06:07:28 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1gFYnn-0001Hd-Ov; Wed, 24 Oct 2018 23:07:27 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gFYni-0007wD-Lh; Wed, 24 Oct 2018 23:07:22 -0700 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w9P67HRA030577; Wed, 24 Oct 2018 23:07:17 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gFYnd-0007sO-5S; Wed, 24 Oct 2018 23:07:17 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 48B311216D2; Thu, 25 Oct 2018 11:37:16 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v10 1/6] edac: synopsys: Add error handling for NULL in probe() Date: Thu, 25 Oct 2018 11:36:56 +0530 Message-ID: <1540447621-22870-2-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> References: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(376002)(39860400002)(396003)(136003)(2980300002)(438002)(199004)(189003)(2616005)(106002)(2906002)(48376002)(50226002)(106466001)(36756003)(50466002)(8676002)(81156014)(81166006)(8936002)(7416002)(72206003)(6266002)(26005)(11346002)(305945005)(36386004)(356004)(47776003)(6666004)(478600001)(5660300001)(52956003)(110136005)(476003)(126002)(54906003)(51416003)(42186006)(2201001)(63266004)(16586007)(316002)(186003)(76176011)(4326008)(44832011)(336012)(446003)(426003)(103686004)(90966002)(486006)(107986001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR0201MB3516; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT027; 1:byMssyTHPQmfRj5LeFje//L/eu7d/yrQ7Yp4nNJVRDEGZXKbZO++gDiD7VB69/QzxB8VUEA3T+STNw9ypCgWAXCylxlCXb9FOfXo4vPoppWtUN5RjuNPYUtHUxWMktYk MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88394f85-d50d-4bc3-8726-08d63a40248b X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4608076)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060); SRVR:MWHPR0201MB3516; X-Microsoft-Exchange-Diagnostics: 1; MWHPR0201MB3516; 3:y3pJkAIHDYMFA4OeolbJxnJwXd2jEKqKkDsaDxu1PJVyOfRXGcfPO4G3tHVeiqA1o5JjJZbAoO7blJurF3WTusf2L7szcCxQFQsNjpuqnknWxc4gCQTLOBQIkZ+BkcqmEHF5BueW59B2uwJ1invnT9AUKNs6F1XK7vGlSwuhw7HZGE9LusA8whdPD4aRTXN4n1lJ00wS5WPT6q4ekfEnCAzNJ2vhpZcQKkRb1Nek0NcR1/WMABTqWiXeBBGyFa260MSnNQr2NQr9nfx1HApI+/8eF4yMhFAjjvtaKDbfzSKpphbxGFVggQ2/ZtKYJ3960wnyjIFXANWbdaXTm7RGoDMzTzeTfDtGFC6ukUrtsU8=; 25:HflvybMaEPLefX2Y5RR4LF7/XvKxHI3TouyyBG74DwA111i4qrWQL4JSbAQXwk+A3mcsyV3nDQ1Vl3FENBJoH4H9QcXy+TAIRlwNOprmcVl5Bq/Q7E2gySdlCcGhMFLYxQ2C8QxWxiLOhjXVfYO0oYgAFy8Jb1z1C/7CpvQNj4FhhO6RooxbdsOROf4Myl0OARTfHil1m5j1pDI7Uvu/ZXvwC0xlM1S6jP9mH9l7FMC+p1bvZ+5HhVziCLuEZzRa1+N0YvUDTT73RH9BBPYl9Mf2Fqsu6oNkQue3UDVr+9lA6Mhx5jTGqNxCk4jWfOfSEAhedr8WHrfbSY8FchtrWQ== X-MS-TrafficTypeDiagnostic: MWHPR0201MB3516: X-Microsoft-Exchange-Diagnostics: 1; MWHPR0201MB3516; 31:YvPrl+lQ2IGM7H9pOko3n60nPeOiiFrsMRhE+rj9y+t9jLIXRw78RK92ZuriS4HlHTABgW5amerl5FnIzLLnJN8q3ubnGz3GAPl6iVWE7ao7s6lLLPuyMrDqGIO1pxQQ2bbclqXvGNknXVZH5p2wqu/bpUdAPab/ZC8UNheFd6jtPxhF1cC7HvjK18LEIAdYkPyU8XePRcqx5OrCOR7fKG573+UzwQ6JbyEw0O4Mhps=; 20:GZ9/0Q3wdEv1KS1tkAjPL/olFtJ7h6KhOISRvKxgeOsQPI9/VMMzbjpd9aOiI9WHZgKqyX7k3/Vg4JP9qhjrgOWZeAkvM4HsJtZbH/hUVC2iD9nV1rnwg+0My5QVbfE+/5gxRk0fKNVZfWcG3PTgk4IeJykw+JATJpp7iROcwEsl7tbRqXrAnKVbE1cdBZWHdn8hQVOCkMkP6vyp1VSMpGREYPq621G3QcRoZjEyGEoaLj/8vSoHER4L427wLyYOHCut/1sOcgLcFz9KBg7wJgmRbWZURQL45o3xw14VrpY1HZd5rCpCU3TwWCl2rrjyBxlflILoEHyN4QruBDdYqLXzlZXOyF50bZE+9+kbltslMh/YicXG7KNA3ABa2sEf1+oyDQqrJJ4uDgo6tDIau8ktLGdOq6IJuIVEwTZbSruWn7BC/QEPXfUf13oXrec2TitNHsi9+i/qy+8CJBdmN2dexrHuwEeCbf3aOUWE8fXRIqAdfgQ/8+i86YPgEqK1 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231355)(944501410)(52105095)(93006095)(93004095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:MWHPR0201MB3516; BCL:0; PCL:0; RULEID:; SRVR:MWHPR0201MB3516; X-Microsoft-Exchange-Diagnostics: 1; MWHPR0201MB3516; 4:4WIJqV5kaoQhQrB13mViuPhYjorGx6eml1BXTx8qVIpbCFeusRea0qb95IOQs/Aa8bsmZ85kZGiudbExqaBlkZnAk5Oc74n1JVr3E5yotGThRAHPdY/OGyQDe6p813heyL0FgAG6HZBUhQkboo+mcZnbu0gmqchFp7Crk56sZyUdfGybBI5ibpw3dx+WqO4dYt2+bhoswrygxB5FQT1wquKZ/cXf6x5MCDnzz7Ufs51BOo87zcbrAz80RCbDrltDa1CjUCqhQwdME6npCk7EwFfXL0l+BPgxTcqCHAY/lTd5IYU5Pf2xRDbEBhgVmFbd X-Forefront-PRVS: 083691450C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR0201MB3516; 23:g4i3dG+2qcsJYIqHqcnTUog0v4glpBiz9W4qxpN?= bds/XwU0NkpmJ4O1/NQKIoIEFkLL91MjY4cWbgEQwxTmlHTqUdUIPXWbXlBEEEVFdoqCSz+HsHjTOxs/S91UntlK52Z/Uino//UQhEDsN89yB1x4dvPHBN6ZEOMr3a1VHMetiyV+wJPKJlStaFFzGclqQOvIU9x84MOz07DMw+/lTGcERzQE/tviD1p2p3kUNzkOI+aehDQZS6lpGRIZOwSQ68vG+PP/OQzYORGarxtlC88Ff1VeWN92i7RwvP0QjWgz50f/rqYFvoUdrW5Q1DHyL+kQ7bDaphWKYyfEt0HyFYQS3wCQz9p+r7/e1AFNWVePf/UxWbK0QEmpLatk++v02zOSojDVMgh8dmJzZAADwSh3Pr3NCle0K4XO60YDDgln7iKB1ENTqOKEJ/1X7VWshRqwKueB1GzGVsnlFaD536u92bDQI1MGzDmf+5kQTXZC+Zq0fPMNok9wiMYuWisqzWnVQfbgnFO7OS1AkAd7Xi8G9vjwdMdxiZiiE4hOA0J9BWH5u0OJp1AQevs8O5ZSTt4xuk/bZ2mEz/Vx7dLMHMgxiCSrC617AGrntrpId5euJ3zHVC7tx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MGcpGVwG4G/byvsLmUjPpDbqFwTq7uH9x8GfMiKOI7U6YMP46/nPtrEi2ukhkgOKgfkOumAl3JyhqGbsi9fcpa+OPdhRuBGRcZQ+SPGikH/3TmMj1Zxebm6sVulf6cbr3fvX/X5LfsxhqlzPFXoc1xvZ7dTfq0MjSb/l7OVjU95zcrkJgTZKwe04tCf1geRY1b57N7tYheFnoeD/psWWRjbMbSORD25nY8k3lPtvI98cBjR00x0YY4qoRENT9/+wDgyu0XN8udISmHGax8S4i6KZWhmX8vS6PPUmOl9pfWLCNqbBvuDEN0buoxVEj7TXMcDne11/9zpObINIsd620cnnyR9m08F6Oe17D43z0qRlsRWn/0oPawby1FR9s36CU7YqkTFZ8pWQtpF1n877zcDH2gCsSmcD0MVdHx1bxPOIg==; 5:y8gQb83zE4pLTS2hjsL4ORjnY2HuA9rzz3v8reu6fxeEibl6KLW/p85JTOA+Ewtrj3z+CrlkSsfSrIjKCiU9udWvlxj9zCGgKQ25G4FJcWgzzS2uvPat95eCOXO8phx33pMeusDsIDCOnUA6ddaAU1wfMjv9+efV3PRK/JPbbI4=; 7:/Y+vVQ4Ge5jDVK15HmWs/vFdGrASmjMkfQTzgWtIznAcofvRNghr2Hu8w+9RcjZ99U9vjqK0NSf7A4TrczwtWcUkgcHHJ3d78tYqjN2H4HpNCP6rKq1gxu5XZ2zrINtarg//Ht5ujX7hkEd6hOLsVlHUYOp17ulhTQGybSZRDgElDt7meSccVM5xCBdaDk+ZO/Vyy+jS8SWq4IKY0shsL4pHj/OUQMKkTLX6eSAazayYECEQaV2nmD17frE4+Aa3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2018 06:07:28.3226 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88394f85-d50d-4bc3-8726-08d63a40248b X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR0201MB3516 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181024_230742_049232_187B9C15 X-CRM114-Status: GOOD ( 10.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, 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 The function of_device_get_match_data() can return NULL in case of error. Add error handling for the same in probe(). Signed-off-by: Manish Narani --- drivers/edac/synopsys_edac.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 1c3795d..0005ef3 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -477,6 +477,9 @@ static int mc_probe(struct platform_device *pdev) return PTR_ERR(baseaddr); p_data = of_device_get_match_data(&pdev->dev); + if (!p_data) + return -ENODEV; + if (!p_data->get_ecc_state(baseaddr)) { edac_printk(KERN_INFO, EDAC_MC, "ECC not enabled\n"); return -ENXIO; From patchwork Thu Oct 25 06:06:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10655455 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CF1F113B5 for ; Thu, 25 Oct 2018 06:09:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC38E2B251 for ; Thu, 25 Oct 2018 06:09:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B02192B273; Thu, 25 Oct 2018 06:09:12 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1CD6D2B251 for ; Thu, 25 Oct 2018 06:09:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=34oSzBT5aY8TflLR5EmXy99XNSpm1vKOgL7q+Cb8A4s=; b=nOpwp64q1/GSqC BD5hsUZK75ACh8I09+lPHWnBbe1qogyhZEMJK7S+rqNKAmhb3VGrrxCcYatuSgCGq4wz33sUHmJJQ Y09fBIT6f2InSLkCi4ClEvGv9J1ezAkVgghSSilBRXg0ESqzLurOttFzuULquh9qHjgTsf7t3A3fM mxTS5zMFARJ64oF+CENQQ4JtVKVDG1GjqwkFnx/Z7Td4BYGcE9R81yG+kMhRS1Z6DNPkQEV60R0iY tE5Zh1aENmdjvX2bAKl4gealpW652Ww6C4OJRnM3Z5LyPXyQIv+KMiQLqn6eYl6lXGDbJTdUbgh3u 1Oa7AoKcS4DnSU6M2BTg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYpN-0006UK-Jc; Thu, 25 Oct 2018 06:09:05 +0000 Received: from mail-bl2nam02on0074.outbound.protection.outlook.com ([104.47.38.74] helo=NAM02-BL2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYoC-0005uD-5H for linux-arm-kernel@lists.infradead.org; Thu, 25 Oct 2018 06:08:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LPlgHWwxxGeMmES3iC9R2B0x0FGDcuWpvXvIdyeQU0I=; b=UsoOxX2DT3EDGeul8TjIaZjjzq13+8Ys/DgWHz2smd0GRFccZ44D062nB9Tl7uUBv0oSL2fAahrjHbZGDk25ivGnH01r9vPIXA0uzZATeO6Oc7Pj1dX8ClLJLoycB/nQLUtL3245FenYEL5hZgXuQM9ssXoPXoAalQ4Gth9w9jk= Received: from BL0PR02CA0052.namprd02.prod.outlook.com (2603:10b6:207:3d::29) by BL0PR02MB4324.namprd02.prod.outlook.com (2603:10b6:208:40::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Thu, 25 Oct 2018 06:07:39 +0000 Received: from SN1NAM02FT033.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::201) by BL0PR02CA0052.outlook.office365.com (2603:10b6:207:3d::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1273.18 via Frontend Transport; Thu, 25 Oct 2018 06:07:39 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by SN1NAM02FT033.mail.protection.outlook.com (10.152.72.133) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1273.13 via Frontend Transport; Thu, 25 Oct 2018 06:07:38 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1gFYny-0001Hk-FI; Wed, 24 Oct 2018 23:07:38 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gFYnt-00082B-8f; Wed, 24 Oct 2018 23:07:33 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp1.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w9P67OSl030684; Wed, 24 Oct 2018 23:07:25 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gFYnk-0007xP-L8; Wed, 24 Oct 2018 23:07:24 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id BEADD1216D2; Thu, 25 Oct 2018 11:37:23 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v10 2/6] dt: bindings: Document ZynqMP DDRC in Synopsys documentation Date: Thu, 25 Oct 2018 11:36:57 +0530 Message-ID: <1540447621-22870-3-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> References: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(39860400002)(136003)(376002)(346002)(2980300002)(438002)(189003)(199004)(47776003)(36756003)(126002)(44832011)(36386004)(476003)(336012)(486006)(50466002)(186003)(16586007)(54906003)(110136005)(42186006)(6266002)(90966002)(63266004)(72206003)(14444005)(2906002)(316002)(478600001)(103686004)(8936002)(7416002)(6666004)(305945005)(356004)(52956003)(106466001)(26005)(426003)(51416003)(76176011)(2201001)(50226002)(48376002)(8676002)(446003)(2616005)(11346002)(5660300001)(4326008)(81166006)(106002)(81156014)(107986001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR02MB4324; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT033; 1:Puh4sJJHHzONj6fhGms3VJ418FWXvDyyrCOFp+ndz4iM7JaM0LuK2mmAqYM/Ruk4UGRLRRErbFh4RLVc4No4CtBe0T2pne/47kUFjJw7rAq8SLliRFAKoHT0JBrKwi3H MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bf832eff-5873-461a-568d-08d63a402afe X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:BL0PR02MB4324; X-Microsoft-Exchange-Diagnostics: 1; BL0PR02MB4324; 3:sPzGt/KTUKYVU+3Usol5+T6v8tQTIcsCzy5fD3W9puGpNBkCHjXLtwpMVcWDKg3XscxLpmiLLwSxovOfaKEaJnG2iiqdtb5U1Xva1i+9wqWLfegiOcW30gBGtZbsgbiRmOv0SykGdsaEBBC2r/RxUuvBUinCbx6kGDSjmQvRWVniqa2BW7eokH7CXHctvNRmqDFwKJt3O+IRGGpGT5eFJihCOOfwJVdkPf5LVTxyOofbTthhd/6y4cIVoVy4vOEdlQRQNXdbnfhTksR0FR0I1vkKpjkFsdB2236jHOZ3FWKfxMSbdcafvFldmV2OaGmwc2imlnH4tBzp5g3f2I0SXcjJkHTJ2jT94rogXTwxvdg=; 25:988a5zMgauWLhU/sycWkh7L+NH46Q/2Dcun0eyLlnmWgN/t7+wjB2IH20FTdJ84Q03Eq0xbaugy5w6YHchQjzF9bgFfQ/0e4CsfYHIvCkbBJWaS9jxS9RkVqUb2xvMVt4whMDDefUz8bJlI60RiWqUy5zJVtMxnLweDur2CNp38R99/s4KLr+7Koph92erNl3x6Ir+u0qe1WltmcpVsM90DalEytVvpgK0h0YU6h3dq55YQPcmoN3qaxDbckg14xv/EeSbe3U0mNRICKHKKBWiovdfWla+5mCk7XMd0FplvbzG5iaD7y/6rBx9HZaVO5i0PP1ec2yWtGR8fdMCR2UA== X-MS-TrafficTypeDiagnostic: BL0PR02MB4324: X-Microsoft-Exchange-Diagnostics: 1; BL0PR02MB4324; 31:DIBsPz9lZsprlrk61r9FM4F5DjhMFkf9Vn/tEfi3/2AZCAbxd/a5VbuC/EYSD5ixGPJULTWi+SEfE3k8gMLDR0p19fiLmshrEG1J9gOy+AWQTe0AMILjGPb3ing+YytSBx510OTzQmQKb01u6lEh4ub+Shqn5H3V0pBmAgkGl4fX26Qq/cHIoNUGzuoL5oQs6ouK53xsCco5bbtndDqfPzuGKe02knsfnDv80A6sUfE=; 20:FFNpHAP/ayxvdkrWq9ol0YhcpvYZgwaYTU2cEFgNPwg9tTKU4kMc3gcakjG/9EpZs8Lb9fN+0hvrdNXll8kxQ1cR6c+JencNh0F7OEGts7ohF0I7UG+4nv/eiuydxbfu1D8FIlrcDbmcjY6yhORP5uurXFRc9Gd/ZBOAG5TIUBSYfcIy0P1qy4SYBpzbyV5xg9uLiUsrWGY94dcrJTofqYgrTQYwmkrtnXb908h7yL4yjbEHl0nL/9kx760C4zaG7l/lpjU+l4hBAsCym2HzZq4A68lI9F6twpVF43iwrLw0yFF6nkJ0fAgnapsBXjPDCqFp/iW3iQ34ZpXKuqtAjnKN0TIrTyaeMCmLWoacl5EnZaIhcoqSD4Mjse5vSUjPo2C2PksuzXTHLtTZXNG1k7nxlwyIMnE7Z2u0Fo8wnANoe11YeQJsxTt4q2OC1T4fjQA1Uc5aWxHg0yccqj/ZgbG5sQKlynX/XqS54pR32dbq2BMGoKPJziqL9M21truJ X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(20558992708506)(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93004095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:BL0PR02MB4324; BCL:0; PCL:0; RULEID:; SRVR:BL0PR02MB4324; X-Microsoft-Exchange-Diagnostics: 1; BL0PR02MB4324; 4:KMS4b93hSPWwrYxJytBfEKTwQmezaftbL6Ssa9ZCv+r7OpbWWtULe0PAjULI2f2EvW3/g8cCUVfCpJguzSuy+ODRUECGsw5g5oZMyoPF8XSXk7N20vyRrkSznn9ILiIB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waIwB8PFIBggqORp+ZFrXamgt3yjGJ9HUcGIUmdfiXEi2koYfVG9zKo509iX7i2M3HWorLwSyeKQWnyCrLoOZkVIclbYe974FdK59WFi6xaLQyBlKUQ2OGaePd4pNPWG4MQMLwO4M3HAfm7PYJKzfWYmWkp3XdahTLqJWnrXvXQ8fropgIamCGEQJ9ch+VmNAYAwYA/WNuoRlwug3f4atXinvrA5GPLcEFeFtCvNIXm6roXtJxXe06FdLXXxpyz3ao3j0KQgZX99Ykg4BVqTjByDB9H9NjCJ81Dw==; 5:sXumQtSecYoRmGLvB87lWUCJMPac9k9I9jYcF0W6oVh1KCBQ7tMt9sWqZPYx5OTDjKRtQJOzPCPpVrPAFbvt3jiYezHDLA3kaWymomvGiNWwapb6t9ZxYa1vWQN7uxXIbzwVuacDtdbNPhooXk9gg4Ojs0Y3pXTw41Ws2JBMKcA=; 7:Geiiu52+guEYTNmfyD8J+bGGDKQMnQuFcViiFPsOMXYQwoIe9L9fY4BYtkzt9EooplOzhXANuoHv8oo2nOevjGT5t7N1GS0wwz+ADaeSCA3Pm2CKy5qpubpvzNM9muE35QdLvwtLXzBrFg4aiWETvtt89vLGrD0TnaNbo+K7rYKmJ4EX6okJwVTEyFX9fWrLzZ6vaBhRXI3euKMW4pNhyxDTdZ+DQWIqwKQuZtcxcWaVNzybKqcwIwFO7cIHSMk5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2018 06:07:38.8601 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf832eff-5873-461a-568d-08d63a402afe X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB4324 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181024_230752_281684_B450694F X-CRM114-Status: UNSURE ( 9.16 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Add information of ZynqMP DDRC which reports the single bit errors that are corrected and the double bit errors that are detected. Signed-off-by: Manish Narani Reviewed-by: Rob Herring --- .../bindings/memory-controllers/synopsys.txt | 27 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/memory-controllers/synopsys.txt b/Documentation/devicetree/bindings/memory-controllers/synopsys.txt index a43d26d..9d32762 100644 --- a/Documentation/devicetree/bindings/memory-controllers/synopsys.txt +++ b/Documentation/devicetree/bindings/memory-controllers/synopsys.txt @@ -1,15 +1,32 @@ Binding for Synopsys IntelliDDR Multi Protocol Memory Controller -This controller has an optional ECC support in half-bus width (16-bit) -configuration. The ECC controller corrects one bit error and detects -two bit errors. +The ZynqMP DDR ECC controller has an optional ECC support in 64-bit and 32-bit +bus width configurations. + +The Zynq DDR ECC controller has an optional ECC support in half-bus width +(16-bit) configuration. + +These both ECC controllers correct single bit ECC errors and detect double bit +ECC errors. Required properties: - - compatible: Should be 'xlnx,zynq-ddrc-a05' - - reg: Base address and size of the controllers memory area + - compatible: One of: + - 'xlnx,zynq-ddrc-a05' : Zynq DDR ECC controller + - 'xlnx,zynqmp-ddrc-2.40a' : ZynqMP DDR ECC controller + - reg: Should contain DDR controller registers location and length. + +Required properties for "xlnx,zynqmp-ddrc-2.40a": + - interrupts: Property with a value describing the interrupt number. Example: memory-controller@f8006000 { compatible = "xlnx,zynq-ddrc-a05"; reg = <0xf8006000 0x1000>; }; + + mc: memory-controller@fd070000 { + compatible = "xlnx,zynqmp-ddrc-2.40a"; + reg = <0x0 0xfd070000 0x0 0x30000>; + interrupt-parent = <&gic>; + interrupts = <0 112 4>; + }; From patchwork Thu Oct 25 06:06:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10655459 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0FF2314BB for ; Thu, 25 Oct 2018 06:11:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F17CD2B269 for ; Thu, 25 Oct 2018 06:11:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2D712B285; Thu, 25 Oct 2018 06:11:05 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4F6FF2B269 for ; Thu, 25 Oct 2018 06:11:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Obn6dRb/2RioxEre4KDDVqlhcNddaxV0gqpVkvdfT1I=; b=RKIBx4OIW9KLNi sWvxPg5wHYRQ1G5qdlzc/Ad0cOjc1A1/Oz4uDnryDj+vJxhbcNZCRjPied39viawcyKzUTIt0gIhx Sv+JW26/Vdrv1GMk1Gw5a6sdeQtwlFoADbbP3Wu3KtXmENgpjt0XpNye9WEVdj5lkU7FdmpXh1PBY h13Z8u5Z0vjqQhe2QstM29JU8ASmXmDVWixiLXl7ww8CqumBCzOlcSU/yrBUNAgzIUCyUp9db/phC sHyEdBReiIY9j2B6KOrG24YIK5kEhCplmTorAoxQ/JQ71dMQgqPquHX8yl3LyMv2fbCb/jMoDx453 UCXTVIJjKtWOYAErRVRQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYr9-0008RB-DP; Thu, 25 Oct 2018 06:10:55 +0000 Received: from mail-eopbgr700088.outbound.protection.outlook.com ([40.107.70.88] helo=NAM04-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYoD-0005vO-Dm for linux-arm-kernel@lists.infradead.org; Thu, 25 Oct 2018 06:08:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RrydX7w/R43HiIp1197Q+8fFrak3sf53/5bz4CiF1oI=; b=jF6WiVYIcPsGX/mfWeyfn2Br3h1wlKpb/AdIpjuFyk0urJ9i5aEVuiTznUBHiyrKtI4d6+mM89dpc5Ev9RjeqBe14DVzudlLgcmRazAj6jcnST6ZZ3o4d+O1Yw6+pRPEwwjIPFtdxzlykYItrW/UA0wOBI59m7t228/8Md+ABZc= Received: from BYAPR02CA0020.namprd02.prod.outlook.com (2603:10b6:a02:ee::33) by SN4PR0201MB3517.namprd02.prod.outlook.com (2603:10b6:803:44::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Thu, 25 Oct 2018 06:07:39 +0000 Received: from BL2NAM02FT039.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::202) by BYAPR02CA0020.outlook.office365.com (2603:10b6:a02:ee::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.18 via Frontend Transport; Thu, 25 Oct 2018 06:07:39 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by BL2NAM02FT039.mail.protection.outlook.com (10.152.77.152) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1273.13 via Frontend Transport; Thu, 25 Oct 2018 06:07:38 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1gFYny-0001Hj-AT; Wed, 24 Oct 2018 23:07:38 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gFYnt-00082B-6S; Wed, 24 Oct 2018 23:07:33 -0700 Received: from xsj-pvapsmtp01 (smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w9P67TJ5024444; Wed, 24 Oct 2018 23:07:30 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gFYnp-00080s-EG; Wed, 24 Oct 2018 23:07:29 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 903031216D2; Thu, 25 Oct 2018 11:37:28 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v10 3/6] edac: synopsys: Add macro defines for ZynqMP DDRC Date: Thu, 25 Oct 2018 11:36:58 +0530 Message-ID: <1540447621-22870-4-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> References: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(396003)(376002)(39860400002)(136003)(2980300002)(438002)(199004)(189003)(2616005)(2201001)(52956003)(6266002)(305945005)(48376002)(106002)(6666004)(8936002)(36756003)(72206003)(7416002)(50466002)(2906002)(36386004)(4326008)(103686004)(81156014)(478600001)(5660300001)(47776003)(8676002)(63266004)(186003)(50226002)(426003)(336012)(356004)(476003)(110136005)(81166006)(11346002)(446003)(106466001)(316002)(16586007)(76176011)(51416003)(486006)(54906003)(42186006)(44832011)(126002)(90966002)(26005)(107986001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN4PR0201MB3517; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT039; 1:yeWVzySkzh6osOtDPsK4vXrZfx0eqBBLHQegm25NNvh1PfBcIh4rj1pUBMhSZDnYjnIp12qD96aKWCxE7gQyzhDA4jDKJ19k9qDEgQ2wvwqMaSi1J+p55F56caFV9Bpz MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e13413e3-1160-49c4-a79b-08d63a402adf X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4608076)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060); SRVR:SN4PR0201MB3517; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0201MB3517; 3:MTxqtDAlkHPUHwsilYUeg2WSauHkX9gZsPlAKH7qO6s/UKWEK/Reeiid3PdV6ixdwCa1cLVPWvIbAIMVF2/NZi8ycqzZF9invBIIU/rCTUVL43lRx0db/AVEF7ygWynVdcNux7uK6vtyl8zUsF6xPG63gyBQiaKdDhjiWz9dR8+62HazAb9/TllVW9t8cbWswVLwMnEQxL9XB8NlKGWKkyqvfDk50DOIGHYvdSjcSQK87SmkHQuEm6BNRp8RHwKsPtO8gwLOb0fvuXo3HM1sgkw+pXQtPePAOyS7Eg0o9G/YmlbIif2rGWC7FVpmNBzxCwRtlTH1SxM7c4EPcBLDYrHPj/+P97mTFJr/mj7HmXE=; 25:GCyk5ZPK4hUWpwc+9aAB0dI/GMhsSr358mqXcDfqto6iDoFmGgjGiv/xXpXec6g061Th3Ntzu3hb9kNQ7OZcvTIQIhBYyhp/QfzVkXCzw2K7h5HuQjTnz8TPmwBNfEN1YGZ55VWI1YMa+/hiUdZug8/L6k+mCz+195+CJTJ/KkBI1IYURCOLCBgoQBN8f7VU0tq1EaniULHsURpB8FIUkjn7oQc+nSzRSHAIlzeCqw2NshUIcpyZ4qUfWw4UR5CqqBSaW7Eh1mnNG//xU+d25XhuxxKf6kIWpLWTBKTOX9erSLIGfQcNR4b5SWhDjM+a8s9q5URNHSX6dK+mXDzcpA== X-MS-TrafficTypeDiagnostic: SN4PR0201MB3517: X-Microsoft-Exchange-Diagnostics: 1; SN4PR0201MB3517; 31:cqUKH1KXXqEYOaKwYYxBAmPoiPH464OYI4s/ZsSFFrk5DmWVuZbZZZm2n4pUtEOVfdX9otdRNGLe3wW5TU6mnEeCm8N7Dy/pNahG0Q07SB+dC3t+sY+pyP2dPWWp5tc5/VJEa7t4VmrQYa7H1XOJuLRT5BwKkSEk+/1AhK6OgApGjPbavhv3ccfLJjNJgU2P9Nxvg1ZUQjfZGJt6HcpftPm5IFl/pNwsd+N7RoT1bY4=; 20:cQHSQHWPUZcjCOONEVYOKdmbIDdulwtU0/Gj+nfC30NR9uBvDXRYrVngYLdJ0dafxDHftuUZyw+cBfLUEvrgJOLzpFVEwwOlWqY/bESbxMTlc37A9QVa2S40GqfWcermubrSVykPGKQVS57XOPL4DMvlci2K17E5WLrAD/FO+sg9zySotSh61pBn1LtlW9LOp4ZH8HN3Gbt4oHhLf99+pCjM7BdjxHXISrrsaNL97IwIhp6Tqaam8rHlnhuOkda34on2GlEUcm9Gn6g2Q9BEb/cA6fCu6l+crG69O0LmWqA6XeUscUjHDnCU+Gpe79FGWR9XywSdnYrzL/kd03Wg2TALl0AhV3rR2zkHKJAnfc4B4VraM0sQKiUn7eKtdj8vrbhOg4FWEvVkT/A9JwT07grEsZH9zcxwH/nIRkzM9Ft96+iXY8UwmAdv6F/FlXWIEHejf7q8rotqvebf6rCD5NX2GUahfRfs7GVdtCnQh1SUtVedem4Kqg3J+Wc9gtSS X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(105169848403564); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231355)(944501410)(52105095)(93006095)(93004095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(20161123562045)(201708071742011)(7699051)(76991095); SRVR:SN4PR0201MB3517; BCL:0; PCL:0; RULEID:; SRVR:SN4PR0201MB3517; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0201MB3517; 4:AUM9bcTIMWwRyZEk2VFOoAsmjX/q9PxVJTQN01JIjtA4UCclKVlgKoT6OV4f/9Q8qc74RujOoELPJvVxdVQuPkPGn/vPgQjPS+GXDJwPAd+K8oViLursmUvqN75i/0+yRojv7Pk4MZhnNRhzIWPlbOFP9XEHa+ZZhJ/iR0gjKJsarlQV63MBn1lX1aicCi/hrmhJQFcH6lf0fRaXXLU7Kbisc5pEnYRLSM6z6vOPFqgaL9m2g7cbKsGEKQA+unm9HJd39sxmqwu/5T5opN3NgcQQJf6UWgd35ITa/FV6gk8s1iPsULnsxVlRTPPkczM4Wz/cSizGLj0jTcirSOmqLRb+FVaZdRrr2N8wY0KTJnI= X-Forefront-PRVS: 083691450C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN4PR0201MB3517; 23:v6m5M3oCTnFNbURJeoXwk/PzrKvTCltqrBSUEUQ?= rHyS3KXNUJBkVwsFQ3g6/puv2TVLtfTwfhlSCOkEiQ5VnQELBjRsw03QzvtDGheQpAbxJ7L9dZQY8d9FAL9mLm1bQJ2/qZmQTIWQgCwslMhohaBvSd0/0GkbV0JFJUEq2m2Xia1n3AkC0rRda+InQbabjDK4518XWq6bJ+Dwwji5EX3riveJ3x8JVnW+OLuTVeDQaB9A/h/7W4M7XpftSPErdmOtM/VntCKE8fjEKCVZY8PvM0i57rpXlLkfcnXwq4Z8IWXVIqxcPZjn/bGt3Dz3/M1Th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wEQJg50rLu1h+c/AN7LyO4wr9FF2RhLBgeW57W+JaKIaiorXp7En0QI40u7p1iRsdqCtHoCFGpxuiOJF0Ga6g SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2018 06:07:38.8778 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e13413e3-1160-49c4-a79b-08d63a402adf X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN4PR0201MB3517 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181024_230753_544680_556D8300 X-CRM114-Status: UNSURE ( 8.16 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Add macro defines for ZynqMP DDR controller. These macros will be used for ZynqMP ECC operations. Signed-off-by: Manish Narani --- drivers/edac/synopsys_edac.c | 168 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 0005ef3..d1999e0 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -97,6 +97,174 @@ #define SCRUB_MODE_MASK 0x7 #define SCRUB_MODE_SECDED 0x4 +/* DDR ECC Quirks */ +#define DDR_ECC_INTR_SUPPORT BIT(0) +#define DDR_ECC_DATA_POISON_SUPPORT BIT(1) + +/* ZynqMP Enhanced DDR memory controller registers that are relevant to ECC */ +/* ECC Configuration Registers */ +#define ECC_CFG0_OFST 0x70 +#define ECC_CFG1_OFST 0x74 + +/* ECC Status Register */ +#define ECC_STAT_OFST 0x78 + +/* ECC Clear Register */ +#define ECC_CLR_OFST 0x7C + +/* ECC Error count Register */ +#define ECC_ERRCNT_OFST 0x80 + +/* ECC Corrected Error Address Register */ +#define ECC_CEADDR0_OFST 0x84 +#define ECC_CEADDR1_OFST 0x88 + +/* ECC Syndrome Registers */ +#define ECC_CSYND0_OFST 0x8C +#define ECC_CSYND1_OFST 0x90 +#define ECC_CSYND2_OFST 0x94 + +/* ECC Bit Mask0 Address Register */ +#define ECC_BITMASK0_OFST 0x98 +#define ECC_BITMASK1_OFST 0x9C +#define ECC_BITMASK2_OFST 0xA0 + +/* ECC UnCorrected Error Address Register */ +#define ECC_UEADDR0_OFST 0xA4 +#define ECC_UEADDR1_OFST 0xA8 + +/* ECC Syndrome Registers */ +#define ECC_UESYND0_OFST 0xAC +#define ECC_UESYND1_OFST 0xB0 +#define ECC_UESYND2_OFST 0xB4 + +/* ECC Poison Address Reg */ +#define ECC_POISON0_OFST 0xB8 +#define ECC_POISON1_OFST 0xBC + +#define ECC_ADDRMAP0_OFFSET 0x200 + +/* Control register bitfield definitions */ +#define ECC_CTRL_BUSWIDTH_MASK 0x3000 +#define ECC_CTRL_BUSWIDTH_SHIFT 12 +#define ECC_CTRL_CLR_CE_ERRCNT BIT(2) +#define ECC_CTRL_CLR_UE_ERRCNT BIT(3) + +/* DDR Control Register width definitions */ +#define DDRCTL_EWDTH_16 2 +#define DDRCTL_EWDTH_32 1 +#define DDRCTL_EWDTH_64 0 + +/* ECC status register definitions */ +#define ECC_STAT_UECNT_MASK 0xF0000 +#define ECC_STAT_UECNT_SHIFT 16 +#define ECC_STAT_CECNT_MASK 0xF00 +#define ECC_STAT_CECNT_SHIFT 8 +#define ECC_STAT_BITNUM_MASK 0x7F + +/* DDR QOS Interrupt register definitions */ +#define DDR_QOS_IRQ_STAT_OFST 0x20200 +#define DDR_QOSUE_MASK 0x4 +#define DDR_QOSCE_MASK 0x2 +#define ECC_CE_UE_INTR_MASK 0x6 +#define DDR_QOS_IRQ_EN_OFST 0x20208 +#define DDR_QOS_IRQ_DB_OFST 0x2020C + +/* ECC Corrected Error Register Mask and Shifts*/ +#define ECC_CEADDR0_RW_MASK 0x3FFFF +#define ECC_CEADDR0_RNK_MASK BIT(24) +#define ECC_CEADDR1_BNKGRP_MASK 0x3000000 +#define ECC_CEADDR1_BNKNR_MASK 0x70000 +#define ECC_CEADDR1_BLKNR_MASK 0xFFF +#define ECC_CEADDR1_BNKGRP_SHIFT 24 +#define ECC_CEADDR1_BNKNR_SHIFT 16 + +/* ECC Poison register shifts */ +#define ECC_POISON0_RANK_SHIFT 24 +#define ECC_POISON0_RANK_MASK BIT(24) +#define ECC_POISON0_COLUMN_SHIFT 0 +#define ECC_POISON0_COLUMN_MASK 0xFFF +#define ECC_POISON1_BG_SHIFT 28 +#define ECC_POISON1_BG_MASK 0x30000000 +#define ECC_POISON1_BANKNR_SHIFT 24 +#define ECC_POISON1_BANKNR_MASK 0x7000000 +#define ECC_POISON1_ROW_SHIFT 0 +#define ECC_POISON1_ROW_MASK 0x3FFFF + +/* DDR Memory type defines */ +#define MEM_TYPE_DDR3 0x1 +#define MEM_TYPE_LPDDR3 0x8 +#define MEM_TYPE_DDR2 0x4 +#define MEM_TYPE_DDR4 0x10 +#define MEM_TYPE_LPDDR4 0x20 + +/* DDRC Software control register */ +#define DDRC_SWCTL 0x320 + +/* DDRC ECC CE & UE poison mask */ +#define ECC_CEPOISON_MASK 0x3 +#define ECC_UEPOISON_MASK 0x1 + +/* DDRC Device config masks */ +#define DDRC_MSTR_CFG_MASK 0xC0000000 +#define DDRC_MSTR_CFG_SHIFT 30 +#define DDRC_MSTR_CFG_X4_MASK 0x0 +#define DDRC_MSTR_CFG_X8_MASK 0x1 +#define DDRC_MSTR_CFG_X16_MASK 0x2 +#define DDRC_MSTR_CFG_X32_MASK 0x3 + +#define DDR_MAX_ROW_SHIFT 18 +#define DDR_MAX_COL_SHIFT 14 +#define DDR_MAX_BANK_SHIFT 3 +#define DDR_MAX_BANKGRP_SHIFT 2 + +#define ROW_MAX_VAL_MASK 0xF +#define COL_MAX_VAL_MASK 0xF +#define BANK_MAX_VAL_MASK 0x1F +#define BANKGRP_MAX_VAL_MASK 0x1F +#define RANK_MAX_VAL_MASK 0x1F + +#define ROW_B0_BASE 6 +#define ROW_B1_BASE 7 +#define ROW_B2_BASE 8 +#define ROW_B3_BASE 9 +#define ROW_B4_BASE 10 +#define ROW_B5_BASE 11 +#define ROW_B6_BASE 12 +#define ROW_B7_BASE 13 +#define ROW_B8_BASE 14 +#define ROW_B9_BASE 15 +#define ROW_B10_BASE 16 +#define ROW_B11_BASE 17 +#define ROW_B12_BASE 18 +#define ROW_B13_BASE 19 +#define ROW_B14_BASE 20 +#define ROW_B15_BASE 21 +#define ROW_B16_BASE 22 +#define ROW_B17_BASE 23 + +#define COL_B2_BASE 2 +#define COL_B3_BASE 3 +#define COL_B4_BASE 4 +#define COL_B5_BASE 5 +#define COL_B6_BASE 6 +#define COL_B7_BASE 7 +#define COL_B8_BASE 8 +#define COL_B9_BASE 9 +#define COL_B10_BASE 10 +#define COL_B11_BASE 11 +#define COL_B12_BASE 12 +#define COL_B13_BASE 13 + +#define BANK_B0_BASE 2 +#define BANK_B1_BASE 3 +#define BANK_B2_BASE 4 + +#define BANKGRP_B0_BASE 2 +#define BANKGRP_B1_BASE 3 + +#define RANK_B0_BASE 6 + /** * struct ecc_error_info - ECC error log information. * @row: Row number. From patchwork Thu Oct 25 06:06:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10655457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 662D917F3 for ; Thu, 25 Oct 2018 06:10:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 533862B269 for ; Thu, 25 Oct 2018 06:10:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46A192B285; Thu, 25 Oct 2018 06:10:14 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 054612B273 for ; Thu, 25 Oct 2018 06:10:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Bvda3R/cM3YADKizSKNBTrcHjc0HYUvR952Pkg3c67c=; b=LSXGc4tCTHvAzJ JYxtSq8Lfvyzov0kJxATxR6Lqa1q94VTF3CU1SmYzsH9THyRqJ5rESNo2qC7nuJwBrLFkGeqK8iMp m6SvAS9MhIz6wkNFrwuMaFePPItgscsP3ELsjdk4g3Zw8NT/5cR12s6KEdZiARinjYpvAYipUQw3i +rUxa7DFtwuaGNczAzYUoepSu9Px9FjDod3MNtaJWh9Aa7/WTBdRYi95qEIQqDghRivaaLvvkU3m+ oEkLAa6wWm+/tyhcRKnZMPZhG1zHeZDkqV589gzCKryyk4auXwOQfJvLjkByQlGd88HnG5YPREX8E GMvKNio6zxJp9bfJ+/YA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYqJ-0006nL-N9; Thu, 25 Oct 2018 06:10:04 +0000 Received: from mail-eopbgr710058.outbound.protection.outlook.com ([40.107.71.58] helo=NAM05-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYoD-0005vD-3F for linux-arm-kernel@lists.infradead.org; Thu, 25 Oct 2018 06:08:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OMA3ZVxZu51r827+tESsEwFICOQbtgnkTp/bMr/A6m8=; b=xPOuHfsdz348zyYU6fgdEwYTQPjTAqkZ7nqFFnGJWWMSbhAKcJ2HnOEqOKi/kizm69IKi1rg6B3HIejZEIcjPFX6MAk82fsfVO/WbAbjlmo2WrWEYayE/SwPoYeJhZT3gmbqxYfVWOp+oX+aS1wmuELWkB/1xhI2Wk6O7E/eR3Q= Received: from MWHPR0201CA0020.namprd02.prod.outlook.com (2603:10b6:301:74::33) by SN6PR02MB4336.namprd02.prod.outlook.com (2603:10b6:805:a4::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.18; Thu, 25 Oct 2018 06:07:40 +0000 Received: from CY1NAM02FT021.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::203) by MWHPR0201CA0020.outlook.office365.com (2603:10b6:301:74::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.18 via Frontend Transport; Thu, 25 Oct 2018 06:07:39 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by CY1NAM02FT021.mail.protection.outlook.com (10.152.75.187) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1273.13 via Frontend Transport; Thu, 25 Oct 2018 06:07:38 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:51370 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1gFYny-0005qd-9q; Wed, 24 Oct 2018 23:07:38 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gFYnt-00082B-2v; Wed, 24 Oct 2018 23:07:33 -0700 Received: from xsj-pvapsmtp01 (smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w9P67VVi024464; Wed, 24 Oct 2018 23:07:31 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gFYnq-00081U-Jq; Wed, 24 Oct 2018 23:07:31 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id AEB9D1217F6; Thu, 25 Oct 2018 11:37:29 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v10 4/6] edac: synopsys: Add EDAC ECC support for ZynqMP DDRC Date: Thu, 25 Oct 2018 11:36:59 +0530 Message-ID: <1540447621-22870-5-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> References: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39850400004)(136003)(396003)(376002)(346002)(2980300002)(438002)(199004)(189003)(2906002)(478600001)(2616005)(446003)(11346002)(426003)(51416003)(103686004)(47776003)(90966002)(76176011)(476003)(106466001)(126002)(36386004)(44832011)(486006)(36756003)(336012)(7416002)(186003)(26005)(6266002)(50466002)(48376002)(8676002)(4326008)(5660300001)(63266004)(52956003)(14444005)(305945005)(4744004)(16586007)(110136005)(54906003)(42186006)(356004)(72206003)(6666004)(217873002)(8936002)(81156014)(81166006)(106002)(316002)(2201001)(50226002)(107986001)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR02MB4336; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-100.xilinx.com,xapps1.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT021; 1:R4Os8huHPG+aPAEvSOXds9Jn4ccMiG3yJUC6nRonMvn7gunhtMUa/iZ+wTR1YFqRpDO/3DhV6CzvWrlgz5cNt2iMvjX3SJHh+7EN5vNSJi59SH9VLGeCNaCvD2PQdNnR MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e57ce1ab-4c45-4732-b811-08d63a402b17 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4608076)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060); SRVR:SN6PR02MB4336; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4336; 3:e0BFa0l02UlGVXkWwaP69I3V1jQdzMjKP7Tokg2QGsSWzlGOXDVNBJBlJHUilByBc0jSEqWUNFdBIiPoyyznNMnjwoIqT6w7TjSZhwygrBdcuuAvsrdxO2rX2/WSK3miuTXVPLjQKlFU8lrC1atot3sKE0xn7owdkjyXDe762hugclfwxF5cHpUGI/vjywcAKUX81vJYKyeHwhq+Eiz2cMRfuit0Umr22J2BXdbFwlOYs/CjgNUIens0WFs6yimDiTT3BVy52jGZd+MLWLOGkt9xB4dxzmwmOvNi4415qeM7dC2mMQDouPdCN740S+M9mSfBrV7eczbRuziVBOe9bb/tUbrnZM9jj6aAqLGnqo4=; 25:REwUxXuumACq+tVD3CXuwJoLdSRhTBHpKvj+vXy1xTRf5eezdwmBtKDDexwmQdwll4YhN5t5Q9Jj7A++y6lLtw3j+RyExTJfAfeSioSI/ea1Dqss9oOLW4NWBdE+w70LSfWpOOmY8jY88HDLq60vTzAO6u4gE1m+AhHPSgbo7VPhQVEsHPUFVclGTuhT3UrtSdf9jYsaFfdRlm//x7VFP/so/ALIO2J4ntZzwIQ0utVyiBvkUwmgO28z7IlqdngJq+Iq9ApbzKPkaqz7S88/GLo6vKNzbnKX8qoiprGJliBhiHAzMJBQvka+wnzcZhacDCPjglGbR4wYFSS3HprnfA== X-MS-TrafficTypeDiagnostic: SN6PR02MB4336: X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4336; 31:EwmXye7IuxTcPrOg0lR7vUPpJ+QXQEWDWs6ZCNBgZ3O4Ugy3XrAmBF08+UbYsEdDABNHdRv7jdBLvEqwnqaphQx9cdFPgx/yU5vz9lgVmxiiWVSS51UmhI/fw+xgueafql3WI2nwcmseSafkQbg7yQym2Efq9cv8UOY5bODFSn+rMrMNH77T97z3J6RcIvPn2QnukIdb7THcTt06Tc7LqlYD29d9P5RUE1FSdbEmHBU=; 20:/lPLsNFWMogNyTrzoiRKk2HJCbd93X2nN7jxySYqQePhLXMha7Is/lpWjyUoy8PLnW7Qge5dVDjgeE0a9iMh0VNq4JRtBASUoKsq/+A16uylB9+S5uqSYqvqWCfPl/R80kUJjXoAfxQk4FA/dU+G9cpzXGyE/knnsAZ95G+Dtx4t2ZUEk4e6KlGuR9ANQwvMszLkengyO+GptywadBi8K4rtr+a9Tpzffbn7lpGxI+fsccBAIfcli4QxBFb4hNQa6gu6htYDgWh9tXgfkzKk4by+6CGIok/uOBZZG0m1ML4erqQuvmTa7vfcgep01bp45b/3vnMO95t78g/VKNwoWildaYbFjzaSPFVCaeQc8yK5xFNrmRr9awi7Gk0WVzCFqGYIRjL1q4zzrhqAMerSVhWYEAjriZ0eZDAHrBvzDm3YGHceYNhYk6M92zPMGAq4M9DwD9/7TJH0+MWun8zG4N/adVr9IP09UM/FHri5ToLBFiER3d7x4vc7EqJMUztc X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(105169848403564)(163750095850); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93004095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:SN6PR02MB4336; BCL:0; PCL:0; RULEID:; SRVR:SN6PR02MB4336; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4336; 4:d9aZ4G8buie/PVJo9AEmdlPVzWORI7lxfD6kxaAwrOF6lBSnh1CV5dqHQnxpkkKe4NqcigTm/PwS3zMXzuwSLR+s/IXuEup6FxD4Bnyl15RuDLB6kZzpV7ExC7BjHmXvGhA0aawZG9t5O/CLDzoAgdca+IPLjagxEduT4PKNNZcU3LDlYZBQAFNfBJePn6RmmihZh0B6tkiARafF6siyOElGKzfnYY63KCHn/Brz29dEMXHXYcx5sWaBUd5aapcaPvj1Hln3Cwdj1m1lOcXTEUj0mxq3qeBqXstmR0/Y+JOhvpek+JI97xCyjdAmwHHu//0xgK1ERG44O9pc2G4tvkccZDjY1JX8WFCza9/xsYmnyHvExJIxExnE3tAaSH+V X-Forefront-PRVS: 083691450C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN6PR02MB4336; 23:6JoLm5RAfDG5VJ47v/T/kuro7mSXwwpCFb3zP5oYg?= lLX/RGAOOWMnPKeXthTI29Mg2hgDuhJxItB6Gf5cyk31uVYv4pLgFyRQWBuBR2iBbiQ7jjyMVbpp6utsH9ELZw2QYZRf4OEMORIaCRFaSjvNCzpCxA2Rl4ac7xjp/Cs9tag9gIERIX3844dMEmD1DKbt9KAeMw8TqXsdTDn+LTVbUPsid4q6HfbUIXq9XRMuu/w5Yk2zcEh8susB9QUUWmXtHd0K2cEmZ96/6J6xI2lmgItUuibUY06K1BbsvsVHK+yhFK73Mu21fhUN1XNOaiSutcvRZ0R+9NliApEE47+Dm/jK3MWLBX1y7iy0W29nSj4m3do3EQOKbQaU28AL9HvItIuUV1kYZzcdVJXEycrO5TUXlecI+JI3pze4assW+d/eDuWGczJiYACXnn4e0CDmETnJfTh4FTQtE1lCWIMNPTyIMWAngNK5j61UngePMs165mLAVzCzIkWavkLzimKemEhbE87AEbSF5MJ7hMdnm6ubo4loy4Z/I/8yhBzumkh4Ib4i59U0YiS/NI4RgAMHf0TsuJlGEo9z08+/q9CGT5B+ZghT7EwtLayltN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sNb23KUWjyS5AAEg= X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4336; 6:w6PrTQQN6GfelEnME1alD5M45zxFM+nD0S3OTJaI0IOlfKCeH8WMLqRFaFMvhIOS7RUwtmDswOXCLt5eM5Nlieps81NBNF5+8s6b2VCsetmXehJQdcLPVHlocrJJULn3VTbTdjp7hCENwXXpCiAorukkvjTYQjQz8kLeg+8ZEe3BVBaiWbhkzBrprVtueBORTLof7TNbZJ/w/NQ38jtiGMhfEEbTt3Tn/nqLJlqhLZXey48NQd2dB4TSX0yC+sm2VCiNHHugoysWlol4ZZlIqoUm1E9YvwD0RO8veJiK8Mo3WUvJy9JDk7XsXkS2DNvnPbecyfDLmk5mFSmbplfbJmgspPy6qiKKKnT5Z0xJW4JZoBRsBNJWAgCxPdyYu8c2jAAp8VUkz0hIHI9XVsnR0yYndj8pBNj7dgnDMWyWvGxORIWK9NXnf7uq7CnH7Nl5wt/dNiRgZHfPk84sX3VPpw==; 5:Bs4qT0Ag8h0U7i6q/O7I28xSWLqingtRjffZQWeEuRPGutHeFZWugw5i+9N2JauVjENf8gLW0tdzJ15qxb0urdadaPxconsQOdKvTgaKjZcZavc/j4iVNQjLVrools2eT6JfqqqE3SZXbKuwc5ROk825JoajKJLfffM2n1wr0qM=; 7:FBoimuR52QI8zrtGvJ5rciUQIKPrCVSIUo9rzyXGpNtI0DHa37KIOCKA81E3KLneFqRzibjiwZLyB97I+X28d0g+EZXT+9etRD+LBle33J9obJo14R/gseP8o5MZUsRXbecww11GW1k1DxOlbUx5zA== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2018 06:07:38.7296 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e57ce1ab-4c45-4732-b811-08d63a402b17 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB4336 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181024_230753_363484_B7508E57 X-CRM114-Status: GOOD ( 15.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Add EDAC ECC support for ZynqMP DDRC IP. The IP supports interrupts for corrected and uncorrected errors. Add interrupt handlers for the same. Signed-off-by: Manish Narani --- drivers/edac/Kconfig | 2 +- drivers/edac/synopsys_edac.c | 322 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 306 insertions(+), 18 deletions(-) diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 57304b2..7c40eb2 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig @@ -441,7 +441,7 @@ config EDAC_ALTERA_SDMMC config EDAC_SYNOPSYS tristate "Synopsys DDR Memory Controller" - depends on ARCH_ZYNQ + depends on ARCH_ZYNQ || ARCH_ZYNQMP help Support for error detection and correction on the Synopsys DDR memory controller. diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index d1999e0..e81f18a 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -272,6 +273,8 @@ * @bank: Bank number. * @bitpos: Bit position. * @data: Data causing the error. + * @bankgrpnr: Bank group number. + * @blknr: Block number. */ struct ecc_error_info { u32 row; @@ -279,6 +282,8 @@ struct ecc_error_info { u32 bank; u32 bitpos; u32 data; + u32 bankgrpnr; + u32 blknr; }; /** @@ -385,6 +390,66 @@ static int zynq_get_error_info(struct synps_edac_priv *priv) } /** + * zynqmp_get_error_info - Get the current ECC error info. + * @priv: DDR memory controller private instance data. + * + * Return: one if there is no error otherwise returns zero. + */ +static int zynqmp_get_error_info(struct synps_edac_priv *priv) +{ + struct synps_ecc_status *p; + u32 regval, clearval = 0; + void __iomem *base; + + base = priv->baseaddr; + p = &priv->stat; + + regval = readl(base + ECC_STAT_OFST); + if (!regval) + return 1; + + p->ce_cnt = (regval & ECC_STAT_CECNT_MASK) >> ECC_STAT_CECNT_SHIFT; + p->ue_cnt = (regval & ECC_STAT_UECNT_MASK) >> ECC_STAT_UECNT_SHIFT; + if (!p->ce_cnt) + goto ue_err; + + p->ceinfo.bitpos = (regval & ECC_STAT_BITNUM_MASK); + + regval = readl(base + ECC_CEADDR0_OFST); + p->ceinfo.row = (regval & ECC_CEADDR0_RW_MASK); + regval = readl(base + ECC_CEADDR1_OFST); + p->ceinfo.bank = (regval & ECC_CEADDR1_BNKNR_MASK) >> + ECC_CEADDR1_BNKNR_SHIFT; + p->ceinfo.bankgrpnr = (regval & ECC_CEADDR1_BNKGRP_MASK) >> + ECC_CEADDR1_BNKGRP_SHIFT; + p->ceinfo.blknr = (regval & ECC_CEADDR1_BLKNR_MASK); + p->ceinfo.data = readl(base + ECC_CSYND0_OFST); + edac_dbg(2, "ECCCSYN0: 0x%08X ECCCSYN1: 0x%08X ECCCSYN2: 0x%08X\n", + readl(base + ECC_CSYND0_OFST), readl(base + ECC_CSYND1_OFST), + readl(base + ECC_CSYND2_OFST)); +ue_err: + if (!p->ue_cnt) + goto out; + + regval = readl(base + ECC_UEADDR0_OFST); + p->ueinfo.row = (regval & ECC_CEADDR0_RW_MASK); + regval = readl(base + ECC_UEADDR1_OFST); + p->ueinfo.bankgrpnr = (regval & ECC_CEADDR1_BNKGRP_MASK) >> + ECC_CEADDR1_BNKGRP_SHIFT; + p->ueinfo.bank = (regval & ECC_CEADDR1_BNKNR_MASK) >> + ECC_CEADDR1_BNKNR_SHIFT; + p->ueinfo.blknr = (regval & ECC_CEADDR1_BLKNR_MASK); + p->ueinfo.data = readl(base + ECC_UESYND0_OFST); +out: + clearval = ECC_CTRL_CLR_CE_ERR | ECC_CTRL_CLR_CE_ERRCNT; + clearval |= ECC_CTRL_CLR_UE_ERR | ECC_CTRL_CLR_UE_ERRCNT; + writel(clearval, base + ECC_CLR_OFST); + writel(0x0, base + ECC_CLR_OFST); + + return 0; +} + +/** * handle_error - Handle Correctable and Uncorrectable errors. * @mci: EDAC memory controller instance. * @p: Synopsys ECC status structure. @@ -398,9 +463,25 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) if (p->ce_cnt) { pinf = &p->ceinfo; - snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, - "DDR ECC error type :%s Row %d Bank %d Col %d ", - "CE", pinf->row, pinf->bank, pinf->col); + if (!priv->p_data->quirks) { + snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, + "DDR ECC error type:%s Row %d Bank %d Col %d ", + "CE", pinf->row, pinf->bank, pinf->col); + snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, + "Bit Position: %d Data: 0x%08x\n", + pinf->bitpos, pinf->data); + } else { + snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, + "DDR ECC error type:%s Row %d Bank %d Col %d ", + "CE", pinf->row, pinf->bank, pinf->col); + snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, + "BankGroup Number %d Block Number %d ", + pinf->bankgrpnr, pinf->blknr); + snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, + "Bit Position: %d Data: 0x%08x\n", + pinf->bitpos, pinf->data); + } + edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, p->ce_cnt, 0, 0, 0, 0, 0, -1, priv->message, ""); @@ -408,9 +489,19 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) if (p->ue_cnt) { pinf = &p->ueinfo; - snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, - "DDR ECC error type :%s Row %d Bank %d Col %d ", - "UE", pinf->row, pinf->bank, pinf->col); + if (!priv->p_data->quirks) { + snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, + "DDR ECC error type :%s Row %d Bank %d Col %d ", + "UE", pinf->row, pinf->bank, pinf->col); + } else { + snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, + "DDR ECC error type :%s Row %d Bank %d Col %d ", + "UE", pinf->row, pinf->bank, pinf->col); + snprintf(priv->message, SYNPS_EDAC_MSG_SIZE, + "BankGroup Number %d Block Number %d", + pinf->bankgrpnr, pinf->blknr); + } + edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, p->ue_cnt, 0, 0, 0, 0, 0, -1, priv->message, ""); @@ -420,6 +511,42 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) } /** + * intr_handler - Interrupt Handler for ECC interrupts. + * @irq: IRQ number. + * @dev_id: Device ID. + * + * Return: IRQ_NONE, if interrupt not set or IRQ_HANDLED otherwise. + */ +static irqreturn_t intr_handler(int irq, void *dev_id) +{ + const struct synps_platform_data *p_data; + struct mem_ctl_info *mci = dev_id; + struct synps_edac_priv *priv; + int status, regval; + + priv = mci->pvt_info; + p_data = priv->p_data; + + regval = readl(priv->baseaddr + DDR_QOS_IRQ_STAT_OFST); + regval &= (DDR_QOSCE_MASK | DDR_QOSUE_MASK); + if (!(regval & ECC_CE_UE_INTR_MASK)) + return IRQ_NONE; + + status = p_data->get_error_info(priv); + if (status) + return IRQ_NONE; + + priv->ce_cnt += priv->stat.ce_cnt; + priv->ue_cnt += priv->stat.ue_cnt; + handle_error(mci, &priv->stat); + + edac_dbg(3, "Total error count CE %d UE %d\n", + priv->ce_cnt, priv->ue_cnt); + writel(regval, priv->baseaddr + DDR_QOS_IRQ_STAT_OFST); + return IRQ_HANDLED; +} + +/** * check_errors - Check controller for ECC errors. * @mci: EDAC memory controller instance. * @@ -427,10 +554,13 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) */ static void check_errors(struct mem_ctl_info *mci) { - struct synps_edac_priv *priv = mci->pvt_info; - const struct synps_platform_data *p_data = priv->p_data; + const struct synps_platform_data *p_data; + struct synps_edac_priv *priv; int status; + priv = mci->pvt_info; + p_data = priv->p_data; + status = p_data->get_error_info(priv); if (status) return; @@ -475,6 +605,39 @@ static enum dev_type zynq_get_dtype(const void __iomem *base) } /** + * zynqmp_get_dtype - Return the controller memory width. + * @base: DDR memory controller base address. + * + * Get the EDAC device type width appropriate for the current controller + * configuration. + * + * Return: a device type width enumeration. + */ +static enum dev_type zynqmp_get_dtype(const void __iomem *base) +{ + enum dev_type dt; + u32 width; + + width = readl(base + CTRL_OFST); + width = (width & ECC_CTRL_BUSWIDTH_MASK) >> ECC_CTRL_BUSWIDTH_SHIFT; + switch (width) { + case DDRCTL_EWDTH_16: + dt = DEV_X2; + break; + case DDRCTL_EWDTH_32: + dt = DEV_X4; + break; + case DDRCTL_EWDTH_64: + dt = DEV_X8; + break; + default: + dt = DEV_UNKNOWN; + } + + return dt; +} + +/** * zynq_get_ecc_state - Return the controller ECC enable/disable status. * @base: DDR memory controller base address. * @@ -484,19 +647,43 @@ static enum dev_type zynq_get_dtype(const void __iomem *base) */ static bool zynq_get_ecc_state(void __iomem *base) { - bool state = false; enum dev_type dt; u32 ecctype; dt = zynq_get_dtype(base); if (dt == DEV_UNKNOWN) - return state; + return false; ecctype = readl(base + SCRUB_OFST) & SCRUB_MODE_MASK; if ((ecctype == SCRUB_MODE_SECDED) && (dt == DEV_X2)) - state = true; + return true; + + return false; +} + +/** + * zynqmp_get_ecc_state - Return the controller ECC enable/disable status. + * @base: DDR memory controller base address. + * + * Get the ECC enable/disable status for the controller. + * + * Return: a ECC status boolean i.e true/false - enabled/disabled. + */ +static bool zynqmp_get_ecc_state(void __iomem *base) +{ + enum dev_type dt; + u32 ecctype; - return state; + dt = zynqmp_get_dtype(base); + if (dt == DEV_UNKNOWN) + return false; + + ecctype = readl(base + ECC_CFG0_OFST) & SCRUB_MODE_MASK; + if ((ecctype == SCRUB_MODE_SECDED) && + ((dt == DEV_X2) || (dt == DEV_X4) || (dt == DEV_X8))) + return true; + + return false; } /** @@ -538,6 +725,34 @@ static enum mem_type zynq_get_mtype(const void __iomem *base) } /** + * zynqmp_get_mtype - Returns controller memory type. + * @base: Synopsys ECC status structure. + * + * Get the EDAC memory type appropriate for the current controller + * configuration. + * + * Return: a memory type enumeration. + */ +static enum mem_type zynqmp_get_mtype(const void __iomem *base) +{ + enum mem_type mt; + u32 memtype; + + memtype = readl(base + CTRL_OFST); + + if ((memtype & MEM_TYPE_DDR3) || (memtype & MEM_TYPE_LPDDR3)) + mt = MEM_DDR3; + else if (memtype & MEM_TYPE_DDR2) + mt = MEM_RDDR2; + else if ((memtype & MEM_TYPE_LPDDR4) || (memtype & MEM_TYPE_DDR4)) + mt = MEM_DDR4; + else + mt = MEM_EMPTY; + + return mt; +} + +/** * init_csrows - Initialize the csrow data. * @mci: EDAC memory controller instance. * @@ -598,13 +813,57 @@ static void mc_init(struct mem_ctl_info *mci, struct platform_device *pdev) mci->dev_name = SYNPS_EDAC_MOD_STRING; mci->mod_name = SYNPS_EDAC_MOD_VER; - edac_op_state = EDAC_OPSTATE_POLL; - mci->edac_check = check_errors; + if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT) { + edac_op_state = EDAC_OPSTATE_INT; + } else { + edac_op_state = EDAC_OPSTATE_POLL; + mci->edac_check = check_errors; + } + mci->ctl_page_to_phys = NULL; init_csrows(mci); } +static void enable_intr(struct synps_edac_priv *priv) +{ + /* Enable UE/CE Interrupts */ + writel(DDR_QOSUE_MASK | DDR_QOSCE_MASK, + priv->baseaddr + DDR_QOS_IRQ_EN_OFST); +} + +static void disable_intr(struct synps_edac_priv *priv) +{ + /* Disable UE/CE Interrupts */ + writel(DDR_QOSUE_MASK | DDR_QOSCE_MASK, + priv->baseaddr + DDR_QOS_IRQ_DB_OFST); +} + +static int setup_irq(struct mem_ctl_info *mci, + struct platform_device *pdev) +{ + struct synps_edac_priv *priv = mci->pvt_info; + int ret, irq; + + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + edac_printk(KERN_ERR, EDAC_MC, + "No IRQ %d in DT\n", irq); + return irq; + } + + ret = devm_request_irq(&pdev->dev, irq, intr_handler, + 0, dev_name(&pdev->dev), mci); + if (ret < 0) { + edac_printk(KERN_ERR, EDAC_MC, "Failed to request IRQ\n"); + return ret; + } + + enable_intr(priv); + + return 0; +} + static const struct synps_platform_data zynq_edac_def = { .get_error_info = zynq_get_error_info, .get_mtype = zynq_get_mtype, @@ -613,9 +872,26 @@ static const struct synps_platform_data zynq_edac_def = { .quirks = 0, }; +static const struct synps_platform_data zynqmp_edac_def = { + .get_error_info = zynqmp_get_error_info, + .get_mtype = zynqmp_get_mtype, + .get_dtype = zynqmp_get_dtype, + .get_ecc_state = zynqmp_get_ecc_state, + .quirks = DDR_ECC_INTR_SUPPORT, +}; + static const struct of_device_id synps_edac_match[] = { - { .compatible = "xlnx,zynq-ddrc-a05", .data = (void *)&zynq_edac_def }, - { /* end of table */ } + { + .compatible = "xlnx,zynq-ddrc-a05", + .data = (void *)&zynq_edac_def + }, + { + .compatible = "xlnx,zynqmp-ddrc-2.40a", + .data = (void *)&zynqmp_edac_def + }, + { + /* end of table */ + } }; MODULE_DEVICE_TABLE(of, synps_edac_match); @@ -674,6 +950,12 @@ static int mc_probe(struct platform_device *pdev) mc_init(mci, pdev); + if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT) { + rc = setup_irq(mci, pdev); + if (rc) + goto free_edac_mc; + } + rc = edac_mc_add_mc(mci); if (rc) { edac_printk(KERN_ERR, EDAC_MC, @@ -685,7 +967,9 @@ static int mc_probe(struct platform_device *pdev) * Start capturing the correctable and uncorrectable errors. A write of * 0 starts the counters. */ - writel(0x0, baseaddr + ECC_CTRL_OFST); + if (!(priv->p_data->quirks & DDR_ECC_INTR_SUPPORT)) + writel(0x0, baseaddr + ECC_CTRL_OFST); + return rc; free_edac_mc: @@ -703,6 +987,10 @@ static int mc_probe(struct platform_device *pdev) static int mc_remove(struct platform_device *pdev) { struct mem_ctl_info *mci = platform_get_drvdata(pdev); + struct synps_edac_priv *priv = mci->pvt_info; + + if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT) + disable_intr(priv); edac_mc_del_mc(&pdev->dev); edac_mc_free(mci); From patchwork Thu Oct 25 06:07:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10655461 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2100513B5 for ; Thu, 25 Oct 2018 06:11:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EB9B2B288 for ; Thu, 25 Oct 2018 06:11:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F38F72B2A1; Thu, 25 Oct 2018 06:11:53 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 66E952B288 for ; Thu, 25 Oct 2018 06:11:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GBm73ig61wS7TYX1G/L3r8N5x/akPmrr10dFfmlJ1PA=; b=bCERbRRc7+pwWf Uw071Hl08OJqx546oLdiPrTMxfh/bI6+BG2AqLPGcGth652inlGHwQX/XgyZRD4GoCnQU3LTkliVZ aiW7bQkUVXJjbX++F+DBL5NXkERazX53qTTqpNXGEmsFsvwl+LWbk9SiBL+nVFMLtKk09fyGIv8IY qOHrZAtF561tkbNki7vsn3Gbh1wPcOeO3NWuaPB9lBS1AFXgUvnCkVO4xJicvONdvCPDtW5Mra/yp MgHuAVm5N/SA/uowFE/0h6nVbBWFPTh3MbMjwvo+/dai6Zw3iRpyc++ep6zJPN+YkJot3kvRr2IdM /2Lna1UU/3/FRG8R0ogg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYrq-0000G5-6k; Thu, 25 Oct 2018 06:11:38 +0000 Received: from mail-by2nam01on0613.outbound.protection.outlook.com ([2a01:111:f400:fe42::613] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYoO-00060q-8F for linux-arm-kernel@lists.infradead.org; Thu, 25 Oct 2018 06:08:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YMxgXdpaNgAtH53DtPuEZr/rZOAcaWNlw0OvpH0MhTY=; b=e0J690lWH0ax0G4ZzFcXzMLS9KDzSouupgXxVLqoyxcvl82WfBdelb+K2ER7xnhglNZkBfmYc1ni4rsN5IDhcGU/7IPy7O7GSiIQppTRQUW0WrN9VWgVqkQ0LpDOdUci2uxCoPGMIMsnJwnF2QRQd+lnxEoQ2myZDH6S65WD0ZE= Received: from MWHPR02CA0018.namprd02.prod.outlook.com (2603:10b6:300:4b::28) by DM6PR02MB4330.namprd02.prod.outlook.com (2603:10b6:5:2a::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Thu, 25 Oct 2018 06:07:50 +0000 Received: from SN1NAM02FT015.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::206) by MWHPR02CA0018.outlook.office365.com (2603:10b6:300:4b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1273.19 via Frontend Transport; Thu, 25 Oct 2018 06:07:50 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.100 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.100; helo=xsj-pvapsmtpgw02; Received: from xsj-pvapsmtpgw02 (149.199.60.100) by SN1NAM02FT015.mail.protection.outlook.com (10.152.72.109) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1273.13 via Frontend Transport; Thu, 25 Oct 2018 06:07:49 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:51722 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1gFYo8-0005qj-LR; Wed, 24 Oct 2018 23:07:48 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gFYo3-00086k-HH; Wed, 24 Oct 2018 23:07:43 -0700 Received: from xsj-pvapsmtp01 (mailhub.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w9P67XQk030756; Wed, 24 Oct 2018 23:07:33 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gFYns-000826-Hk; Wed, 24 Oct 2018 23:07:33 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id AA9D41216D2; Thu, 25 Oct 2018 11:37:31 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v10 5/6] arm64: zynqmp: Add DDRC node Date: Thu, 25 Oct 2018 11:37:00 +0530 Message-ID: <1540447621-22870-6-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> References: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(346002)(136003)(39860400002)(376002)(2980300002)(438002)(199004)(189003)(8936002)(50226002)(110136005)(106002)(186003)(575784001)(2906002)(54906003)(316002)(42186006)(16586007)(36756003)(72206003)(305945005)(36386004)(106466001)(336012)(63266004)(44832011)(26005)(47776003)(7416002)(478600001)(356004)(6666004)(2616005)(103686004)(50466002)(6266002)(11346002)(476003)(5660300001)(51416003)(126002)(426003)(486006)(76176011)(52956003)(446003)(90966002)(8676002)(2201001)(81166006)(81156014)(14444005)(48376002)(4326008)(107986001)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB4330; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT015; 1:fF+MxU5mxJI03yXBOHMA5lUPKS42HmyOBxLOsDirHBEl6JXzXGeUiN6O6zHaCF7Fk7oDN4Hj/JZXi6X23wERowF3mMXACi/i/2ZpijpgoHvUpzqLQjKsq6/DT8trwOIS MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 52ef00ea-4cbe-41aa-0996-08d63a403132 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(5600074)(711020)(4608076)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060); SRVR:DM6PR02MB4330; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4330; 3:cBxA6Amg2axrfCboylV51s99Mc2qKxcOevdwLKnqY6U71ieRnyAzdFtBQ3TRHd6pJ8pAQfncfvtJFtCOsky7avfMZpFUn2CVa2BrRijAC4XM1vDXVtcefi2AwmumIOzEu9GCnLbaZzEbptmi+7mcittgvInPwWAbtnvuzfr9cPKEEVpdz5YRgo2HMcgb/M/CBNCjQjHFZXB9fvUXpfM8TqXTXUKjSS+cNPPb4nG+Tf0pkPShvogFGrCXWw22BAdPpjEjqI0yX6AW3L/QvVG/GwT+PoyqO0UvncWL7f/Bb7+KqA2OeD/Vab1aNWfAkJTta+UAG0Qf/cDje2R9N9CbfSCZHtiH4aJXAkIGcKwPXVs=; 25:GxTQpYHFVURfmAIzROMRCqNf2dHzXd8ZMeZ4APM6EN5zAwruOuOj+dHXPpNr/8Y9OWZIRfojHP8sd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PbjUeVAZs9rx X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93004095)(3002001)(3231355)(944501410)(52105095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:DM6PR02MB4330; BCL:0; PCL:0; RULEID:; SRVR:DM6PR02MB4330; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4330; 4:WrJr9F2mIuzbEiWfkBN2/JEdD+fI18a4KOrbznPsthvJmEhOoSEexms3oCdss7dwfi0TqphkxBONRp83V+lutgeavJRILem3vt+TH9nablMA80gq3yw4bKRh9nFtXUdTq30lfaiDR+FdbWcjtk6Anuevu0WCtN1FAB0RQ0HSkne6O7kv0HSY5dTLGpzBEe/fh+GSUS/e38RQRhorzMiOXsE00VkWgut8YMZ6D5L8UjEcF+LFnWJAZfvRhhMdK2yPUEqtDzr9xRC2NdOxU7H5V0C+wJci8aiAVyMQQqPd0A8i36CbFWIsjiK863E/Y6TV X-Forefront-PRVS: 083691450C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR02MB4330; 23:TVy2COgk/dkHXU+/DGkJKCFYw4Z81lKRRuGZ9HxPD?= qeSH9sNCZ0Jds/sSpzM4sNRWs4N+MvXmwwodEpcflaL8KjPnYQjkbmb6t09WrWDKvCLH6eTha6v/FwNsc3R/yw69dSnGTvzH4OZDU8RQNqGuozmAGMLIhQ2lOVWUDJcchEKkiNgXZlypVAtE3Zy6vxkiCPLMTwt+Iat7zFNTNjlYwp68Tc2YOuoYxd6MHJhAM2EO+/LYT4vHpGsvrrHsSe64cnjqS3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BZ6ksdl6D13K6x836zcAZmcWHd+6BlGRsQlHDQ9VsHMvdRfc1j92cBrPU3+Q99Zdz5TvtYpTI+lYhP5rVuCrcZdQqvq818TXu6CpsgCLu4A49RmTvb9lBKfAbiDgs8dS7Erk/MbjXByQqwZx++MDAXTyIctLnJAaOco3bl2s8ybcVKkMWv/260JnqBGemrv2JlGCDf3/DMg4AF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2018 06:07:49.2809 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 52ef00ea-4cbe-41aa-0996-08d63a403132 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.100]; Helo=[xsj-pvapsmtpgw02] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB4330 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181024_230804_339818_4A2BD149 X-CRM114-Status: UNSURE ( 8.40 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Add ddrc memory controller node in dts. The size mentioned in dts is 0x30000, because we need to access DDR_QOS INTR registers located at 0xFD090208 from this driver. Signed-off-by: Manish Narani --- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi index 29ce234..a81d3b16 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi +++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi @@ -355,6 +355,13 @@ xlnx,bus-width = <64>; }; + mc: memory-controller@fd070000 { + compatible = "xlnx,zynqmp-ddrc-2.40a"; + reg = <0x0 0xfd070000 0x0 0x30000>; + interrupt-parent = <&gic>; + interrupts = <0 112 4>; + }; + gem0: ethernet@ff0b0000 { compatible = "cdns,zynqmp-gem", "cdns,gem"; status = "disabled"; From patchwork Thu Oct 25 06:07:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10655463 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 826D214BB for ; Thu, 25 Oct 2018 06:12:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E2352B2D1 for ; Thu, 25 Oct 2018 06:12:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 605482B2EA; Thu, 25 Oct 2018 06:12:38 +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=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4D9AF2B2D1 for ; Thu, 25 Oct 2018 06:12:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zpIa07yenhi3TI/BfCEExa6hg0zPT2EADMpFd2qYLpk=; b=nmft7ISZoUFAQV KY31kRNZecIFfdwhwhcW+QIU66z91VwHC+zEBSJYdsRhVS0EDD4C1ZKWQnK2xUt1AXevqiCpiwSxH xLa5Z2f9iiSGy6WyAQpYcnn1wLqe6jjzzozpuNpEn2L1VA9MsxNKoco1fW5x097QAhhC2Yk1Tqa37 NkSpbipUIZNOwZTdFzlb0g0dJC37p/MrUlJllfuYdgXS9I74xqrGpLgkvdiKaCI4FFafX612KeFOj v0CwTNBYnEMq4E29jA6AN30I4EC8x4nd6To6N5wD/ll5NnVnQDNVO3f0k7CYx/GLwGACLErQhxnTN 37+JKAjhlW7J9R20R6jA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYsi-0000be-K9; Thu, 25 Oct 2018 06:12:32 +0000 Received: from mail-bl2nam02on0074.outbound.protection.outlook.com ([104.47.38.74] helo=NAM02-BL2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFYoR-0005uD-Gu for linux-arm-kernel@lists.infradead.org; Thu, 25 Oct 2018 06:08:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LDVcshqKFY4h2gi9X7wytynVfvC5Q2YzN+KIajxlotk=; b=RTUdU8s14MJnZ1+qgx6ctUPdESIQN+B21v6bJa/U1VatfaFVPWU7w9cFJmMJEZoPmx7DJweWQepTqLQ+z0qLhMNrSE/tFu2j7CrDx0+kM1r//doxpsfC6q2LBnQ4mL7x3ISPt988w9mOrDSUggf5Mtfs0ei9zOyY4pGJ1WpN5ZU= Received: from BL0PR02CA0107.namprd02.prod.outlook.com (2603:10b6:208:51::48) by BL0PR02MB4324.namprd02.prod.outlook.com (2603:10b6:208:40::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1250.30; Thu, 25 Oct 2018 06:07:50 +0000 Received: from CY1NAM02FT041.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::205) by BL0PR02CA0107.outlook.office365.com (2603:10b6:208:51::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.19 via Frontend Transport; Thu, 25 Oct 2018 06:07:50 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.60.83 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.60.83; helo=xsj-pvapsmtpgw01; Received: from xsj-pvapsmtpgw01 (149.199.60.83) by CY1NAM02FT041.mail.protection.outlook.com (10.152.74.156) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1273.13 via Frontend Transport; Thu, 25 Oct 2018 06:07:49 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66] helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw01 with esmtp (Exim 4.63) (envelope-from ) id 1gFYo8-0001Hw-Q5; Wed, 24 Oct 2018 23:07:48 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gFYo3-00086k-Lg; Wed, 24 Oct 2018 23:07:43 -0700 Received: from xsj-pvapsmtp01 (mailman.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w9P67ZOa030770; Wed, 24 Oct 2018 23:07:35 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gFYnu-00082k-I3; Wed, 24 Oct 2018 23:07:35 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 9BC4C1216D2; Thu, 25 Oct 2018 11:37:33 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v10 6/6] edac: synopsys: Add Error Injection support for ZynqMP DDRC Date: Thu, 25 Oct 2018 11:37:01 +0530 Message-ID: <1540447621-22870-7-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> References: <1540447621-22870-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(396003)(39860400002)(136003)(376002)(346002)(2980300002)(438002)(189003)(199004)(47776003)(36756003)(126002)(44832011)(36386004)(476003)(336012)(486006)(50466002)(186003)(16586007)(54906003)(110136005)(42186006)(6266002)(90966002)(63266004)(72206003)(14444005)(2906002)(316002)(478600001)(103686004)(8936002)(7416002)(6666004)(305945005)(356004)(52956003)(106466001)(26005)(4744004)(426003)(51416003)(76176011)(2201001)(50226002)(48376002)(8676002)(446003)(2616005)(11346002)(5660300001)(4326008)(81166006)(106002)(81156014)(107986001)(2101003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR02MB4324; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT041; 1:FuAb9WP9lmJxhaMDpHyRYQ4gWFO82fHhAR4z/Q2GPMETzz/uaPeSXDtNvg1LISLCPLC5uzWn6DukulSMr53AfIL+qaqxPO5jQbuZCSsaXQAtG7h/A7f49LXBsclgCxpE MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8d19e110-416c-4eaf-25f5-08d63a403163 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:BL0PR02MB4324; X-Microsoft-Exchange-Diagnostics: 1; BL0PR02MB4324; 3:gJONWa+7FU2E3p6h6phN6n88qQyXajgEhpNt2q9gaX+/xom/evyADV4UABYFF8LwlXr9XT7NkL2Bkll48xq+aUnCq7RZphe4F2QnBj625CXvv6HJ+rXcdFWymkowzapt47xIpcAigp3q7Or0egUhCYO2jANNyoOgQhZ7FdxPecMceAMKsdoHCCTvM5vo020+Lx0vm0Hby9yf40xOjcEJbJoj/0fukOJi2GMtvBnk95fRDEcT1cMikATU2aOdJf4Zj3V1u1b83QtgGzqZ9N1+W6DQrJjVdyNFbCp2WuvIJUvuaawVUgj4kN+hFSOc2Zf8aFdsEPBwFF0qClhdiM12/3W50baInhReFm508F0MVOA=; 25:rMcxy5UVzE0eqT3dEUS077pchRc4FBc9AqLx2d1vMgMoXFKaoy4RghNN5/NHQiQBKuCXn0M3FI0ESOcwuW3VgSbElPhN124O9i0m11BaoCQJMGvho6y33GSxw8RyfFFQho0fE7qPUxOGdH50sNFj2thwvPozhPw3T7J6ix4ArxCiFhY0ucbUJ2r2c19sE/b+gzGyDoWPsaMOdSS4pEQVrZTS1guiGfKr7cBLIYXQbcOUjHHB5Wl4sOrR29hwK78r+0zfpikMO0Bys0MZ0WyviAutsiSawsDOmF1ecNlnyxdtXXs733hzy6DGjsY57m2hKsiG4+QAc3FgpyBR/koICg== X-MS-TrafficTypeDiagnostic: BL0PR02MB4324: X-Microsoft-Exchange-Diagnostics: 1; BL0PR02MB4324; 31:m4FRU6sv+yOrTKs08SjluzbyG2shyymE1wcYZLXVRn12XhU4CEeq5w6CE/dFSPB4MvGcO9bqbY97yH69piIMzJpMKHNH+N664WfagCkKryKphK7RtYU2UHLjt5oNDcCGGPVAAORK89TyHtkZdYAQdNFQkkHyAe9xQdydwi7PlX9+h/r9g5nB8X1oyy91mrlcFo2IW/gkU6+nj9SC4kuWuXnIauPSosWhkWcNujs0o2U=; 20:gIuK4WKANIf8loelivJMSiK+V/+Jkb+wdKdizLRBd5QLWN1r31zWx6UT4TuH2FqxHHcH5RFk78qZNYVMyUxFMBC6xlZJ50God+gmzWecF2jG8bOFw1Rdefrmp5DeZd3o7vcgprxZUGku0O7xIpS4HkgvWVptSmyQAkzl6XjqV0706sBUsqYkoPhx4oBe9cU0dfXvtQzQny067GRDdr1jA3iKwvChG9XPZKAhOrWOjRccJgRnp5sXZCv59WTKvNXDuRbXPTiAoqc5oYdpwRpNK/zoHp4k1IEPdFNip02aKoMabEAw9RxwnxA7xlcjGCu63gjJRNLjRl+RHqncpOfjX99LTMehCgSe2z0HguYrraSQXLnH3pGdN4beAweFCWRKcBSrfrVVXnSPRE0OyoVLq3fMnbgUyRK8cWu3wCIyJUmyjFGfe2/07SoaYiTFgYNRqsfS3gNII7pSSkrHU3GT3I5lGAGfTxfxxQa/aZ0D4EJm3PmkyKe+gVoduPerhjsB X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(105169848403564)(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93004095)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:BL0PR02MB4324; BCL:0; PCL:0; RULEID:; SRVR:BL0PR02MB4324; X-Microsoft-Exchange-Diagnostics: 1; BL0PR02MB4324; 4:quttBAeiwQ1Yk9W2b41lIxROJNTXVrMV9fVMBmyuRs7dDU4rllL2/XJo6nue0umvshUbG8gnElLVHwAvEtFhsdsMi77dw2HBfoIsA0AabHDw4wlgx4PX3klSKU81f9fCCMS3MrH7RXe3Lyaxbj54j46IzaOLb5CKMM8RotlfxOTMlCRn0c7D9iwdCFymHATuvunbNdh4Hcjo3UoQjkRJxSab16jO7nx+3WfSCgD9gtd7x6gLqo3g7tROo2IZo03CiKn4nZKCFzDiM3LoArCCYlr3ONfSiLLAijSo6cfJYpVdGMHLGfWbul7cvAps4pQ62IqwhtGDLFnfJaldIhT+YaSELf/uMXGwqZA5b2iyGXE= X-Forefront-PRVS: 083691450C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL0PR02MB4324; 23:F1TrQWUOe02mbWjSFD605bZO/zzDSWQ65o2Sc0jaQ?= mF/B1mHpAOr1pn0ATchGzh5ffJken7RAOLWiOALNmLpYUQD2SqIg/o6qtityImi8T5CKf9Jda8QJSseHgn78C4g0woQZdWMwvE+4cwVuJk9XaXIEuP98B/M+ahXJV6oUd5mSRTuEMbNJhLw7OESo1bqjIFX10JmWDXAJbL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qFu4GQslLZfGyGUGmOl+0t0TT0aO3qeXG93ZdmiNx79QdN/Oy8ru+4Lgqyx0tW1m2Q=; 7:xyQP9TB8cSVohvPG8g/K6cKawmWc1AUQ9sSwzGsCiP5mNYf6CXt/AaN+wHlNpqMIwJw0ULMaQj+aiJP98bIafi1A4orzZHI1WhqmqweA56jEqyXreDfYN7k8pzXmKdNo66kgXw/73rcuYSVtPmnfLZ5FmtId9031S+ixUCiSfhuMGTZ9EY9zjnWy/TJavibV2Ugh6NWTBNGv2qtemPhVR5mEGnnDBhljl6PFMtl0r5b3gj+5nthlh56SFsJiAqxl SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2018 06:07:49.2746 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8d19e110-416c-4eaf-25f5-08d63a403163 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.60.83]; Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB4324 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181024_230807_617102_9DC8E45E X-CRM114-Status: GOOD ( 13.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, 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 Add support for Error Injection for ZynqMP DDRC IP. For injecting errors, the Row, Column, Bank, Bank Group and Rank bits positions are determined via Address Map registers of Synopsys DDRC. Signed-off-by: Manish Narani --- drivers/edac/synopsys_edac.c | 420 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 413 insertions(+), 7 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index e81f18a..2d26338 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -302,12 +302,18 @@ struct synps_ecc_status { /** * struct synps_edac_priv - DDR memory controller private instance data. - * @baseaddr: Base address of the DDR controller. - * @message: Buffer for framing the event specific info. - * @stat: ECC status information. - * @p_data: Platform data. - * @ce_cnt: Correctable Error count. - * @ue_cnt: Uncorrectable Error count. + * @baseaddr: Base address of the DDR controller. + * @message: Buffer for framing the event specific info. + * @stat: ECC status information. + * @p_data: Platform data. + * @ce_cnt: Correctable Error count. + * @ue_cnt: Uncorrectable Error count. + * @poison_addr: Data poison address. + * @row_shift: Bit shifts for row bit. + * @col_shift: Bit shifts for column bit. + * @bank_shift: Bit shifts for bank bit. + * @bankgrp_shift: Bit shifts for bank group bit. + * @rank_shift: Bit shifts for rank bit. */ struct synps_edac_priv { void __iomem *baseaddr; @@ -316,6 +322,14 @@ struct synps_edac_priv { const struct synps_platform_data *p_data; u32 ce_cnt; u32 ue_cnt; +#ifdef CONFIG_EDAC_DEBUG + ulong poison_addr; + u32 row_shift[18]; + u32 col_shift[14]; + u32 bank_shift[3]; + u32 bankgrp_shift[2]; + u32 rank_shift[1]; +#endif }; /** @@ -877,7 +891,11 @@ static const struct synps_platform_data zynqmp_edac_def = { .get_mtype = zynqmp_get_mtype, .get_dtype = zynqmp_get_dtype, .get_ecc_state = zynqmp_get_ecc_state, - .quirks = DDR_ECC_INTR_SUPPORT, + .quirks = (DDR_ECC_INTR_SUPPORT +#ifdef CONFIG_EDAC_DEBUG + | DDR_ECC_DATA_POISON_SUPPORT +#endif + ), }; static const struct of_device_id synps_edac_match[] = { @@ -896,6 +914,375 @@ static const struct of_device_id synps_edac_match[] = { MODULE_DEVICE_TABLE(of, synps_edac_match); +#ifdef CONFIG_EDAC_DEBUG +#define to_mci(k) container_of(k, struct mem_ctl_info, dev) + +/** + * ddr_poison_setup - Update poison registers. + * @priv: DDR memory controller private instance data. + * + * Update poison registers as per DDR mapping. + * Return: none. + */ +static void ddr_poison_setup(struct synps_edac_priv *priv) +{ + int col = 0, row = 0, bank = 0, bankgrp = 0, rank = 0, regval; + int index; + ulong hif_addr = 0; + + hif_addr = priv->poison_addr >> 3; + + for (index = 0; index < DDR_MAX_ROW_SHIFT; index++) { + if (priv->row_shift[index]) + row |= (((hif_addr >> priv->row_shift[index]) & + BIT(0)) << index); + else + break; + } + + for (index = 0; index < DDR_MAX_COL_SHIFT; index++) { + if (priv->col_shift[index] || index < 3) + col |= (((hif_addr >> priv->col_shift[index]) & + BIT(0)) << index); + else + break; + } + + for (index = 0; index < DDR_MAX_BANK_SHIFT; index++) { + if (priv->bank_shift[index]) + bank |= (((hif_addr >> priv->bank_shift[index]) & + BIT(0)) << index); + else + break; + } + + for (index = 0; index < DDR_MAX_BANKGRP_SHIFT; index++) { + if (priv->bankgrp_shift[index]) + bankgrp |= (((hif_addr >> priv->bankgrp_shift[index]) + & BIT(0)) << index); + else + break; + } + + if (priv->rank_shift[0]) + rank = (hif_addr >> priv->rank_shift[0]) & BIT(0); + + regval = (rank << ECC_POISON0_RANK_SHIFT) & ECC_POISON0_RANK_MASK; + regval |= (col << ECC_POISON0_COLUMN_SHIFT) & ECC_POISON0_COLUMN_MASK; + writel(regval, priv->baseaddr + ECC_POISON0_OFST); + + regval = (bankgrp << ECC_POISON1_BG_SHIFT) & ECC_POISON1_BG_MASK; + regval |= (bank << ECC_POISON1_BANKNR_SHIFT) & ECC_POISON1_BANKNR_MASK; + regval |= (row << ECC_POISON1_ROW_SHIFT) & ECC_POISON1_ROW_MASK; + writel(regval, priv->baseaddr + ECC_POISON1_OFST); +} + +static ssize_t inject_data_error_show(struct device *dev, + struct device_attribute *mattr, + char *data) +{ + struct mem_ctl_info *mci = to_mci(dev); + struct synps_edac_priv *priv = mci->pvt_info; + + return sprintf(data, "Poison0 Addr: 0x%08x\n\rPoison1 Addr: 0x%08x\n\r" + "Error injection Address: 0x%lx\n\r", + readl(priv->baseaddr + ECC_POISON0_OFST), + readl(priv->baseaddr + ECC_POISON1_OFST), + priv->poison_addr); +} + +static ssize_t inject_data_error_store(struct device *dev, + struct device_attribute *mattr, + const char *data, size_t count) +{ + struct mem_ctl_info *mci = to_mci(dev); + struct synps_edac_priv *priv = mci->pvt_info; + + if (kstrtoul(data, 0, &priv->poison_addr)) + return -EINVAL; + + ddr_poison_setup(priv); + + return count; +} + +static ssize_t inject_data_poison_show(struct device *dev, + struct device_attribute *mattr, + char *data) +{ + struct mem_ctl_info *mci = to_mci(dev); + struct synps_edac_priv *priv = mci->pvt_info; + + return sprintf(data, "Data Poisoning: %s\n\r", + (((readl(priv->baseaddr + ECC_CFG1_OFST)) & 0x3) == 0x3) + ? ("Correctable Error") : ("UnCorrectable Error")); +} + +static ssize_t inject_data_poison_store(struct device *dev, + struct device_attribute *mattr, + const char *data, size_t count) +{ + struct mem_ctl_info *mci = to_mci(dev); + struct synps_edac_priv *priv = mci->pvt_info; + + writel(0, priv->baseaddr + DDRC_SWCTL); + if (strncmp(data, "CE", 2) == 0) + writel(ECC_CEPOISON_MASK, priv->baseaddr + ECC_CFG1_OFST); + else + writel(ECC_UEPOISON_MASK, priv->baseaddr + ECC_CFG1_OFST); + writel(1, priv->baseaddr + DDRC_SWCTL); + + return count; +} + +static DEVICE_ATTR_RW(inject_data_error); +static DEVICE_ATTR_RW(inject_data_poison); + +static int edac_create_sysfs_attributes(struct mem_ctl_info *mci) +{ + int rc; + + rc = device_create_file(&mci->dev, &dev_attr_inject_data_error); + if (rc < 0) + return rc; + rc = device_create_file(&mci->dev, &dev_attr_inject_data_poison); + if (rc < 0) + return rc; + return 0; +} + +static void edac_remove_sysfs_attributes(struct mem_ctl_info *mci) +{ + device_remove_file(&mci->dev, &dev_attr_inject_data_error); + device_remove_file(&mci->dev, &dev_attr_inject_data_poison); +} + +static void setup_row_address_map(struct synps_edac_priv *priv, u32 *addrmap) +{ + u32 addrmap_row_b2_10; + int index; + + priv->row_shift[0] = (addrmap[5] & ROW_MAX_VAL_MASK) + ROW_B0_BASE; + priv->row_shift[1] = ((addrmap[5] >> 8) & + ROW_MAX_VAL_MASK) + ROW_B1_BASE; + + addrmap_row_b2_10 = (addrmap[5] >> 16) & ROW_MAX_VAL_MASK; + if (addrmap_row_b2_10 != ROW_MAX_VAL_MASK) { + for (index = 2; index < 11; index++) + priv->row_shift[index] = addrmap_row_b2_10 + + index + ROW_B0_BASE; + + } else { + priv->row_shift[2] = (addrmap[9] & + ROW_MAX_VAL_MASK) + ROW_B2_BASE; + priv->row_shift[3] = ((addrmap[9] >> 8) & + ROW_MAX_VAL_MASK) + ROW_B3_BASE; + priv->row_shift[4] = ((addrmap[9] >> 16) & + ROW_MAX_VAL_MASK) + ROW_B4_BASE; + priv->row_shift[5] = ((addrmap[9] >> 24) & + ROW_MAX_VAL_MASK) + ROW_B5_BASE; + priv->row_shift[6] = (addrmap[10] & + ROW_MAX_VAL_MASK) + ROW_B6_BASE; + priv->row_shift[7] = ((addrmap[10] >> 8) & + ROW_MAX_VAL_MASK) + ROW_B7_BASE; + priv->row_shift[8] = ((addrmap[10] >> 16) & + ROW_MAX_VAL_MASK) + ROW_B8_BASE; + priv->row_shift[9] = ((addrmap[10] >> 24) & + ROW_MAX_VAL_MASK) + ROW_B9_BASE; + priv->row_shift[10] = (addrmap[11] & + ROW_MAX_VAL_MASK) + ROW_B10_BASE; + } + + priv->row_shift[11] = (((addrmap[5] >> 24) & ROW_MAX_VAL_MASK) == + ROW_MAX_VAL_MASK) ? 0 : (((addrmap[5] >> 24) & + ROW_MAX_VAL_MASK) + ROW_B11_BASE); + priv->row_shift[12] = ((addrmap[6] & ROW_MAX_VAL_MASK) == + ROW_MAX_VAL_MASK) ? 0 : ((addrmap[6] & + ROW_MAX_VAL_MASK) + ROW_B12_BASE); + priv->row_shift[13] = (((addrmap[6] >> 8) & ROW_MAX_VAL_MASK) == + ROW_MAX_VAL_MASK) ? 0 : (((addrmap[6] >> 8) & + ROW_MAX_VAL_MASK) + ROW_B13_BASE); + priv->row_shift[14] = (((addrmap[6] >> 16) & ROW_MAX_VAL_MASK) == + ROW_MAX_VAL_MASK) ? 0 : (((addrmap[6] >> 16) & + ROW_MAX_VAL_MASK) + ROW_B14_BASE); + priv->row_shift[15] = (((addrmap[6] >> 24) & ROW_MAX_VAL_MASK) == + ROW_MAX_VAL_MASK) ? 0 : (((addrmap[6] >> 24) & + ROW_MAX_VAL_MASK) + ROW_B15_BASE); + priv->row_shift[16] = ((addrmap[7] & ROW_MAX_VAL_MASK) == + ROW_MAX_VAL_MASK) ? 0 : ((addrmap[7] & + ROW_MAX_VAL_MASK) + ROW_B16_BASE); + priv->row_shift[17] = (((addrmap[7] >> 8) & ROW_MAX_VAL_MASK) == + ROW_MAX_VAL_MASK) ? 0 : (((addrmap[7] >> 8) & + ROW_MAX_VAL_MASK) + ROW_B17_BASE); +} + +static void setup_column_address_map(struct synps_edac_priv *priv, u32 *addrmap) +{ + u32 width, memtype; + int index; + + memtype = readl(priv->baseaddr + CTRL_OFST); + width = (memtype & ECC_CTRL_BUSWIDTH_MASK) >> ECC_CTRL_BUSWIDTH_SHIFT; + + priv->col_shift[0] = 0; + priv->col_shift[1] = 1; + priv->col_shift[2] = (addrmap[2] & COL_MAX_VAL_MASK) + COL_B2_BASE; + priv->col_shift[3] = ((addrmap[2] >> 8) & + COL_MAX_VAL_MASK) + COL_B3_BASE; + priv->col_shift[4] = (((addrmap[2] >> 16) & COL_MAX_VAL_MASK) == + COL_MAX_VAL_MASK) ? 0 : (((addrmap[2] >> 16) & + COL_MAX_VAL_MASK) + COL_B4_BASE); + priv->col_shift[5] = (((addrmap[2] >> 24) & COL_MAX_VAL_MASK) == + COL_MAX_VAL_MASK) ? 0 : (((addrmap[2] >> 24) & + COL_MAX_VAL_MASK) + COL_B5_BASE); + priv->col_shift[6] = ((addrmap[3] & COL_MAX_VAL_MASK) == + COL_MAX_VAL_MASK) ? 0 : ((addrmap[3] & + COL_MAX_VAL_MASK) + COL_B6_BASE); + priv->col_shift[7] = (((addrmap[3] >> 8) & COL_MAX_VAL_MASK) == + COL_MAX_VAL_MASK) ? 0 : (((addrmap[3] >> 8) & + COL_MAX_VAL_MASK) + COL_B7_BASE); + priv->col_shift[8] = (((addrmap[3] >> 16) & COL_MAX_VAL_MASK) == + COL_MAX_VAL_MASK) ? 0 : (((addrmap[3] >> 16) & + COL_MAX_VAL_MASK) + COL_B8_BASE); + priv->col_shift[9] = (((addrmap[3] >> 24) & COL_MAX_VAL_MASK) == + COL_MAX_VAL_MASK) ? 0 : (((addrmap[3] >> 24) & + COL_MAX_VAL_MASK) + COL_B9_BASE); + if (width == DDRCTL_EWDTH_64) { + if (memtype & MEM_TYPE_LPDDR3) { + priv->col_shift[10] = ((addrmap[4] & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + ((addrmap[4] & COL_MAX_VAL_MASK) + + COL_B10_BASE); + priv->col_shift[11] = (((addrmap[4] >> 8) & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + (((addrmap[4] >> 8) & COL_MAX_VAL_MASK) + + COL_B11_BASE); + } else { + priv->col_shift[11] = ((addrmap[4] & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + ((addrmap[4] & COL_MAX_VAL_MASK) + + COL_B10_BASE); + priv->col_shift[13] = (((addrmap[4] >> 8) & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + (((addrmap[4] >> 8) & COL_MAX_VAL_MASK) + + COL_B11_BASE); + } + } else if (width == DDRCTL_EWDTH_32) { + if (memtype & MEM_TYPE_LPDDR3) { + priv->col_shift[10] = (((addrmap[3] >> 24) & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + (((addrmap[3] >> 24) & COL_MAX_VAL_MASK) + + COL_B9_BASE); + priv->col_shift[11] = ((addrmap[4] & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + ((addrmap[4] & COL_MAX_VAL_MASK) + + COL_B10_BASE); + } else { + priv->col_shift[11] = (((addrmap[3] >> 24) & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + (((addrmap[3] >> 24) & COL_MAX_VAL_MASK) + + COL_B9_BASE); + priv->col_shift[13] = ((addrmap[4] & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + ((addrmap[4] & COL_MAX_VAL_MASK) + + COL_B10_BASE); + } + } else { + if (memtype & MEM_TYPE_LPDDR3) { + priv->col_shift[10] = (((addrmap[3] >> 16) & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + (((addrmap[3] >> 16) & COL_MAX_VAL_MASK) + + COL_B8_BASE); + priv->col_shift[11] = (((addrmap[3] >> 24) & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + (((addrmap[3] >> 24) & COL_MAX_VAL_MASK) + + COL_B9_BASE); + priv->col_shift[13] = ((addrmap[4] & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + ((addrmap[4] & COL_MAX_VAL_MASK) + + COL_B10_BASE); + } else { + priv->col_shift[11] = (((addrmap[3] >> 16) & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + (((addrmap[3] >> 16) & COL_MAX_VAL_MASK) + + COL_B8_BASE); + priv->col_shift[13] = (((addrmap[3] >> 24) & + COL_MAX_VAL_MASK) == COL_MAX_VAL_MASK) ? 0 : + (((addrmap[3] >> 24) & COL_MAX_VAL_MASK) + + COL_B9_BASE); + } + } + + if (width) { + for (index = 9; index > width; index--) { + priv->col_shift[index] = priv->col_shift[index - width]; + priv->col_shift[index - width] = 0; + } + } + +} + +static void setup_bank_address_map(struct synps_edac_priv *priv, u32 *addrmap) +{ + priv->bank_shift[0] = (addrmap[1] & BANK_MAX_VAL_MASK) + BANK_B0_BASE; + priv->bank_shift[1] = ((addrmap[1] >> 8) & + BANK_MAX_VAL_MASK) + BANK_B1_BASE; + priv->bank_shift[2] = (((addrmap[1] >> 16) & + BANK_MAX_VAL_MASK) == BANK_MAX_VAL_MASK) ? 0 : + (((addrmap[1] >> 16) & BANK_MAX_VAL_MASK) + + BANK_B2_BASE); + +} + +static void setup_bg_address_map(struct synps_edac_priv *priv, u32 *addrmap) +{ + priv->bankgrp_shift[0] = (addrmap[8] & + BANKGRP_MAX_VAL_MASK) + BANKGRP_B0_BASE; + priv->bankgrp_shift[1] = (((addrmap[8] >> 8) & BANKGRP_MAX_VAL_MASK) == + BANKGRP_MAX_VAL_MASK) ? 0 : (((addrmap[8] >> 8) + & BANKGRP_MAX_VAL_MASK) + BANKGRP_B1_BASE); + +} + +static void setup_rank_address_map(struct synps_edac_priv *priv, u32 *addrmap) +{ + priv->rank_shift[0] = ((addrmap[0] & RANK_MAX_VAL_MASK) == + RANK_MAX_VAL_MASK) ? 0 : ((addrmap[0] & + RANK_MAX_VAL_MASK) + RANK_B0_BASE); +} + +/** + * setup_address_map - Set Address Map by querying ADDRMAP registers. + * @priv: DDR memory controller private instance data. + * + * Set Address Map by querying ADDRMAP registers. + * + * Return: none. + */ +static void setup_address_map(struct synps_edac_priv *priv) +{ + u32 addrmap[12]; + int index; + + for (index = 0; index < 12; index++) { + u32 addrmap_offset; + + addrmap_offset = ECC_ADDRMAP0_OFFSET + (index * 4); + addrmap[index] = readl(priv->baseaddr + addrmap_offset); + } + + setup_row_address_map(priv, addrmap); + + setup_column_address_map(priv, addrmap); + + setup_bank_address_map(priv, addrmap); + + setup_bg_address_map(priv, addrmap); + + setup_rank_address_map(priv, addrmap); +} +#endif /* CONFIG_EDAC_DEBUG */ + /** * mc_probe - Check controller and bind driver. * @pdev: platform device. @@ -963,6 +1350,20 @@ static int mc_probe(struct platform_device *pdev) goto free_edac_mc; } +#ifdef CONFIG_EDAC_DEBUG + if (priv->p_data->quirks & DDR_ECC_DATA_POISON_SUPPORT) { + if (edac_create_sysfs_attributes(mci)) { + edac_printk(KERN_ERR, EDAC_MC, + "Failed to create sysfs entries\n"); + goto free_edac_mc; + } + } + + if (of_device_is_compatible(pdev->dev.of_node, + "xlnx,zynqmp-ddrc-2.40a")) + setup_address_map(priv); +#endif + /* * Start capturing the correctable and uncorrectable errors. A write of * 0 starts the counters. @@ -992,6 +1393,11 @@ static int mc_remove(struct platform_device *pdev) if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT) disable_intr(priv); +#ifdef CONFIG_EDAC_DEBUG + if (priv->p_data->quirks & DDR_ECC_DATA_POISON_SUPPORT) + edac_remove_sysfs_attributes(mci); +#endif + edac_mc_del_mc(&pdev->dev); edac_mc_free(mci);