From patchwork Mon Oct 15 05:29:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10641115 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 BC8A417D2 for ; Mon, 15 Oct 2018 05:33:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A9080289DA for ; Mon, 15 Oct 2018 05:33:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 97E3B28A58; Mon, 15 Oct 2018 05:33:41 +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 1114E289DA for ; Mon, 15 Oct 2018 05:33:41 +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=pSIfBUYM/w8KT6 p06Ya5q9V5GhpS0L3ZE7Vb4cPu2jZWD9BZ7Z+IqynnQyNIk0ON9qUkSr3ZEyAqbMxGY+i4lvfwyAb Y8v/oeqqklHchI/YOilGxUjz9xOS+0Lf9PohDhWt0sqr1sqjqRJqckE1OCh/LKVOUkHWrr5T9zXgc N2WeAHNszofRxMJjsMilOOK9Uch/904yEKxgeV3FKgNX80xvBIIEsNHa//3vTZuU7ra1MGkEpzwAS eHKP1sdg7rvVEc6GxJqKXr0hw+yO8iT8Hvj77o6PTxSSROwtDGRNrA/q6439QAc+6hxPYjUKmiS06 TmM/PCkmBsTrx9Ma70/Q==; 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 1gBvVQ-0005p2-16; Mon, 15 Oct 2018 05:33:28 +0000 Received: from mail-co1nam04on0607.outbound.protection.outlook.com ([2a01:111:f400:fe4d::607] helo=NAM04-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBvSd-0004aw-KX for linux-arm-kernel@lists.infradead.org; Mon, 15 Oct 2018 05:30:50 +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=L009DoQTtbcm0GDxRHrYwvgbUEX48zoOd/sEeEcpn1f2J4bzGQn7V+dKofYNgDti5AoOpDBpHeHD6ezRT5bmrxKoYtAl3Z8uOOI1aFrOXxN66916giNH8j71SYOTyCl6lJN4f0a0CWvtF6/66h4Hwskp5uFj+4Dy8svb0g+BNCA= Received: from BL0PR02CA0049.namprd02.prod.outlook.com (2603:10b6:207:3d::26) by DM6PR02MB4459.namprd02.prod.outlook.com (2603:10b6:5:29::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.26; Mon, 15 Oct 2018 05:30:21 +0000 Received: from SN1NAM02FT032.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::203) by BL0PR02CA0049.outlook.office365.com (2603:10b6:207:3d::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1228.26 via Frontend Transport; Mon, 15 Oct 2018 05:30:21 +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 SN1NAM02FT032.mail.protection.outlook.com (10.152.72.126) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1250.11 via Frontend Transport; Mon, 15 Oct 2018 05:30:16 +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 1gBvSJ-0004Xs-VA; Sun, 14 Oct 2018 22:30:15 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gBvSE-0001yJ-P2; Sun, 14 Oct 2018 22:30:10 -0700 Received: from xsj-pvapsmtp01 (xsj-mail.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w9F5U0CL014072; Sun, 14 Oct 2018 22:30:00 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gBvS3-0001e3-NF; Sun, 14 Oct 2018 22:29:59 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id DB0B8121624; Mon, 15 Oct 2018 10:59:58 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v9 1/6] edac: synopsys: Add error handling for NULL in probe() Date: Mon, 15 Oct 2018 10:59:43 +0530 Message-ID: <1539581388-23963-2-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1539581388-23963-1-git-send-email-manish.narani@xilinx.com> References: <1539581388-23963-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)(136003)(39860400002)(396003)(2980300002)(438002)(199004)(189003)(7416002)(356004)(6666004)(47776003)(2906002)(486006)(305945005)(44832011)(5660300001)(50466002)(316002)(476003)(426003)(42186006)(126002)(36386004)(36756003)(90966002)(2616005)(2201001)(52956003)(446003)(11346002)(8936002)(103686004)(110136005)(54906003)(63266004)(6266002)(50226002)(336012)(106466001)(106002)(16586007)(26005)(4326008)(478600001)(76176011)(51416003)(48376002)(72206003)(81156014)(8676002)(81166006)(186003)(107986001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB4459; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT032; 1:ZZw1TA7AWYEpvU66ralIE3vJFLCQDuGX+QKbUcdCTMEX8fFda/9zOndQYmBGCkdARMahKv8wHPW7Tpm6zamJ+pZ45uyJmQayTz5t3iLB3GQzYUPnBX18NKwuiq4QcEsO MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b5fa18f-7ffe-4c2e-e2f8-08d6325f4c8e X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:DM6PR02MB4459; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4459; 3:ctDpdWUkjBnMzjXoEiCy/DoDAc3F+0Dua+ZoCxyNmf8Hpqb4/cRSR0fm4jJaAryCmtw/8ZaB1HfXVajGwLDwj1wS8hHl5EwLkhCLX/wHMzFtqvMeZAM2M6hudMIOzMZ+9xtvuQ1mKzF0hy7YQOuKaoLskDtxJHq+YWNapn21M0Yg+b7Li5iDQD09Zc8TmUVPkdJsUs+VGSmLSlQ1NsdR8X37lL1qg1HZ/4s5d/fLeANQSc9Qck5f5JQKvQp/flPIBhKQyVv8E0PAul2+PaSMlYSwJHcPKlLFVe2iRqvqJbqhV9Yo1YfMj7Y5C5Y+whVQIYgZU6RSdqG7oejWzyjP85dVXzC1LSU3vjAo5l6M6yY=; 25:N93L09/bu20txDagMZL5116gcyxQwBkx5qfmot0ARRIV8vzWbNipQAAd+xQXYu9qo6+JJtgHdzdDBP42hMw6812GnRbdL0D97zE5HlSqeWK83+BFVxbm02kzYfCRzC2s5Gws2s5SxJBzgbUfw+s92nI3ECarcWKleEF//9rWX50rLg6L2Xdu+hp50GOJyTFJdLyZJZ7lqp7osoGaMXLn+Xp6Q1k15nsoh09eHTHnbIO3v+MNu1CQBSYcdPHphWsxTiO54+kF9EZgT9Ll3BOYCb1TUnj+5OQeicm9mv8U9WeZ/w6BIZfpe4XC+F/RtneoNSen8OLFf3KlhnIKV2PVcg== X-MS-TrafficTypeDiagnostic: DM6PR02MB4459: X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4459; 31:UKDue5Esczc5vndStTSjNj7vcNW8+zdYftKgdXNILMIKPNk1RqnZMaZoUXZBQXfZ8STcCAMekRx/1musHSdDW319RAsciqVbi6lQNiX9TffVihRe8l1LnJa/fgOk6O1qWFktp+qKCpZqBXhS6XFaUrSDTHC3OzorgCcczUs194i+C/G+9Mo3PK72zBCt9aZzwe+tq25HkRD6ZfIjLNDwonLqox/+TbDB7zTNqkYpMOs=; 20:BP+95wCWkuEKaWvpuxltDon8d2VhJJRQ38qfDRsazFwyvTq/Brj+j2KVnLdLDdy9UezlFh22A9VbMjSRh2hBtBITAsuLkFm5NQyTrxLGiLjaW5QdeseOlZHXqywIOebi3ZFIvaCVKnaY7yEVZlzUz9vdFV6R4hg6w5qNdC6KzhZw0m+J0FPKnIS2D796Gju0rdW0xBI+NH4/UcUpVlGuQUzFd/G21t9/AqpaKori2t9KCm0mpqDGxcB5MfwgDDD/YdU1yIrN1nA042WindXHmtH20kMZEvYjAU++dcwGjSCzI2P1nuqxtkGqNoBfRj69tMPn8tb8qhbxTBNSZOCuWSD2fEeqd9m5dmXIUmpZ73vUrMu/bB0o/MYGmyPYMDBPkTjMriiBOggHQGHqPFyYuOoEkBgapz3r1bxjtjr0u6Ngd1PwDYES1YDoiHOJa2kzLZqHyTGq/AYPAJSr5MRQKpCFzCf5F9amSiO5o/6SG5Kreq+VbqJC5qJhqcuXDiq3 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)(8121501046)(5005006)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93004095)(6055026)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(201708071742011)(7699051); SRVR:DM6PR02MB4459; BCL:0; PCL:0; RULEID:; SRVR:DM6PR02MB4459; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4459; 4:7ZzoD2iOSBfG697CN/o2nR5ZIwFPhKDROZQWe4o47/QWNyADptHOU9QpCtD5q6XReS0zWhO+2LHnhOvxyyhy65eOILULTIDZm4QrHoba2O+ZwxFYrOx5ls0AH/yI85/ubgteCzhHwmd3kA/gzVjdwV0o92Opv4kpKYbMT0OUK0rtVEwqomP1yQkAKKGyiV5uvn4kp6X8uoi/EiebOv75luKwYwivRicCYtUjnGirVBXCyUE7krn3AwG8JSSpPGT+4Lco0a0SpaXcZMsVddGH2wVDQ69Y0GWAxjVFznedux/Ob98acR7QraZ8wyba9Eg+ X-Forefront-PRVS: 0826B2F01B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR02MB4459; 23:rwy10b14eGJh8YFoxKX44a1DHr/dR7XWT+1kUcCHQ?= pSv+OTyS7xkORIk1qGpaUXMpnh55/75f9DUka8PMrC+nZQoeydpwXaVFEtjdABHPiDUy/UiHSW+7VSp6Sc3Eok4CIEFaqoIlIUiG2bWVRJGDk2Ddbu1TGlvwD3XTG+OIVd5gkfio1If0ENjKttLbaMYyEeR4Imxme9iy9dXj6Yz5rqovnOYvaPFwmt3ZjBEEmQS5LTquSw4DmtH41BxU3vmwfIb7y49fj9GNoi7X6Y9DJHPKmy2NQB+gkkSwHtxMX2MV3xTmdRoXEONHwRVF094+QFW5eBIThr4+6XS7n44r6MDckt+9s1KLlBTMvxXJcKUEHckDpN+ZWZTlxHLpAxDdblE3nR4YcsMijd3BfaowpWfWSsOEB4EGUgp9HKlm+sEm1Xfc3q3wUhrQW2doU3BjZ11WNFLFHzuFV33bKYTodHYMb3FSj+iQBFRUKbEDJQnCNwO1bCnWxcx8Ux9IKodo9P9RbB7Au/CRjJudKOBgbz0CRR/u3AP19OJGN578RbiJ6qlES9U/cGFxeizv9DfppBzU8WjBVliUXlLF4j+xb4c0axfsIahdZSRUqSvC6SioLQk+137yFQA6ZB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qxOGAMkDLvtKgbWQp3PH3QfNIL+lbtWIRjtPHoilLlL0UGTQ91gXyX18UgocqjhffRUWT6BvVMwt34xvN3SOZxgF4um8Kuh5nugkauJ8/tq7MzEjBhnGx0f/aKGHF+caOTRZ63LO5FlVaELs+rQQ6n68/6/KKgxDfpZJyPX8AuPbuNqNHuWiPT5GdxDvifqnUt6S+vqdybg40wgVUSSnozfx2wP/6v0NiZHJ9oAVeOtIX4gqZMuEnM+jRVu5kJ7P3yvM/379hCDXR7Mniq+pFw3ZeHs47p4MDSGcJ0CEKs9UrC1e+cC5XwqhdrI83P1H7cTNgpal9UESjGF8SisUGt45iv4GXAEEds0r9Y6dLnJDf4H5IZ94725XqFq2qEXdQsF+EbjIyaYFx+IHiYiT5ey47/HmFtiq1rUbn99Pw==; 5:50B4k0qWGaRqLXb4sWOImSCNti9vAl4LUSd/ccNOVa4Y1ZvLYbCmyeX2PH7bvMfPv6cMNIKFrkJ7Wvo2rUfPApvemQnikyIqFLVnbDPN4E7xxlZCniz9j0ruMTZ6hDyDfFZWZbyMuiA26esXYGpXlreOosbpqiZ1hAHYnJ2yqJU=; 7:V9Ehoeo76Wqd9Heq6i0ph3eXdWePuqUnmDgVWdUY4tljylENByWKqvB0UFjGBmPFFFSegDA1d65ibs4FsRQzajSsysXOdrn7DA6miLvk2FXu1sR1u5t6d1VwEv7lDXJyzJi5XNwDPwbNHlN8Veg1p2CCmCJjYTfQZIniAqyvM2Evam4GcC/nkmt+OWhyTfRz3PUYD8KXwxNmWV4NjLPeoQ1zkDJ21elRvi6FBagfMHN0NuK6JzV5RoZjitBcg6zC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2018 05:30:16.6905 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b5fa18f-7ffe-4c2e-e2f8-08d6325f4c8e 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: DM6PR02MB4459 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181014_223035_719110_29F56633 X-CRM114-Status: UNSURE ( 9.72 ) 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 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 Mon Oct 15 05:29:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10641113 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 2DB4417D2 for ; Mon, 15 Oct 2018 05:32:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 178EE295C7 for ; Mon, 15 Oct 2018 05:32:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04B8829603; Mon, 15 Oct 2018 05:32:57 +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 8B2E8295C7 for ; Mon, 15 Oct 2018 05:32:56 +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=dIiXgGl2aChUxJ 4XaL7SAVQNeY+j+V2FsLMpa8MIxiOWSRoO2KjtwJOQwcukuMGdQWnnmXJUVQf8/Pu9pfWNpn1twnv d1zHTubudBKKHi7b7hnde4QUsLbveQEeVCxlT3w6IIygDIPofQCOXD1IM6z5O6SjMiuuIE6d5ffJF mkExaiWcg5Gvk1X1EOiOy5OarZWxCrwJNeQ6V29FH/6/Etv71rT797pvYO4YbqiSFfDCYUw51Pp4O lU8s1U0mAPI/UaUGaCzybBU0Ie/S03C50ojqccZCV/GKMaSwhIQxpwMlodyB+/HAyU0XrdvbGcZ/b JfmYK5uRdidmLGrKRGrQ==; 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 1gBvUi-0005XS-RT; Mon, 15 Oct 2018 05:32:44 +0000 Received: from mail-eopbgr690052.outbound.protection.outlook.com ([40.107.69.52] helo=NAM04-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBvSb-0004ar-45 for linux-arm-kernel@lists.infradead.org; Mon, 15 Oct 2018 05:30:51 +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=h/m2Ti33jd0SJmWyEnFdxIu49EzvOISOai6lz116QVxMbQVO0q08xIab0Raq6v6ssiQdNOtFsDQL1h44BRnX9JCP4WpewDwRB98TM7erehJ3yMGIabtaY6TttHSv3LCL4iTLkVC9/A5NXaZ6iRAs09M5kc2+Os70yKp0HqJFhKM= Received: from BN6PR02CA0048.namprd02.prod.outlook.com (2603:10b6:404:5f::34) by CY4PR0201MB3506.namprd02.prod.outlook.com (2603:10b6:910:95::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Mon, 15 Oct 2018 05:30:20 +0000 Received: from SN1NAM02FT053.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::200) by BN6PR02CA0048.outlook.office365.com (2603:10b6:404:5f::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1228.23 via Frontend Transport; Mon, 15 Oct 2018 05:30:19 +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 SN1NAM02FT053.mail.protection.outlook.com (10.152.72.102) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1250.11 via Frontend Transport; Mon, 15 Oct 2018 05:30:15 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:56553 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1gBvSI-0006b2-Eu; Sun, 14 Oct 2018 22:30:14 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gBvSD-0001yJ-0s; Sun, 14 Oct 2018 22:30:09 -0700 Received: from xsj-pvapsmtp01 (smtp2.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w9F5U1vx015105; Sun, 14 Oct 2018 22:30:01 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gBvS4-0001eO-Re; Sun, 14 Oct 2018 22:30:01 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 01DF51216AB; Mon, 15 Oct 2018 11:00:00 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v9 2/6] dt: bindings: Document ZynqMP DDRC in Synopsys documentation Date: Mon, 15 Oct 2018 10:59:44 +0530 Message-ID: <1539581388-23963-3-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1539581388-23963-1-git-send-email-manish.narani@xilinx.com> References: <1539581388-23963-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)(376002)(346002)(39850400004)(136003)(396003)(2980300002)(438002)(199004)(189003)(103686004)(44832011)(7416002)(305945005)(486006)(50466002)(426003)(476003)(14444005)(336012)(2616005)(126002)(446003)(11346002)(106466001)(5660300001)(63266004)(2906002)(36756003)(36386004)(4326008)(90966002)(48376002)(186003)(26005)(47776003)(72206003)(52956003)(2201001)(76176011)(316002)(51416003)(54906003)(8936002)(8676002)(110136005)(42186006)(6266002)(16586007)(81156014)(81166006)(106002)(6666004)(356004)(478600001)(50226002)(107986001)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0201MB3506; 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; SN1NAM02FT053; 1:bS9NAh5Y2MG9h6IMbet/9lGcdFLOPrrH1/cBUQTiVJBbgTHWMepz/gzJIkjCRwCXW7N+jJVRaUanaTnCJfqJJfHQ5HUXNKX3D38Z1bvFNeHVnrCeZNJYMnSkdcBYz4rK MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8110c4ea-ead2-4015-4e33-08d6325f4bb7 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:CY4PR0201MB3506; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0201MB3506; 3:JdPNZ6uOfbwgYVFnSYg8C64gku2mjX3s2JwGLrW4vn1DqPIT6SNk0brqsaW8Dj9BzbQALW4TP4Ro+ArlpQFBNv6eBXKNq7Sbzrf2+BLLnhOo4J0V9E4AUxRrsVar/Ac4rQhnXq+TazD3d8yn/I7f7u/cqXRuJMuU4NqsCFdF9fCzlyz18kisYjQZDGF1CjqRdJ3hjg3gfxQDvsP3iwh/Cazy5XsSW7NwcEFtrvkhHynUpBUwEnhKa0IBoky32oNojsw1kd+4yJbLCCW2PtBtzwBSerIe+Z4CREApkQK6Ni3qf7ZFWJ5ExGGstxcqXdtAaQJvQrLe8QlexeA8BH3jCJjPPIcN/intQZOZdnRZSA0=; 25:aPXJ4A+GmgPqQ6id4lgJfnIypzS6376d+HLJ1Dt+FL9/4xw7LXi9CCPaLqWy+ZZHttdV/P/avlFWaQxrLyhRZLn0dV7veRURPAgMpurCNr0nokyrzZZhEKNCgct//fjB2GguZaQHc26iU1XlW9X2+oroZQqWLMeGBdl11Ze5TMglcj60cF0WVYuaNsm3OcOHiTt4L4EIddOnmEeSkMaxvxRQ4KKz/AmDIQHFeoCyQtNIOkQyKTtv2EqThojdPdepgbv86VfbPGIdynsktfR8N316waKZ9Tjru6dxPEo7j5KUPkTR4wBKoGNLq/aUUr5bRUTNd0ZSUvd2EsmYinXVLg== X-MS-TrafficTypeDiagnostic: CY4PR0201MB3506: X-Microsoft-Exchange-Diagnostics: 1; CY4PR0201MB3506; 31:RUFqVtQhbwMmN8XUrNRWs+RfijNL7T11XNdTGRm9e7R7MSlUnYSTr6l1oF1kbxE48ZTXSKSjvdy8X5E1YZaTatqhbZVvIQ0CSpE+eQIVgHfgEpYLmWMUjOv1ZNj9NxmzDWHwQ2BQC5/yRMh2JIddYLN+GcEmJOFl60PI1Am8EvtpL8lse3LuzfdEH+OmKMju4cppL+bkpt0ZOgGOlClME0zFVzm16zbMUhjhBymStvg=; 20:WYtAj7ZON2xwgAfoxlXsWEoPgbautqQPMvlPICj/m3g5MFgIycr4/Qb57mWqHc9TfBSTXoLxkgJLlFAsNXYIz6mfVkG2Ylep9IphiRVu0k0vRPtbaTJ7BQfNdQAlXNE9sNoifDTLnnw0UOlJf26+qqguHsnsMHdnNarxJTO/oLIKzSfsr225KgHVhkAQf7Xpw5EAJVni3+IX0EgqFyqtLHULS2dTBtgl0i1PE9L9iO1VqD7pKYQEscuXs8/T0AtcbvXdNe4M4egNDc1JAaYIIFWIklRaAQAf1lmCwAH88WMBcXw57xqR40REMsdX/2q0argg2ARXoZBg8JHN6dE84CmDYJ5kUAGinFRPe074SmxWB/U6+Om92PquhwsYkSKI+TGmRM6/o2W6v5lpXJm4A2SxSn78hWojYTY+BfMK8v6zINPj9Ai7udBlfq6NTTVEvKCoRRP1ul8FaiLCxMuidvjiyrhgx55oBgn5/7rbNTOWazQcu54BuemJdnPT4X5b 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)(5005006)(8121501046)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93004095)(6055026)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(201708071742011)(7699051)(76991067); SRVR:CY4PR0201MB3506; BCL:0; PCL:0; RULEID:; SRVR:CY4PR0201MB3506; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0201MB3506; 4:ItNvZMpCmZVLXBtrXUS65FEXoXjKMOn/T1VJ5gkE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RQWBakwVxZr2ojWGj4raePiPd1GyHOky8gUvsQNyvzuU8WNlUH8acKmU8Hb6SAupeNY/Nqq3BzKXZaVg+GPoVfiOWOcbKadumHsGqBVg0XlIPZNOsxJHVq1My9T+lf8LkUJ/ugahJtQ0Xsb3RaYeqGtb7Ff9yOaZdT+0oghfOrdOPlIPucJxppP3xZNwIlRz7tur/RxmwP5a/k7kodItGJqeJT41VWLVjuxXUhiQtjxgfxtsnF2Q3vlg1Ijn5+A4dINQ2zZny6517dQZGue3cXCgstToYvojJZgw68FVbzEUXGjE/AthCUQ6oo/an3ghhEgsegDkhbMoO3rTvE8J+jwzudZqzc3AIi3EuILxeNhVdn0mvgzHmzBVgML0fzGlbu46gIJgUKovasw==; 5:w+hiWNfOeAOaT7ZZXrZjDeFxmLs3yUXuYf/CtgCfjxzMELyLf5y8ztaTvyVm0oif8BNCME2ODkjDwScKn0kta7d18tqI0VoZbhzF4RfDwBik/eWmNjVFjuSfnD3o+SxCuvepL5uA8j/QEdhH7taxAiGEf2oykKT4Y9lrz33FFSY=; 7:SwTzlYvGMdonflqcr5YuoLG7rI/6CMY+NopyBdPIPnZD73rHkRLuuRQVAK+LoLyF/gEC3Y/79hJa9f72jeeaptE9fF/eUWd0hG9FzOVYivOZd0R1GyK69nOGVih02/qJIKhfL+QWnsVgd32SD04eqkiAtsJPVt6F1A8RKNL/MLScxbBBZFRtG/q+UAkaIWknH4cpnRkj2z+aBopzERp3a12sLneXS+9aTTARIUUMoHgGv5W8f6y6txlsyYidsDVE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2018 05:30:15.2776 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8110c4ea-ead2-4015-4e33-08d6325f4bb7 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: CY4PR0201MB3506 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181014_223033_241905_AE1522C7 X-CRM114-Status: UNSURE ( 8.78 ) 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 Mon Oct 15 05:29:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10641119 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 81856925 for ; Mon, 15 Oct 2018 05:35:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DE9A28538 for ; Mon, 15 Oct 2018 05:35:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EC42295EE; Mon, 15 Oct 2018 05:35: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 C315028538 for ; Mon, 15 Oct 2018 05:35:18 +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=EunmTVhZz43Wh2 Xli6sdS4TgIh8G+CD08kDhNI+fWhAaQlx7GJflKXnKgzw+ZgTNFYBqGcdKarXd51nZhDRrrldfXIp orBrg8JEPC4GTE9UNkHlVhW3iF/NtueRok+brjjc50uOnWeKtpJ2o89JT8oS4i3O8TdINcY2phw++ QRoZud0P3jRxahxCPCutJYj9ySqWrKRn4f/8QxxQoL7I/9zjfYCw9gjk0y3gQgAzQyxBFoBEYODEJ 77O2eY51fD8dqUFcsUfdsVLgDJfceCMNqZus1rRKUQtOoyj75GUBOfxrYu90TyDOeT6f6v3QBZUcn d9VWVNOB/l+F7V7ZzU0A==; 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 1gBvWy-0006RS-42; Mon, 15 Oct 2018 05:35:04 +0000 Received: from mail-bn3nam01on0607.outbound.protection.outlook.com ([2a01:111:f400:fe41::607] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBvSp-0004eo-HX for linux-arm-kernel@lists.infradead.org; Mon, 15 Oct 2018 05:31:11 +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=nQ9HmxxtCkPad3eycFPWwrqLmDNGqFw4JzwQfrS/55nmgVpuEi9jjD4CB7AZ7hzsySWfQPBV+N0pXRnG+l/S0Qr8930IrGqi/5a9KMnVqNTLh+WSG57qU7Svor0A/PtohKbf9lORiBf4h1SrnADuh2dIm3zsTAdb4BqSWKFok9E= Received: from MWHPR0201CA0052.namprd02.prod.outlook.com (2603:10b6:301:73::29) by SN4PR0201MB3520.namprd02.prod.outlook.com (2603:10b6:803:44::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.24; Mon, 15 Oct 2018 05:30:33 +0000 Received: from SN1NAM02FT055.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::202) by MWHPR0201CA0052.outlook.office365.com (2603:10b6:301:73::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1228.22 via Frontend Transport; Mon, 15 Oct 2018 05:30:33 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; alien8.de; dkim=none (message not signed) header.d=none;alien8.de; 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 SN1NAM02FT055.mail.protection.outlook.com (10.152.72.174) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1250.11 via Frontend Transport; Mon, 15 Oct 2018 05:30:28 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:60011 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1gBvSV-0006bR-Ft; Sun, 14 Oct 2018 22:30:27 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gBvSQ-0002eW-9A; Sun, 14 Oct 2018 22:30:22 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gBvS6-0001hY-6B; Sun, 14 Oct 2018 22:30:02 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 927F4121624; Mon, 15 Oct 2018 11:00:00 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v9 3/6] edac: synopsys: Add macro defines for ZynqMP DDRC Date: Mon, 15 Oct 2018 10:59:45 +0530 Message-ID: <1539581388-23963-4-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1539581388-23963-1-git-send-email-manish.narani@xilinx.com> References: <1539581388-23963-1-git-send-email-manish.narani@xilinx.com> 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)(346002)(396003)(376002)(136003)(39860400002)(2980300002)(438002)(199004)(189003)(356004)(106466001)(47776003)(52956003)(90966002)(6266002)(486006)(126002)(110136005)(54906003)(186003)(26005)(476003)(2201001)(2616005)(6666004)(51416003)(11346002)(446003)(76176011)(103686004)(44832011)(81156014)(81166006)(2906002)(8676002)(478600001)(336012)(36386004)(72206003)(36756003)(106002)(305945005)(4326008)(7416002)(16586007)(316002)(63266004)(426003)(42186006)(50226002)(5660300001)(48376002)(8936002)(50466002)(107986001)(5001870100001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN4PR0201MB3520; 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; SN1NAM02FT055; 1:Q6e0ICXsPXcTwQ6aaOm2CgHe/IpDGG0UOCOG4QX0FSmvIyZ2BrjRURe5zEENU98qNh7zILSjKyxZNo0jT3oGCFl6QsxlGQHdbE6Tr/P6g1hPKXdSF+bjP7w2rBKBj0ns MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f083031d-f547-4322-7e5a-08d6325f538c X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:SN4PR0201MB3520; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0201MB3520; 3:aDqNDZaS3Zfn+i2ysaLaLHIqRUoqMc3nNTivW6mIuggvBEn2f5UgpS9q3e6KZZXY6UAUNiADloRltpIBUjfqYwfbNafIpPdtSlGni2LGRCN0AcY5cpfWSYC9EF+cZNpPixP2XNgw6fB81tLsq1/GeK4zMGUQT2Cjcb85JqYAZxDOPYElDTMPq1+/bYI8ZOEyY4VpmPtLO3JGG7hbXxrEdgyTqdUIh6nptXe7/m07dvuYYR4UAavb89XXlmKQDpBpEAImJzjnoVMYyeVaunwXThzpJrhAcyXcZIYxiN/XTYynf0RH5HTqpx0mOYLlpnXikOZAPZAClge64zEu6xtyMJaWyNGXCT4pOKsQrhPyjdw=; 25:4L7OpQAgu1AgcJGcER9WwTLmbesbLWSgs1YOEc7dujef7NDvrmrEHGBK7zwpsZXNf3lB44Tm6TEOTF71D1ZFmp3c2TLH+I1U6Heur9vCMYDyXXGMY2+BxH1aY/P/PpWrwp15d9f68eFMw3myUrw7CGvd/LrXuFFdz6OTrN7EbTbgL5Sam6acghR86J6jhYLxa4q6iTWe3Fhv/dTYBndLs1vZqrlhlaFGjNDeHA4zuDpR1Vwc4qRNMui0s9eeDsQOaKgqUm6tdOovD92s+umE7Eqx24PO7JgBzIuW8HZWO2HGn7SEpKz2iqUi8XGP53dMWHKpJkobameno0Ylzjl8Jg== X-MS-TrafficTypeDiagnostic: SN4PR0201MB3520: X-Microsoft-Exchange-Diagnostics: 1; SN4PR0201MB3520; 31:q97+GLZWq5rRA/IWG1FxwNlPrePPq8he5a4xE1+ZD8nrqoE3ERK7ZKGxvfLLx+kUiagOZNbuhmBKMYEJibAEnqoJiXcGeGVDPUNXF5Rx9lZSqG8tCgwPckQlwqAKqRs0AwUN6kBmc1Ti6oLDnc/5JgkjJUaxuwFuBKJvNztXhmztdIm+2rStZjAuk6SujM0v5RD7Uf3gYwroFGFPzGJmPt5yx2455QzuiYAaGhKkkQk=; 20:y+c3B4kX2r9dpgtSysqrN+0ga+jfpGe0mwiL0yGHMCK3yg+A1BIA35Zpulutyc4FXNx5iHzZIwcF9Yvk4S7PdAakx1Pg4w7dsNS8ElQj2l0B/BqNQcIFturd/EQR/SvhENp8RopF3WYrpbXecQ5d+qH1GBZPv/02k4ndYtvUexOIT40lw9DHEfitTbGuyHcbckgEQ4k1vAWrzV9D0pVpZR7z3Dl/N5U38+DITRp987tVGZE9rGg1VbVm6xmDmyGClGpryLe9jDDeU56Kj5NJT96gYah0r8CYOOHngHUOvIzOah0wu5qMO7dxwkallY58r1D0oy44H07Fd1gpxd7Qe3fK1x96PMEXSKCIjbGFkEzDFKip+pK4PY8e7GV+dVdhGeAChZaxv7DepDP8DN6KpxkXkgNGuvBYscz81wpVl9A9lapuefTqAoWnPGpyx/7lqHhGGPA4I3qWLrz6qJVWsB1ATH1JL9e43yF14cBVUSQj8juzfh7sBvGNSyjd81YC 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)(8121501046)(5005006)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93004095)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051)(76991067); SRVR:SN4PR0201MB3520; BCL:0; PCL:0; RULEID:; SRVR:SN4PR0201MB3520; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0201MB3520; 4:7ULhy1RAMEWMsd4blqyC7tVs8fNCg0SBbP5xDzpGVu7hWXPRTKt5wifW9++1iy9X2tjDXUtqwE8pdDpGp8ixW0fOyPGnHrGNMPqP+q9ZSNjjH7ytK0vBQfsgcGF/pR9V8hkVydYDqkl8Mb7ZN2B9BqVvnqXKPr8MfxZQr3QZE5KtG5HSXdO7oC2h6MbbamCedyhq+tjhjP7Ibok4TXiyuuswua1Kr+xuukQLJRmpqnkI4OluOTWZn+p/Edf5P5dIP3jk/GMEtspzQl6osrfYNZ9hgqlnORdroIOugf6PX+wxhZ8CrFlAinQAgyJvsGJBYMsxA2LIXTqqaSpc4COJjPaX3c9QWgPT6QRwq0nvrUs= X-Forefront-PRVS: 0826B2F01B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN4PR0201MB3520; 23:63j+cpguHmeeFLhp8HcBvh/YLCnWsA+KHbwRSbf?= ebvANGSTXlDxHhqeBzzplywaYpribxYuMkeddIUzz3rNpZHMOOkOEpPpg50hkkjLwggJG6UoxNgJUKk9CCWi7aosImDl5ydCMQkF1STYVAYBTIIsEWLOG/WQZlqbhr6cbMwIACjY/tlX9Mii3oFyKNKZn0GzuwRcaEpk+L3hHn1kbnFnmOV64R2S/tXMDPt0TwGGHO0h/qeplIquxpR1HaPD+4sVFwAtF9fto0XBEvLUfjzGIE80s73DgGPu+d4++ePgudPAsJTg8gYM5Yk2YKwqPaOo1vjGL41MZD7Qkcc3hN+ff6nHRsEBaR77FMv99WCcKQF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x2WnJLz8QM7bQVMNDrxueYglVOV2L24rRm8QQbovFeNbm+5uy8FXxBmypEzxPkuGFlyzN2wZVYw8mkcI3fg60a/qfcgen1TmyKsVsaMB/U32nKjr SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2018 05:30:28.2469 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f083031d-f547-4322-7e5a-08d6325f538c 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: SN4PR0201MB3520 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181014_223047_789740_FB846A03 X-CRM114-Status: UNSURE ( 7.66 ) 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 Mon Oct 15 05:29:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10641111 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 644AD925 for ; Mon, 15 Oct 2018 05:32:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F2E4295C7 for ; Mon, 15 Oct 2018 05:32:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EF6529603; Mon, 15 Oct 2018 05:32:15 +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 4FC65295C7 for ; Mon, 15 Oct 2018 05:32:14 +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=Ts+0MLuf39LNEYYUD2OvXdFF/og89JmBbc7TBVZTPBw=; b=ne0IrbbtAXFg8n KLg60rqXBDNlt3/m6OiZ9M0jBpK5k6vYeZpCV/nPigIbyNwoaRZVs/P8/B8VZhdZqWINGHj3gZpWs J6JHVKVmzu0qypnlo9Jpf7jywaiSqEw91t94fnXfgC64itx04iNbUhBP9dnvbTslJ6QVB3P2TW6LB KEBufuOl2/m9i0jYqLkmY1TOT6XjODbTlbhatdoZFxUnRFreoHm0gLEEql5VHCvJra7H7IwWAf4bX U3KJoZBbLmLZAA5cOlcpmYAq3PWTj02vL3opAo7uSSwFRUgoSq/BgVmugsbL39fhBigij/rcanLzv j9fHM2EKLIuB/VW0ZOow==; 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 1gBvU3-0005DC-AM; Mon, 15 Oct 2018 05:32:03 +0000 Received: from mail-eopbgr710062.outbound.protection.outlook.com ([40.107.71.62] helo=NAM05-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBvSa-0004ap-Iq for linux-arm-kernel@lists.infradead.org; Mon, 15 Oct 2018 05:30:47 +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=vJrU5SQvd+UnzB2y7BwttsucbKUnhltWgQ/qLUt4dh4=; b=hzWPhXWHxNMYnsO72qG0jp3omMq+3cHpRBJsaZ25GpbTYQqwJTpwS+SdqMztcmCGmSdqp9AXxror1wH8kHDV+FWKHVaEuLXvmiHDwvblOWI/kE+Tue6soXy1o3h6uHm0zFC6wfN6y2CLn3aVTFBFSelusHTK/H2YpAr6UwH+upc= Received: from BYAPR02CA0029.namprd02.prod.outlook.com (2603:10b6:a02:ee::42) by BYAPR02MB4453.namprd02.prod.outlook.com (2603:10b6:a03:57::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Mon, 15 Oct 2018 05:30:20 +0000 Received: from BL2NAM02FT059.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::200) by BYAPR02CA0029.outlook.office365.com (2603:10b6:a02:ee::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1207.28 via Frontend Transport; Mon, 15 Oct 2018 05:30:19 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; alien8.de; dkim=none (message not signed) header.d=none;alien8.de; 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 BL2NAM02FT059.mail.protection.outlook.com (10.152.76.247) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1250.11 via Frontend Transport; Mon, 15 Oct 2018 05:30:14 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:55925 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1gBvSH-0006b1-3h; Sun, 14 Oct 2018 22:30:13 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gBvSB-0001yJ-UE; Sun, 14 Oct 2018 22:30:07 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gBvS6-0001jU-7p; Sun, 14 Oct 2018 22:30:02 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 6254D1216AB; Mon, 15 Oct 2018 11:00:01 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v9 4/6] edac: synopsys: Add EDAC ECC support for ZynqMP DDRC Date: Mon, 15 Oct 2018 10:59:46 +0530 Message-ID: <1539581388-23963-5-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1539581388-23963-1-git-send-email-manish.narani@xilinx.com> References: <1539581388-23963-1-git-send-email-manish.narani@xilinx.com> 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)(346002)(376002)(2980300002)(438002)(189003)(199004)(72206003)(2201001)(36386004)(81166006)(52956003)(81156014)(50226002)(8676002)(106466001)(6266002)(478600001)(48376002)(42186006)(217873002)(2906002)(51416003)(316002)(36756003)(11346002)(446003)(76176011)(476003)(2616005)(50466002)(63266004)(486006)(356004)(336012)(14444005)(6666004)(44832011)(305945005)(8936002)(106002)(4326008)(7416002)(26005)(16586007)(5660300001)(4744004)(186003)(47776003)(110136005)(426003)(54906003)(103686004)(90966002)(126002)(107986001)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR02MB4453; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT059; 1:tXDyXMK1I4Rzjlri3iMNCWMB+XroTGziDGeRrHK/NXVjdjwYLyVTkYeAAwWcoNN+HX0UCAsCVahSTNzv3zVtd2YWt13FEyT0C6PSuWViWh/zwUa07U/lMyuPuVt4YC5A MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7a636071-fee4-4524-c53f-08d6325f4b22 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:BYAPR02MB4453; X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4453; 3:Kevtx3jFH/QiixXbTEmgYa8/JBaR7IQTXXw4U4ZDGtryFaaPQMN3mUXJMHKKrNJCidBsp8XnIAG4EgWhz/2f5C3R4anuGyh7sPvcLaDl0QmZVq/26yetKlOPLXO0zk9+NItmdgxLZqzlqPunLDkFLZ/N7SGsH/5teC2e75+sthNUvTSauRDwMxfez0sqHDdnRLwYv0Bwy/ZCY+EA8OFHlZx99aie/rsGv7wloyjDgYrwzSXQnlrnLySj0hBNnav1Dbve4C8qzKf4mw3uQEuLvpZRedylGrmnLU/Xw4mmsVsVjtQ3j4JLrtVkDOVYue0pkIl6JAeZurYrJZL6RzYX/4fcES7bqlH3CyNFl2Gmvko=; 25:yik/QYmPrEuk/La0ePni5qf+ChR+TUrCc8XsyS49JqBk/ipUDNojvBsi+gZvWWJJ+HrFml/5SAPtNEAwMROq/68G7FUQ2WVzJYP0lIj6N34XhrNzypuFibspvEE0SjYFua1GxyeDnPKwS+IkyCIaqJ/NVF8UIzce5+Swj+HKarSggQJ35Q11wOwOvWoeGT4/63qC7QCn4JmfuOoVmXHfLGfw/UIws9uIWsKY+pdhHrJioIT/03gPGw3xNOaUkheGfs1fcpT6voEgwJTPjffrPCgG7qxtyWgn4DORaHxmp4pxeIv0LKjoGJGtnDTm7+nyyra+PRvIJ5ysZu/1Tcj5dQ== X-MS-TrafficTypeDiagnostic: BYAPR02MB4453: X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4453; 31:msZ2ZBZpOBO2YHv5ssl2Bkrl23FbeCupJwyboMSGw7fVLQ/rvk9AoyFk9dMWYFjqP9BEiBuJL3vfU6K88bR87fLMhZy9NrfX6DvEaNWd0QVXz9NnGE4GioJ6h3n9hY2b045OnJHfqzjm+WvsJgdiL/pdkk8ehcIwU8u7oKZZnKkmPP5Xb0NyeAuxrYDVC+W/Vql5nRTT+kRi740qX3YcGg02Gw1xQ+Fz68DFw0DvOKI=; 20:XAK7R3vmkl7GtYvDxED9EBiUeuTGb4RI8y49YzurMH4wx4xP3CM83nCmjOMH6AlGHryo0IA1Px1qVpUmnid7nj8Gind2v4b+GWgMe2wjWRkxh2YsQhx2tHCR/XHJ+OHUkIv+7J2prDZ4QQJXUqkukFM+gYchtsOSI2tNGL1+r8DMnI7LLpEoVx8H3JAQZWbco1QN5oW6jQltktDk9uqnnHyq+HaO4feYXJp60bYQFAKGAEi6Utw68jPh3KjQxrWJ8jb2JcOh6QvSTe4gXdC1t3L9Qf6YBuPvpGsnvM9SzRwJkk+7QLUsODCgmgXCduH2ZJBmGTu/Au8rb3i2fOBUqZMVaF/isKWUZqJNxwm9vr3hPSzeUYX1DNOXXBIyie4xy8f3KoBpBsPFXkgBBwsShFkLQs+iOvbIwRwvxRoS7EEavpVJlCtEeg0HOPOFKHHi02yYt67MwZve62cdpaQ3KF//yW7iRZJq7md3w3oomfO8kJ6BKooDBEJigHMr8Ouz 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)(3231355)(944501410)(52105095)(3002001)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051); SRVR:BYAPR02MB4453; BCL:0; PCL:0; RULEID:; SRVR:BYAPR02MB4453; X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4453; 4:2TKv9jX8/BOxHkJ7YA+y9wyNyMOJg/cjmtPfSVcEN6+VeR4bd71drMfFsY2dlSJhS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pmBD4JkPCWIZ8TpK0QT96fyxXLtu6vHpLi7yvHs1xFXsQO5e9YQYn3bYxyJgEGUtB8mr+4k4RFH+t3WPFmiwH8/PsbmqCT4J8tRMqbj74fdyXIRIZAAvE0Zg4dyChVmX4QZorISiSIxVfuLQ0DU25CxajE04I+HyqY9mRkuuSh39i0Iu7JND/boDqWy5J0MYbwRNVUnNCilexCHO1G4bdCNDMrNnlwmcENZ00wllaeYPdq0Tz9oJItfb+e86hScTWkA/ZW86EXRPbjevH9ttiD84/REiaor0JHYCVkQdGXNOHTLenMI7w13wsW5zsOj7y48x28OzphhtGCbVWlkpavJL3OPPhPpv5BqHYBMz7GYF2FNE/74we+PUU7hVS7tsHf6sIOFhV4Nmn3uYoSuyiePd2rlF50goRZEZLxH5+vUJ+begMqiFkk60SQR5qfgbiyrFxGkGJA==; 5:Yj1aGzRZiwUQUdDwNVL6kmB4J0UaGGzgjqGf6x+hGO0T+5S9FbBFtx++yE9xxG9XOef1uxJ3Tr7CehNE/j/d73zII4T1lREy0eOeh8YZT8qo43Uh5rYSB3N9Je3CsonJhv71F7yrWVPCd8nPlq3UAVquoKgVeJNz8r88ttqdJ/g=; 7:Uho/yZUxfWaCwUviGp+n4B/KIuHj7gyu5vj4mWTDVd6TTmRsx1ceosiHoQNNbrH6Dmp/TB535pxulsuWxcsru11wq0K9O1U5vzadu50rHfQYxyKVaPChbzvynd3bQEX9U/orD+BEPmbW8nbomN34x9Tk5sWJCDBTubj1OtWtLZlPVCPi9u62h+nCx6P4FTrxCm+OkxeL4X2lijNgYQk0k0Jl8AiZGqnu+9qMfJl8+F+Ki7SpeFG8wizhyleuJUHA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2018 05:30:14.0854 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7a636071-fee4-4524-c53f-08d6325f4b22 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: BYAPR02MB4453 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181014_223032_682185_F406F3F8 X-CRM114-Status: GOOD ( 15.10 ) 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 | 324 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 308 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..603c4bd 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; + p->ceinfo.bitpos = (regval & ECC_STAT_BITNUM_MASK); + + regval = readl(base + ECC_CEADDR0_OFST); + if (!p->ce_cnt) + goto ue_err; + + 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: + regval = readl(base + ECC_UEADDR0_OFST); + if (!p->ue_cnt) + goto out; + + 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 state; + 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; + + 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,12 @@ 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; + + 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 Mon Oct 15 05:29:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10641117 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 A353C925 for ; Mon, 15 Oct 2018 05:34:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91C0F28A58 for ; Mon, 15 Oct 2018 05:34:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85A1B295C7; Mon, 15 Oct 2018 05:34:32 +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 0C8E928A58 for ; Mon, 15 Oct 2018 05:34:32 +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=Mr6aP1dAQ1y3iQ YMoy9V81CadwoTnvp+hnzez5S6C/ebg/bT8qEYQaskz4VsqhzjSxR9YyyDTS5WObv5/KP9KZv9lQf 1yCEt9/20F04S07Y441YbEqjwgx6fOt9FNFYvU0UjAt15PT60ttx3gRpi/o97kV51mx3y2qFVuR9i S/rUKfwfpozDv6SabHKLVt7xCtr6Krq5ei2NMTV2fTJ9LEQroiCfNxWEf5N6ufiqcsEZC0zKEU8nY TUa5F4OLLd2bRonIwkSs9S4O0cy9hmmvdLEXY4tiblTH5GMLIRyZjH+kSU9LVnv0h7xm3YCaW6yMG KULqP7pze8iG0kmmRo1g==; 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 1gBvWE-0006Ae-LS; Mon, 15 Oct 2018 05:34:18 +0000 Received: from mail-co1nam05on0627.outbound.protection.outlook.com ([2a01:111:f400:fe50::627] helo=NAM05-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBvSo-0004eS-MZ for linux-arm-kernel@lists.infradead.org; Mon, 15 Oct 2018 05:31:05 +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=EiPLrM0UNqnMxqo6l8MTAmUYV8Ydt6TKtDTA8vDHylMQAkN8yeqO/oW+1CynPfbm2BqB5cWkUyPO/U58rZ7AvB8QaumStEe05QumcU/BQV2nIS+Q5hkKqHS1QRDJeqwp6Kwf/E0XEGrzaWd7/hAk+rxR3XoFFRHdu/lzz4Wcrd4= Received: from BL0PR02CA0047.namprd02.prod.outlook.com (2603:10b6:207:3d::24) by BYAPR02MB4326.namprd02.prod.outlook.com (2603:10b6:a03:56::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.28; Mon, 15 Oct 2018 05:30:32 +0000 Received: from SN1NAM02FT005.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::200) by BL0PR02CA0047.outlook.office365.com (2603:10b6:207:3d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1122.17 via Frontend Transport; Mon, 15 Oct 2018 05:30:32 +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 SN1NAM02FT005.mail.protection.outlook.com (10.152.72.117) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1250.11 via Frontend Transport; Mon, 15 Oct 2018 05:30:27 +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 1gBvSU-0004Ya-QL; Sun, 14 Oct 2018 22:30:26 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gBvSP-0002eW-L3; Sun, 14 Oct 2018 22:30:21 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w9F5U4br014255; Sun, 14 Oct 2018 22:30:06 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gBvS7-0001lg-6O; Sun, 14 Oct 2018 22:30:03 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id ACE321216BB; Mon, 15 Oct 2018 11:00:01 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v9 5/6] arm64: zynqmp: Add DDRC node Date: Mon, 15 Oct 2018 10:59:47 +0530 Message-ID: <1539581388-23963-6-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1539581388-23963-1-git-send-email-manish.narani@xilinx.com> References: <1539581388-23963-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)(136003)(396003)(39860400002)(376002)(346002)(2980300002)(438002)(189003)(199004)(72206003)(2906002)(486006)(5660300001)(426003)(44832011)(2616005)(446003)(51416003)(11346002)(126002)(7416002)(76176011)(26005)(90966002)(36386004)(305945005)(336012)(476003)(110136005)(52956003)(4326008)(54906003)(103686004)(47776003)(186003)(8936002)(6266002)(50226002)(8676002)(36756003)(16586007)(478600001)(6666004)(316002)(106002)(81166006)(48376002)(2201001)(63266004)(42186006)(575784001)(50466002)(106466001)(81156014)(356004)(14444005)(107986001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR02MB4326; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT005; 1:ECpiXTgU5zHLj715q80AqUC9GCVjePqAuK6TphFm3vmV1UKI7NrhRs45zMHtjDLis2+j/6janrDjX9hfrwxAh2DdC4BuJjm0aiYdClaGpVQslRj0sWNVieVPBBq0AC1v MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2a12d8fb-d809-4518-9681-08d6325f5301 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:BYAPR02MB4326; X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4326; 3:B95DEvm1ceq92cRUP3fnCWjM+EWuwlVjDpm2+ksiYb0GBV6S+sE+8aS6VDr6CtPDKkVFEcc8tHsC2USmS4Wgi1jD5tKTKiVDL9PrYuV+7CtHWAo6QUikD7kfK3lqGGndx991cdhCj9YJonIr4Wv+L+6/8tvId4q/3dxJ322WbTxGUJ4oJ5OWOqk2UU1yzTYrod8udcopyseAI3DrL07brTzp6CZrd8PM3KDCNS3whqsznT+l13b2kcdGa8ehIK10ni55oDoireTVPUPafYuGXhWDGKLGDrDF36Dr3E24kCYztpfXWS4UIaAq9PPdjarpzHR+ei3RoAf99BAuzDzbfjU9yK4sYQYtq3lfkACuQnU=; 25:MX4IY3/QT8VkfK1vyu9p3R4if5QnEVYS26JLKAguqID9O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V69dGVagmv9iyQXQ0y/07xaWElkifcnSKPjbLNE5 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)(93006095)(93004095)(10201501046)(3231355)(944501410)(52105095)(3002001)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699051); SRVR:BYAPR02MB4326; BCL:0; PCL:0; RULEID:; SRVR:BYAPR02MB4326; X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4326; 4:H7nkjBFQGgP7MHYro7OO4tmTJsBW2dT4aCcySjWkI3DQe26Ofi3oRbcgUkThKguxFYxWFTBOwokCsAlepRwKF78jcvqh8SDEFkpcou7gSAcy0qFKPLUbTfdr2PCxfdlHD0ZGMKtNCjLP9FEuiggr5/Je6iDKhsLqQXllPef883tyc9ByJPVTBUzPCdBsRLA/5jbI7J+pDfoXPkilQeBtavqifPVWSqWUoeDzVLX4hiHmTPVOEys67UF29jCaMTHL/ttFgezbmkMjikbW8u3naCBlAM3FHWKjxB3+QLaEUFkkGksxWPcBH+5euasmItqr X-Forefront-PRVS: 0826B2F01B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR02MB4326; 23:Woc05y44nsp41m+4idMyYanr0LElYSdtHUe5BK3u9?= LebtkQGO5fIX/PPH2FB5GrtlgO8rihpdkATqY2WTiG0Qybw+KUr+D+Lu42F49w6sFmo91rSZsWb/UDpSH5C5cxBdlt8KQwatmgSnF9TnKtJu0LStmfu5OKNrHOfyKMwRFKT2bHP3SN/CBAUA3PG4ecrNBDqmyo0vK11E/uKFDV3SdK6nngfE6foEOgL0Bw6n7ayfk4v1+KlUCcSPu4O1J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ofp6TRZUmWJySZ6+7Sb/8fX/d50VNNoT9atPNUmawPtpCIqaULbVIrN2HBPa8HF5OfwfFL90vqWIMKceeb0g7Rpc2+OuovM+Mj7tUnrIuU3hihDLsxqThnWlSXVc5nBstu6BGWhx45yfLmGrmKFDOsHgN53pmdpmwdF2Sg3ZXYxUhnHSuuAbcDNJudu46/zkmVQOGqGCrEGHhWcXqReatr9if/iC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2018 05:30:27.5084 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a12d8fb-d809-4518-9681-08d6325f5301 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: BYAPR02MB4326 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181014_223046_801121_2ABEE429 X-CRM114-Status: UNSURE ( 8.03 ) 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 Mon Oct 15 05:29:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10641121 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 DB4CE925 for ; Mon, 15 Oct 2018 05:36:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C23DA295C9 for ; Mon, 15 Oct 2018 05:36:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1F10295EE; Mon, 15 Oct 2018 05:36:10 +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 78D19295C9 for ; Mon, 15 Oct 2018 05:36:09 +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=bD8siglzsVcSMjJMB6xwa89L02fY+k+wYR/b5JPC5HE=; b=RQ0fo+jWDK0Uwi 5wPuS4c+2wxYac3FuZFJux/jkg6UIJ97fu+XaIpYTtTlPjPL0OCYXwBGfalmF3R7LYh2rayOvHelx OL4rzLlY+uXWabGXmG9BZHBVjbOlXmm6E2UXEtOtHqUs0mc4JA+/WB2UDPN0JdQjSzcZFrEs8lm0K QCwE2nL2ocztvOXedFYNULS/ZnpIm+XjA4UIpjabxBlI1ZIrlXqh3fqIPPnrUzhjtcUTQ8er8UlVH Hv01MXI3+GjeST6De9rRDe+H+mT5fWFBFQHlwXnLuG5NqnzeAwACClzJHX6FX0G2QVBrvna0s684Q 4Cgsccva9yCozTBTvMaQ==; 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 1gBvXo-00080c-TT; Mon, 15 Oct 2018 05:35:57 +0000 Received: from mail-by2nam01on062e.outbound.protection.outlook.com ([2a01:111:f400:fe42::62e] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gBvSr-0004fX-JK for linux-arm-kernel@lists.infradead.org; Mon, 15 Oct 2018 05:31:28 +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=ajKUw2DpSoteqDej6wK91FTBBclwrY8WED2YNpk2LsA=; b=4cdDEgguDrLPsguZEqX76BoUlfelF9x3/uJNvu/eljBYvwegrq+t+Pf9L7MZqRajoF+hBCAMOdhZi5SpU7ATpnd7Bg/a4YKgREfZSLs57vBNme6OmhuS7Fqbg7/Vp2O65rBP8k7CrTCt2xWuWszIhrx4TO79s1ibQGP2Np9wcGk= Received: from SN4PR0201CA0056.namprd02.prod.outlook.com (2603:10b6:803:20::18) 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.1228.24; Mon, 15 Oct 2018 05:30:32 +0000 Received: from SN1NAM02FT026.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::206) by SN4PR0201CA0056.outlook.office365.com (2603:10b6:803:20::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1228.21 via Frontend Transport; Mon, 15 Oct 2018 05:30:32 +0000 Authentication-Results: spf=pass (sender IP is 149.199.60.100) smtp.mailfrom=xilinx.com; alien8.de; dkim=none (message not signed) header.d=none;alien8.de; 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 SN1NAM02FT026.mail.protection.outlook.com (10.152.72.97) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1250.11 via Frontend Transport; Mon, 15 Oct 2018 05:30:27 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:59637 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1gBvSU-0006bP-Dp; Sun, 14 Oct 2018 22:30:26 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1gBvSP-0002eW-8N; Sun, 14 Oct 2018 22:30:21 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1gBvS7-0001hY-9b; Sun, 14 Oct 2018 22:30:03 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id DFA13121624; Mon, 15 Oct 2018 11:00:02 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v9 6/6] edac: synopsys: Add Error Injection support for ZynqMP DDRC Date: Mon, 15 Oct 2018 10:59:48 +0530 Message-ID: <1539581388-23963-7-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1539581388-23963-1-git-send-email-manish.narani@xilinx.com> References: <1539581388-23963-1-git-send-email-manish.narani@xilinx.com> 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)(346002)(376002)(2980300002)(438002)(189003)(199004)(44832011)(446003)(36386004)(426003)(48376002)(476003)(2616005)(11346002)(336012)(486006)(126002)(63266004)(50466002)(316002)(42186006)(106466001)(2906002)(76176011)(47776003)(51416003)(356004)(6666004)(54906003)(90966002)(106002)(4326008)(81166006)(36756003)(50226002)(14444005)(8676002)(4744004)(81156014)(7416002)(72206003)(2201001)(5660300001)(26005)(103686004)(478600001)(110136005)(305945005)(6266002)(186003)(8936002)(16586007)(52956003)(107986001)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BL0PR02MB4324; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT026; 1:qgB3B9oePu42XUlpAtizxQLMR0D3IdqzjfJqKpaUo2d024kUa68vbrriXI4RFnVSJmYGsb+j42CviKEk/CefmyBidZBpidtdZ8szdGw6x7HWuPZAXO+i1C+421ZcLb9Q MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a10f66ba-c296-4839-2b5d-08d6325f52e5 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:eF2jQKzb2skjO+gyY9P4smhh83nSTM3YSXC37b112g7uiZO3UTv05Lys6cuDKcCubWXtFVwIgLODGRhCNe0XqHNZW4CntiyVEaMYzcPZLEc/+ff+7OZm89uBTrq/Ya7ynpaw6SvWEClGCSnu/twsK0rh6jsvISBaYNfEiQ1IxRuYj+Lp92pVRPsJL2KgIsgPtsxvvTiRxes97qjTd7x/rv6tpq5o1grx2PS0N7N8qNXejG/kW3qQekoTe6xWJ/xPuikZN1GuybV93jSeKr2YFHkr/EQJbt4m2wN7NcCmO1jnpIN1OBLn3jk3hufxBRTGCOvyzjmHU04d3inkcBOmYWg1gNK3wufRI81WusYzaA8=; 25:Z1QlxyeqY4rcsQVHfkIEdqsMdklcb+TlnXmPr1FSf5kmkUF+qKcqkMjBYkGE2kVuktRxBXl3XwI30q3xNqufyHjW/Egy9FHuJ9ii4jpTkD6YqrrjEQD5MprHay9lf6FWRy5Q7qtEIL+BCWnXOUyTg76pSbyiu0WgOUG10Olj1I2EnHO5ryKyoVvPgkMxWuA0S3dNoBHdM7TboJTNE72BgQ8qo69B6/dQu7bY/v2FbydCdW9M/TT9T925NZ1RpTyNXzjkLLKDoD9b0P+IV1FM9ctbP/T4RwIqhEforZBEnGGbS3stwGvksUE0C7WwyMbKQW53uz2GwJC9GRN49G047w== X-MS-TrafficTypeDiagnostic: BL0PR02MB4324: X-Microsoft-Exchange-Diagnostics: 1; BL0PR02MB4324; 31:3GwlYFZToR1xjm3zXWbjk1F/oaXOGWa+MoNOQRsMNFuasudVG1BZZyImt4UZifYEg6jsiBORo/18iNBmaHOvboKJZrS/Oof4MHJpl2z49uykO3RGItKAc7s5bYGtA49dJZwkE1EWIqe+A6ktMsvi1xcigS2qrF+J6xxX4IAaX0h0blR37Zm4vTgdvNNn6On5UBkEzfnG/1hAXHmLNd6uRfQ7Hale8Pu2LBd0kSAwV5o=; 20:CcqLNnfqlAC3to1u/Ja//bgBi7naJx1o9sjz+nqYHP45BH/y+IcNNC4tgbA1k03cpGlGJGJlS7bTDXvm8touvUplRqyDNDpll1L2mBbmsM7AY5qsiaYLDV1X6TT5SG9fyyJLNETxWWklor3hSJLt2ou2nqNtsCcgACUmYMQkDLjcil3g7ASfDYPtGh6V9hBolRLbwtTzzms3RSYulDS1MMvQ2gEHvSlT0oUkZI/MbQ9Q0rSU0gva/dPMphq6RC91XwyrnwkgBUc87OQtl317/RA8r9odyoBLIr/CDJiupCZ+HX2ZFqPxgjMUOY1mcGqWuAQ/4bnFVpf5Z6Hk8f3ZU1qyTxzjHyy8k3RhXpGEXb+5P8llujMDSeklgTZECQX6MZxW8uy4essiZTW9dssGGWsWIVS5SibqxRverZBG/49WyW2BKRKEn9dpfYidkTkLcaA/WO2xBcbNK+ldFGEUvaKf34eomrhqdGdZDD6+C1EC7AI+9Umgh7RPON3GZjot 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)(5005006)(8121501046)(93006095)(93004095)(10201501046)(3231355)(944501410)(52105095)(3002001)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201708071742011)(7699051); SRVR:BL0PR02MB4324; BCL:0; PCL:0; RULEID:; SRVR:BL0PR02MB4324; X-Microsoft-Exchange-Diagnostics: 1; BL0PR02MB4324; 4:kc7nKiPpL0/aYDkTTI4A9W413j3eScQmrNRrmLwhHuTF9bMRD9kEb1j0PJqPl157Eeb4G8zIFCumFMYL5MuvxGWEAspp+eCoakbMkXJ30zkZb+Hu+WZJqphsRC9CJtnJDyr/3RoI5sPMJRwPMz1W0PjdR1DWj7IcWkUkloRTM8Dms2OZw4hlYXhEW11vt7IgHS8TKSD6BOAXHpvB+xC0EwOP4Q2wLR3fAHm1Iby0B05TVxWqy3XqYrr/taRZVG7jiVEJ8SUNq6onHzvulJtpQ/UKfHDQrBmFWGSuuMWLXPHL6nHkqlbQlyISUniGgljF+42UyaAAIQ73ukXQGer+Mr9M2OD+oPdAizeidYpjuRY= X-Forefront-PRVS: 0826B2F01B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL0PR02MB4324; 23:ciHNWA77mU1Ccgd7tTpssa0mVwFHOTfEBfHtjZsYF?= O+CITjRhAHYd1Uh+bFqXlSQVlDWFN74cQX3oa/xABqHrjJBBoH67BUqIvaA41p6w6QFY5FwLWENfEInNCXpPQueIXspishSuN2yr8s7mAdSnZNWy+E/85bNeJfg4pro2YK3fOTYteB1VPuvD56PdCNJX9ZGCBCLOQBLeoCHF1gF6DWdEasVLPwAJmGaV4vZGBlS3B71DOaF6B1xM4iQR7G3N8gt3K8XVo9N3azLrb1Y3rFoyoSfpCYXNllixD8F9Goe3eutLNC2YOsADrVCrTFpG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1EmdP8YhSQaCd+mRDX+Rjlsc7kSf14FVmdfNop4oBHKjc73LvewcUnAYOzyl00WKyLkevjHqCijuOnNi5+lkCR6JrlngLIg0Z6RdAifRaivGo9svzkFmqv6jG8bo7ziyKWsOql2leCXhzf0t49eh4hULbgrWfUJ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2018 05:30:27.1191 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a10f66ba-c296-4839-2b5d-08d6325f52e5 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: BL0PR02MB4324 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181014_223049_830730_77EB67EB X-CRM114-Status: GOOD ( 12.99 ) 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 603c4bd..1f86d5e 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. @@ -994,6 +1395,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);