From patchwork Thu Oct 4 15:35:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10626333 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 1CAFB15A6 for ; Thu, 4 Oct 2018 15:37:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C018292B8 for ; Thu, 4 Oct 2018 15:37:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00045292BC; Thu, 4 Oct 2018 15:37:02 +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 EC60D292BA for ; Thu, 4 Oct 2018 15:37:01 +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=53DASpQJ6rHJESZvnf2EFl73Tek7f3TlCw2OKxRsTYY=; b=osmgOtxZKMXzKP U0xXo/Hpyk6m+Y4pAwxVbNYuz58q7qYABMQ29QWl+CfWFKKBVsiY3pZH5ISqqCxnobqlIXAbNiyfI F179Sd+9aMce1sRSqnHyAqbZVrsjxPlBJUjDdfRmVrW3NJUpSBfJPZZ/sM3/eIUVaIh/gH23cGBsA b/IvKclAAaqTJ/YHCsZCcfPDH8kNrv5XuRLyHYWbgBhqTv4wu6Sbx2NAhktgaqmp9xdj98xLNES/V EnKYITtsjQwCTQ4CSfZohs8DfTz2wZRMlFONAtGUJcsAKSDxkfaxnomxDpuqWmP9kqrAYWICjbvlX +UU2bajhWA+GgeuQkI9g==; 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 1g85gC-0005dc-VZ; Thu, 04 Oct 2018 15:36:45 +0000 Received: from mail-eopbgr710085.outbound.protection.outlook.com ([40.107.71.85] helo=NAM05-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85fY-0005Iu-Lb for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 15:36:06 +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=M+M9KqdVrwaWohLtX5ol4EdWWvwIfvAT9j3hDU1B9ok=; b=PiiddBDL4T/p9ih4RrdcdiLjAEx5dWbsZkuOP3saR0LNRKQkMWhxxkeIow3E0ZH052MQ/C4GxvqATpr55lUgkgG1WmYmk5w6PDgcKTAVRumsbkys8p3xd5oWH+qC4OS5kZJfV50RU55ImO+tTjD1sQXwNtC1gTiblAcvqzWpD24= Received: from DM6PR02CA0009.namprd02.prod.outlook.com (2603:10b6:5:1c::22) by BN7PR02MB5107.namprd02.prod.outlook.com (2603:10b6:408:22::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.22; Thu, 4 Oct 2018 15:35:51 +0000 Received: from BL2NAM02FT043.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::209) by DM6PR02CA0009.outlook.office365.com (2603:10b6:5:1c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1207.18 via Frontend Transport; Thu, 4 Oct 2018 15:35:51 +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 BL2NAM02FT043.mail.protection.outlook.com (10.152.77.95) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1207.19 via Frontend Transport; Thu, 4 Oct 2018 15:35:51 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:54896 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1g85fK-0002Y8-Ik; Thu, 04 Oct 2018 08:35:50 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g85fF-0008Vk-F9; Thu, 04 Oct 2018 08:35:45 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp1.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w94FZiAx023767; Thu, 4 Oct 2018 08:35:44 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g85fD-0008VK-L0; Thu, 04 Oct 2018 08:35:44 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id CF6AD121465; Thu, 4 Oct 2018 21:05:42 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v8 01/10] edac: synopsys: Update the driver code for better readability Date: Thu, 4 Oct 2018 21:05:19 +0530 Message-ID: <1538667328-9465-2-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> References: <1538667328-9465-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)(346002)(376002)(396003)(39850400004)(136003)(2980300002)(438002)(199004)(189003)(36756003)(15650500001)(81166006)(336012)(106466001)(81156014)(90966002)(8936002)(36386004)(8676002)(72206003)(63266004)(356003)(478600001)(50226002)(426003)(76176011)(48376002)(446003)(2906002)(7416002)(51416003)(50466002)(14444005)(305945005)(11346002)(16586007)(103686004)(106002)(44832011)(186003)(54906003)(2616005)(47776003)(6266002)(52956003)(476003)(2201001)(26005)(316002)(5660300001)(6666003)(126002)(4326008)(486006)(110136005)(42186006)(107986001)(5001870100001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN7PR02MB5107; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT043; 1:mmumrW1wQ9qZpYrHGxTyVutOufk38xYCHoSEMJN72ST4kRSgG04PqosfuF4uRyXf2KsLLVVBFN3rd+4zOnZhL9IBjPVu7Tyi9Rg7PONTZAWPkqK8EmT/PWnrNoN8IgTx MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b892c77a-8a2b-4451-5394-08d62a0f10d6 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:BN7PR02MB5107; X-Microsoft-Exchange-Diagnostics: 1; BN7PR02MB5107; 3:R6Dhe9c9HOhC6v9++h06ewyT0nNgOWxt36d3mcGLJ8GhQQ5/M+iO9B9cAcicdNVRoNy+HvHTOOe64y3XXvQo7IiQ/SumR3fyIO0yVaw9cap3s2ZsAN4WVrzZmPIKYDmYHbfCccVU3d/qHF9DcmoaBC0fWhOjzTR/zNzPd7rRMJEbV9YH6tUG1+G4B0GhcpYuqRIapvl7OA00iCv8dwtPFc4j4ryO95gm6ml1nX/iz5FzMCv9gznQPfta7yAj4SjgNdA+VS91H2w7DqSwvWHthRc7pwgVr/nnPFyrGQ6qjbjQa2+PypixiaZ4cBcCwflLBvXDK1EGU5v4Mmb+EZIbXB5cC+xktImZZ96zsd8LTqg=; 25:3I4nAmEbI3di+6LnZcc4uq0Jv2/VOGV8DHJEeV9SuHSMx44XK6NnEQXd0S4F6XyFlNqE4CQGhM4C25JdcQ4nFort3wovoApuby8hrAY8NvDZ+VH+WaJtN6pcKNBIEIm6P/Zkqsd+cCqZpEaJMxeW35CIfXhl0xAPJdtOdgF/l1RaaqdQpcUq1Ml4m1/gYZjHmc8aqQD93PsoeEOTbiWI2YKMaFM9r6fBA/THIaOH1EcCA513NpszG7UwoKb+J++88fILrO/X1J9eOW0Y99Q5dcIsiRaAQDfMyo1HF+MfMa1jNopb7GulE7H3tKbsu9t4YUQ9NtzYETuDGveDRe5Nlg== X-MS-TrafficTypeDiagnostic: BN7PR02MB5107: X-Microsoft-Exchange-Diagnostics: 1; BN7PR02MB5107; 31:4m0P5FYatRsVO62WHAUdHSy+BqN7qu+E0+58eG2dkQB/e8rTl8ZysLqwR911I/Pzld5Fl8A4zEmn6gp6HRXABZuVTWa6LvuyDfWwKVxmMtIw/4x2umJKKs6+4tTdQorW9h4bbPRiKOEskMaRh559RKuM0frI21YOcNJQrnlkazDWsJGZqBV2O6JSlgo6trJ9EMPZwQxdbwE0NFvTQ34cJ/qei62+XBi1zW0pOssNsSk=; 20:pIkw6EdRc2hfZ47zlYRg+5KTNoMuaLNEXyvkD6NJWBAL4E2f2j1fZqSA8pIwdxqmg59k3Rlc0yka8oM59XVbTz8MpwXrNw+3oFfg8wadweQXX3A8lD255PVTMnB1m5/Feq3uBpDua7pKGEjtEzVclZ23xEaOdaBmihhDZsnTug7/gnC1QctJ0YmciKo4yn1vk3sD+pg37GY8csahKroiY2DkdXacVFPJ5AmFe0UHyoazHcwnurubv5rVjv5yTIEwTLKTLEp3oSeIcWvVzW0NGY5Am8kvi7u7I1NRBMSmlXfGVOw4hY1I+VcS9Qc8vmXKGbnrZKwRBIiR+GKXWTuP2nKgW3Vw1jr/X/NtkJ6uWnrsc33yCZI/0dqFDu9uiwsCbDJgO/jJN+ule64OubKM1dy7phaZNL9Yqhln9cE/km5YgvlzWZDLVvdrJ8CIfmZRfCNFwwW30+/BMIkBqj+ghaGYPNJdlFMwpX9yDWwg/M93wdUeeQjW2hE9yxG33R/6 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)(93006095)(93004095)(3002001)(3231355)(944501410)(52105095)(10201501046)(6055026)(149066)(150057)(6041310)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(201708071742011)(7699051); SRVR:BN7PR02MB5107; BCL:0; PCL:0; RULEID:; SRVR:BN7PR02MB5107; X-Microsoft-Exchange-Diagnostics: 1; BN7PR02MB5107; 4:v7FsM0qcO6XKMM0la3F3olXJTJ/3ghCvBcLtHJ3LcakhF/Na9LtRBb1MovRxjMQR/x0iTFWJG8amZmFCTMO4ipk1MpIwasXp6uGHLwwCHGTKUz8rdKdMbowUcnIzNu80GyzOV7GBLI7yyzb3jFQKYELlq5YKfyB+ETdIfVZu03whGcePiBIcxsJAI9jOXxY4CYj3pgTvxRys4fJa3nIDnSCbubArYRWwMcdhahoPP/xHBIQ0033taBgU2fnnbH9ub/llGv2tfN1bVGwvAI609ABHpTv9fnpUNU6ifKJ/sWOnnzUozBbYv4eI9YVn5JApC/aL/AoX0hdn1WGjcL8qmZSSuBB9I+XxND/K6Q/SVaA= X-Forefront-PRVS: 0815F8251E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN7PR02MB5107; 23:FMGtlIrSQrCix+B1Cv4oOkHazgzfVH6QwfHfagC4H?= Jotf4wcI5XPu0hRSs8ZVmhW5CuDrIQXuA+DRDMvQlspIQXkPJ+6zI9YFqk7RAdi6kBbgMRrVYJXRZVLEGw+pAusUCRz5FuRb0KZT2OTeyWzXGs1mnwwuDEIRhnUyqjJTgoFKi+Y19A1QimqFXoyh2D7/EEZg4h4of0IrZTy3hBFdjtlDpNch/QRpsCskNH2WBkzhRHMC7E0UcZ2E9WLskisFItdWGtS9L/zuWgA72K2MvJzEWP03P5t7GcDif/KYSyfA/+wrDphdzA+CKaHyCvDJs9G0FpWSRprKbNHbx2pqKLNwnaPHwAKJ2sBKvGGuYObXCxfskJiOP0bXkGS0pbGhYDNd8JffZCA2isIVPwUR0LDT7z5weHYem1ZUZBWdvDnR0K1aZgWTNClmCIgFkEI5nujOoAKQ1gqp0cJMiEa8ixaMt6iYgrEXy2aD2CzZMmbMaAlexChZu8R1egY3DJje4Pv0WwXoxbkHxiVrgIbk5yLOvrmPpPeQFfg3l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ginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2018 15:35:51.2361 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b892c77a-8a2b-4451-5394-08d62a0f10d6 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: BN7PR02MB5107 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_083604_723122_ABE8DE82 X-CRM114-Status: GOOD ( 10.21 ) 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 Modify the driver with some changes for code clean up. Update the debug messages for EDAC errors reported. Increase the indentation of the macros for better readability. Signed-off-by: Manish Narani --- drivers/edac/synopsys_edac.c | 104 +++++++++++++++++++++---------------------- 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 0c9c59e..1936c73 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -26,74 +26,74 @@ #include "edac_module.h" /* Number of cs_rows needed per memory controller */ -#define SYNPS_EDAC_NR_CSROWS 1 +#define SYNPS_EDAC_NR_CSROWS 1 /* Number of channels per memory controller */ -#define SYNPS_EDAC_NR_CHANS 1 +#define SYNPS_EDAC_NR_CHANS 1 /* Granularity of reported error in bytes */ -#define SYNPS_EDAC_ERR_GRAIN 1 +#define SYNPS_EDAC_ERR_GRAIN 1 -#define SYNPS_EDAC_MSG_SIZE 256 +#define SYNPS_EDAC_MSG_SIZE 256 -#define SYNPS_EDAC_MOD_STRING "synps_edac" -#define SYNPS_EDAC_MOD_VER "1" +#define SYNPS_EDAC_MOD_STRING "synps_edac" +#define SYNPS_EDAC_MOD_VER "1" /* Synopsys DDR memory controller registers that are relevant to ECC */ -#define CTRL_OFST 0x0 -#define T_ZQ_OFST 0xA4 +#define CTRL_OFST 0x0 +#define T_ZQ_OFST 0xA4 /* ECC control register */ -#define ECC_CTRL_OFST 0xC4 +#define ECC_CTRL_OFST 0xC4 /* ECC log register */ -#define CE_LOG_OFST 0xC8 +#define CE_LOG_OFST 0xC8 /* ECC address register */ -#define CE_ADDR_OFST 0xCC +#define CE_ADDR_OFST 0xCC /* ECC data[31:0] register */ -#define CE_DATA_31_0_OFST 0xD0 +#define CE_DATA_31_0_OFST 0xD0 /* Uncorrectable error info registers */ -#define UE_LOG_OFST 0xDC -#define UE_ADDR_OFST 0xE0 -#define UE_DATA_31_0_OFST 0xE4 +#define UE_LOG_OFST 0xDC +#define UE_ADDR_OFST 0xE0 +#define UE_DATA_31_0_OFST 0xE4 -#define STAT_OFST 0xF0 -#define SCRUB_OFST 0xF4 +#define STAT_OFST 0xF0 +#define SCRUB_OFST 0xF4 /* Control register bit field definitions */ -#define CTRL_BW_MASK 0xC -#define CTRL_BW_SHIFT 2 +#define CTRL_BW_MASK 0xC +#define CTRL_BW_SHIFT 2 -#define DDRCTL_WDTH_16 1 -#define DDRCTL_WDTH_32 0 +#define DDRCTL_WDTH_16 1 +#define DDRCTL_WDTH_32 0 /* ZQ register bit field definitions */ -#define T_ZQ_DDRMODE_MASK 0x2 +#define T_ZQ_DDRMODE_MASK 0x2 /* ECC control register bit field definitions */ -#define ECC_CTRL_CLR_CE_ERR 0x2 -#define ECC_CTRL_CLR_UE_ERR 0x1 +#define ECC_CTRL_CLR_CE_ERR 0x2 +#define ECC_CTRL_CLR_UE_ERR 0x1 /* ECC correctable/uncorrectable error log register definitions */ -#define LOG_VALID 0x1 -#define CE_LOG_BITPOS_MASK 0xFE -#define CE_LOG_BITPOS_SHIFT 1 +#define LOG_VALID 0x1 +#define CE_LOG_BITPOS_MASK 0xFE +#define CE_LOG_BITPOS_SHIFT 1 /* ECC correctable/uncorrectable error address register definitions */ -#define ADDR_COL_MASK 0xFFF -#define ADDR_ROW_MASK 0xFFFF000 -#define ADDR_ROW_SHIFT 12 -#define ADDR_BANK_MASK 0x70000000 -#define ADDR_BANK_SHIFT 28 +#define ADDR_COL_MASK 0xFFF +#define ADDR_ROW_MASK 0xFFFF000 +#define ADDR_ROW_SHIFT 12 +#define ADDR_BANK_MASK 0x70000000 +#define ADDR_BANK_SHIFT 28 /* ECC statistic register definitions */ -#define STAT_UECNT_MASK 0xFF -#define STAT_CECNT_MASK 0xFF00 -#define STAT_CECNT_SHIFT 8 +#define STAT_UECNT_MASK 0xFF +#define STAT_CECNT_MASK 0xFF00 +#define STAT_CECNT_SHIFT 8 /* ECC scrub register definitions */ -#define SCRUB_MODE_MASK 0x7 -#define SCRUB_MODE_SECDED 0x4 +#define SCRUB_MODE_MASK 0x7 +#define SCRUB_MODE_SECDED 0x4 /** * struct ecc_error_info - ECC error log information @@ -172,7 +172,7 @@ static int synps_edac_geterror_info(void __iomem *base, p->ceinfo.col = regval & ADDR_COL_MASK; p->ceinfo.bank = (regval & ADDR_BANK_MASK) >> ADDR_BANK_SHIFT; p->ceinfo.data = readl(base + CE_DATA_31_0_OFST); - edac_dbg(3, "ce bit position: %d data: %d\n", p->ceinfo.bitpos, + edac_dbg(3, "CE bit position: %d data: %d\n", p->ceinfo.bitpos, p->ceinfo.data); clearval = ECC_CTRL_CLR_CE_ERR; @@ -250,7 +250,7 @@ static void synps_edac_check(struct mem_ctl_info *mci) priv->ue_cnt += priv->stat.ue_cnt; synps_edac_handle_error(mci, &priv->stat); - edac_dbg(3, "Total error count ce %d ue %d\n", + edac_dbg(3, "Total error count CE %d UE %d\n", priv->ce_cnt, priv->ue_cnt); } @@ -295,9 +295,9 @@ static enum dev_type synps_edac_get_dtype(const void __iomem *base) */ static bool synps_edac_get_eccstate(void __iomem *base) { + bool state = false; enum dev_type dt; u32 ecctype; - bool state = false; dt = synps_edac_get_dtype(base); if (dt == DEV_UNKNOWN) @@ -359,23 +359,23 @@ static enum mem_type synps_edac_get_mtype(const void __iomem *base) */ static int synps_edac_init_csrows(struct mem_ctl_info *mci) { + struct synps_edac_priv *priv = mci->pvt_info; struct csrow_info *csi; struct dimm_info *dimm; - struct synps_edac_priv *priv = mci->pvt_info; - u32 size; - int row, j; + u32 size, row; + int j; for (row = 0; row < mci->nr_csrows; row++) { csi = mci->csrows[row]; size = synps_edac_get_memsize(); for (j = 0; j < csi->nr_channels; j++) { - dimm = csi->channels[j]->dimm; - dimm->edac_mode = EDAC_FLAG_SECDED; - dimm->mtype = synps_edac_get_mtype(priv->baseaddr); - dimm->nr_pages = (size >> PAGE_SHIFT) / csi->nr_channels; - dimm->grain = SYNPS_EDAC_ERR_GRAIN; - dimm->dtype = synps_edac_get_dtype(priv->baseaddr); + dimm = csi->channels[j]->dimm; + dimm->edac_mode = EDAC_FLAG_SECDED; + dimm->mtype = synps_edac_get_mtype(priv->baseaddr); + dimm->nr_pages = (size >> PAGE_SHIFT) / csi->nr_channels; + dimm->grain = SYNPS_EDAC_ERR_GRAIN; + dimm->dtype = synps_edac_get_dtype(priv->baseaddr); } } @@ -434,12 +434,12 @@ static int synps_edac_mc_init(struct mem_ctl_info *mci, */ static int synps_edac_mc_probe(struct platform_device *pdev) { - struct mem_ctl_info *mci; struct edac_mc_layer layers[2]; struct synps_edac_priv *priv; - int rc; - struct resource *res; + struct mem_ctl_info *mci; void __iomem *baseaddr; + struct resource *res; + int rc; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); baseaddr = devm_ioremap_resource(&pdev->dev, res); From patchwork Thu Oct 4 15:35:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10626343 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 CDB8315A6 for ; Thu, 4 Oct 2018 15:38:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08D632907E for ; Thu, 4 Oct 2018 15:38:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF44B29086; Thu, 4 Oct 2018 15:38:30 +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 419A62907E for ; Thu, 4 Oct 2018 15:38:30 +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=LBka8r5GsXLv6fAFC+TIs/OhaDtGAuLvLvhs0jsSwiA=; b=q5/FGS6PUUdc7B M4J1zeQKzcWhjVOqwEYf+/svsyRPyUfvLCxkRhXZ46iw7PjbcOv1EG3txFdphmyVq3f9Pt35+3BZR f2RQZLlcTE0/CfibOAD6x9uBvE28IQaoQkvvWIP2+b5INWh6Y297FqSI8BcvxeBNCdp5841MHC17f Ox8PR3Vu4AMNRd1iyjRvBmK631OxvmxsVKHdbJwwWstE8hP7xMZBNQJidivrrEBOgPv2RCgPdIBAS puTUWlKUSCoDqoXRIFGkR+uH0xw6g3VhhOjj8lQi0OjAD139yYsEoOxWBbel5DxIC9PgOdgLW4hj6 4/zyejPdCC5FIjfpTg3Q==; 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 1g85hj-0006Eg-JN; Thu, 04 Oct 2018 15:38:19 +0000 Received: from mail-eopbgr680078.outbound.protection.outlook.com ([40.107.68.78] helo=NAM04-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85fm-0005LJ-8n for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 15:36:38 +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=x3vel/bJQ3soqncvRhj7fkRbbdMqjTEXPsEsovB/6qc=; b=WDa9cjowk/DfalZtbJfbdE2jVmV+AOoRl21G/OFzVUuvG6m+rtNl2FvpM9zKn+h6jE7mfKihJXsfid0zz6VuJSEHTsA8DWr9hONYtFrhSw99Mfjl8zfAcOP6ZwS/y17W0/NwvNc7ZXgORZ8R1AlTYg0wxxBlOWiFbJinIludGbw= Received: from BL0PR02CA0036.namprd02.prod.outlook.com (2603:10b6:207:3c::49) by BYAPR02MB4758.namprd02.prod.outlook.com (2603:10b6:a03:4e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.23; Thu, 4 Oct 2018 15:36:03 +0000 Received: from SN1NAM02FT024.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::202) by BL0PR02CA0036.outlook.office365.com (2603:10b6:207:3c::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1101.18 via Frontend Transport; Thu, 4 Oct 2018 15:36:02 +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 SN1NAM02FT024.mail.protection.outlook.com (10.152.72.127) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1185.13 via Frontend Transport; Thu, 4 Oct 2018 15:36:01 +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 1g85fU-0001OT-Ry; Thu, 04 Oct 2018 08:36:00 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g85fP-00005B-O7; Thu, 04 Oct 2018 08:35:55 -0700 Received: from xsj-pvapsmtp01 (xsj-pvapsmtp01.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w94FZpB4030922; Thu, 4 Oct 2018 08:35:52 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g85fL-0008W8-Do; Thu, 04 Oct 2018 08:35:51 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 91BD6121465; Thu, 4 Oct 2018 21:05:50 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v8 02/10] edac: synopsys: Rename the static functions to a shorter name Date: Thu, 4 Oct 2018 21:05:20 +0530 Message-ID: <1538667328-9465-3-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> References: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(39850400004)(136003)(346002)(376002)(2980300002)(438002)(189003)(199004)(81166006)(81156014)(5660300001)(50226002)(8676002)(7416002)(36386004)(6266002)(48376002)(47776003)(6666003)(5024004)(14444005)(50466002)(8936002)(72206003)(478600001)(36756003)(106002)(52956003)(126002)(76176011)(316002)(51416003)(16586007)(476003)(2906002)(90966002)(11346002)(106466001)(42186006)(2201001)(44832011)(186003)(54906003)(4326008)(356003)(336012)(110136005)(426003)(26005)(305945005)(2616005)(103686004)(446003)(486006)(63266004)(107986001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR02MB4758; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT024; 1:Ttzz5Kohao9Kp2h7SoPpzIWjM6nmIX/5fVH1/xUaX0mD5Kao5JTSTTS6Hb6pdP8BKMsE2ChBPGyxjeqs01/iWWWasCfbpuVaCApGBLjbVQbH9I5I0wSaSU89vg7g8ECT MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d517054b-2b20-4962-b784-08d62a0f1705 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:BYAPR02MB4758; X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4758; 3:vXAEgZPjZPl0MOUEttPi6A5449Z09nBuMBg+vI3gJZ/stxEiiViosIFpYkL70+LoA0yIUIobTUt8wPgJlW//9w6APKiHji8+JNWuzqThYdeVe67KSI+yHCf13VCONC55uHOWrId+vyZG81hTr7/ZlgY01QjSWK621UTu0vmumOA7j1GpB0ZEqjA8GgI+i/blEm+VSpRVg9d9r2+tFLLUeOG9Tak003Vc+CuaM5VZk4HC3hOufDSyE8pooawuxutvIdtIj6BB3YTiQJVwkfzGeWXjSDySTyfpW3coJiZXHOmTbtYuTrRX/UynYmdobkHK1o0GB3KnaOHJ7Ob123KOKrh0+aQhKvarKbJgfJH/tjg=; 25:u4F5mQ67O7IPbMP8zdMEduJRNZT8xuYcxqj/+4itshh0ieI53xtorQBlkWmVMb+aEmuidE9tvLjrjKRMsTOd77lDxDEOgnedgVJsLENKB6Sk3gj/IdS5lSInBt1ujHEJpLpqWM7MW+aFqk19RRALvTzhf6nAAc532z1tDAlsyURR+m+QoeqwX+pBo5NKjiNIIbWEOwv1jB/Dw4C1fKXgfOqfZktK03cS0tILxPfsyRBe7/M7PnMIhcno+BzfkXZrO82rCeEaAnbV1A26n/SBmK0hwNOXc1EZgx14P5bcO9EmqdC7IUCQZHdTEGc2RI/e/4sKSo3ZbVbzn9An32K3iA== X-MS-TrafficTypeDiagnostic: BYAPR02MB4758: X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4758; 31:yHSeIMas9MDBQn9WyogvtV9P0dvOG7daQugMGKucAAwOf00FVYToC7uz61bSKq5SudDdLfcUMeSLIEhu79P1GyIXEVI6N7oXdOvCAN42BesmqkI+4Xy30PN/z92Mjnmku6Hwn9DOsx3VImyRPqUQuAfdAmVV4YbZWlC423DbRZRJIzVzmr9mLCPsO/dFNJgBi7pmrV5vcPH1o7iWZbVCO4KM5BYzGkRbmJNq8mW6kD8=; 20:EuetuFHj+hoPBMttUJpxLjsFJxSFmkSyDfEJLhlz3E/lDXUD3+Uibij+8YmuSlHKX4RbploL2ttzXVAIuyErdx6ucPMhylgdAvmUOTSkFHYqEa+l/dPMpbm0/i62YiWAHkt+MHjofV2TNvZ3U7/fDbHcAQaY3rRDRKCjb9E0GUhouUP2qrdvEz+UoW/Ouj8ylPNwjyqzFeMPjKYzf7MzGIq8VO2XB60cwOhjS2i3O+jGnyUFO2rTlIgGxM6hN0Ssq/QY/+NyTDX7C+vaD7rLAS1Bm7ez4hAyVwWl5seF7VEZMatM9ntQm+w950TpuGAt7T/5eAlP4yQtr6VO96pAKV0KFqk+rpwvrpQ3qPcBp/TfDf1QdhAHAkANnvLm/KllLnGzDOGV653K4cpSaqh/q18mbQPu0fvhT9SLjKeZrn5h3RfQRqRbSgmkU7PXztjWnzeoHRhj+J0KRa5uqkGnXutbxFTyfOUxXbHgVf8t9CHVEWB2fd6d5CdrJ/wCbEZj X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(163750095850); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231355)(944501410)(52105095)(93006095)(93004095)(10201501046)(3002001)(6055026)(149066)(150057)(6041310)(20161123558120)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051); SRVR:BYAPR02MB4758; BCL:0; PCL:0; RULEID:; SRVR:BYAPR02MB4758; X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4758; 4:D94xgGtOrBN3Q0QCrCKdOCE4DBlpxJLmqzXf+X/ZluROewSegXm245bVxAC+5YjLHl/uzE+WCBUmCBuStbf5Hpdiw4rWVi8g+3I0lc9gwW5znHk8I7P6TY2YSMsYuc/9J7+QYBodyV00fczclhRFT9BZKcpnNa8+hR7pxy1tAVZrjNL/LwJTMayC/66hviPRBNgiHy/yy5sTmJEngZhXUj1nVmi1AbfHDYc9vEYiTJlZm253038SGjCF/Obv0M0R2s/7sC9AgKjIYtuoLL7vJgWK74f0GJMYsotG7dsVKgf8PBzoF5qCGwiPO19ud/HWmmNu6MQmWpAYIT6ptMXk7TT8cjE+gUjZH/R1J2uI2h4= X-Forefront-PRVS: 0815F8251E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR02MB4758; 23:K0McguQ5TPCdQMjdnGTs6fy72/vQRT2KtE+L922vd?= pAG3MTVk6F41bj7O3ODS0PVVwVbld9oeDIKMvA3YwypH9VF0RJ9yFDMO55kZP5WCfZB2rZGj909knRmKZvGb1ZYbrNCJ1jrNzWIuA+CXqMbz+cGZoUn2QgigmpVa/inFu+1RxXL+9F40ixHCGk8hVK6jDxNxEJBp9CIAw0YquScrns5Jt8Mml+DEkmzVaYDaalsEi+x8zIRiwrZHYm3/wosDcpTs2aL+5LnRIUOUjY0u3eX+ANoMeUcIS6O6U+0YW8XEI1dBZbByxdsYmInNE98yluYA2HX91QSgly8IzLdWLO/8eH03xZvQ4UBQapw88bY0tz/NRpKBMdD0WU4ARxQ3ED4tKqU20wnuZFaSb+M/2vblCSu160xw1uHi+z4PSpZHFo1cD+o3kuh14srl7+rheXNxa2HI+PghYMABwEMmgdEZJpjVBrnNsVQeCMev8q4vylIdjqz3wvVOyEIiDBuYEOhmk9iN6eSJ/Dxjn+o/GkQrZq8KWQSEGME2HqSnI/uZ0DOADbcFLqh20BujL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fB1lqrJKGY= X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4758; 6:ctR7YITlhY/qSQk8W1Bw+msuBu4GVBuUqElrxMAAXYKFifvJgBwdEBhbQORvw0gjIIUfU14/cgRTTGic8QGunpD9KyhTydUPrBQtJx9UlaayGsKoWOn7OP5WqZskGcFxBlQbkWnR+gsuF7VEPLDMNwEl2tP1adwHfW3BvpRoNSsfU/Sy/qVuqgawZ5qpJUM72vRM1YuQy3z4IyWcePfMGofVkhNmWYGZ7GQKRTQUN7Hgb/mnyXXtuQTudmpcO0LtQTW8dpdJXCWgE1O0Ag4yYEpxKIjecfhrJdiATpdesCmaOVPBq6TlCozjOz9vlGqk3mNzMIBgViiTAACC141/9zseCHBRn0E4jpSZD+xXpDbcwdsiV7HA44nE0tjAOQdrfzwWHKYRWotGsS9RQQrpZKzSC6RUcd7aekcfqpOdwAbUg/ENmQBOYKXenR7AaU5+slSonbPR5c3z2xw+ObAd9Q==; 5:EZ45xCuYT0X1XDrrPiLI37b7xwKpgHk1CxmAHxpgXWslmQBrUXEIYJuyp3hXq1f4hHWnXm/k6s9UFBnHbiBgwYNuI1N3Yp5q6lEUKFbS/Md/DZWrLsO9rywYKokNqnDo+2zXULorrKqKxEGExWi5pxAkjqYV6rOTiCdzk7SGRJQ=; 7:+DAEUIL4fcmFNC8suOVhbZXh1HZSeTvheNF8tZsL/G5zeHUN4wkER1FE8Rs3eL84dC3V34Nd8/zci3iqRDzt4a1gRcZwcZvPbOJ6de2PsOkY6Odz4ghVRAwuNRyE7vAfGr2rfviPXTReckZb9sTzuMwknMVphWmtXv+Ecd5osaezkZZkQ51FL3arLioBrNbNIjet4WUc9y2a2XlpUcDdzqTR4AyITDlv2bxVerCziaF2qMRz3bH3bXV2LSYQpzDS SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2018 15:36:01.3474 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d517054b-2b20-4962-b784-08d62a0f1705 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: BYAPR02MB4758 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_083618_685249_14A07426 X-CRM114-Status: GOOD ( 12.74 ) 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 Rename the static functions to a shorter name. Since this is Synopsys EDAC driver, better to remove unnecessary 'synps_' prefix in function names. Signed-off-by: Manish Narani Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov --- drivers/edac/synopsys_edac.c | 56 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 1936c73..abb5de8 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -142,7 +142,7 @@ struct synps_edac_priv { }; /** - * synps_edac_geterror_info - Get the current ecc error info + * edac_geterror_info - Get the current ecc error info * @base: Pointer to the base address of the ddr memory controller * @p: Pointer to the synopsys ecc status structure * @@ -150,7 +150,7 @@ struct synps_edac_priv { * * Return: one if there is no error otherwise returns zero */ -static int synps_edac_geterror_info(void __iomem *base, +static int edac_geterror_info(void __iomem *base, struct synps_ecc_status *p) { u32 regval, clearval = 0; @@ -196,13 +196,13 @@ static int synps_edac_geterror_info(void __iomem *base, } /** - * synps_edac_handle_error - Handle controller error types CE and UE + * edac_handle_error - Handle controller error types CE and UE * @mci: Pointer to the edac memory controller instance * @p: Pointer to the synopsys ecc status structure * * Handles the controller ECC correctable and un correctable error. */ -static void synps_edac_handle_error(struct mem_ctl_info *mci, +static void edac_handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) { struct synps_edac_priv *priv = mci->pvt_info; @@ -232,30 +232,30 @@ static void synps_edac_handle_error(struct mem_ctl_info *mci, } /** - * synps_edac_check - Check controller for ECC errors + * edac_check - Check controller for ECC errors * @mci: Pointer to the edac memory controller instance * * Used to check and post ECC errors. Called by the polling thread */ -static void synps_edac_check(struct mem_ctl_info *mci) +static void edac_check(struct mem_ctl_info *mci) { struct synps_edac_priv *priv = mci->pvt_info; int status; - status = synps_edac_geterror_info(priv->baseaddr, &priv->stat); + status = edac_geterror_info(priv->baseaddr, &priv->stat); if (status) return; priv->ce_cnt += priv->stat.ce_cnt; priv->ue_cnt += priv->stat.ue_cnt; - synps_edac_handle_error(mci, &priv->stat); + edac_handle_error(mci, &priv->stat); edac_dbg(3, "Total error count CE %d UE %d\n", priv->ce_cnt, priv->ue_cnt); } /** - * synps_edac_get_dtype - Return the controller memory width + * edac_get_dtype - Return the controller memory width * @base: Pointer to the ddr memory controller base address * * Get the EDAC device type width appropriate for the current controller @@ -263,7 +263,7 @@ static void synps_edac_check(struct mem_ctl_info *mci) * * Return: a device type width enumeration. */ -static enum dev_type synps_edac_get_dtype(const void __iomem *base) +static enum dev_type edac_get_dtype(const void __iomem *base) { enum dev_type dt; u32 width; @@ -286,20 +286,20 @@ static enum dev_type synps_edac_get_dtype(const void __iomem *base) } /** - * synps_edac_get_eccstate - Return the controller ecc enable/disable status + * edac_get_eccstate - Return the controller ecc enable/disable status * @base: Pointer to the 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 synps_edac_get_eccstate(void __iomem *base) +static bool edac_get_eccstate(void __iomem *base) { bool state = false; enum dev_type dt; u32 ecctype; - dt = synps_edac_get_dtype(base); + dt = edac_get_dtype(base); if (dt == DEV_UNKNOWN) return state; @@ -311,11 +311,11 @@ static bool synps_edac_get_eccstate(void __iomem *base) } /** - * synps_edac_get_memsize - reads the size of the attached memory device + * edac_get_memsize - reads the size of the attached memory device * * Return: the memory size in bytes */ -static u32 synps_edac_get_memsize(void) +static u32 edac_get_memsize(void) { struct sysinfo inf; @@ -325,7 +325,7 @@ static u32 synps_edac_get_memsize(void) } /** - * synps_edac_get_mtype - Returns controller memory type + * edac_get_mtype - Returns controller memory type * @base: pointer to the synopsys ecc status structure * * Get the EDAC memory type appropriate for the current controller @@ -333,7 +333,7 @@ static u32 synps_edac_get_memsize(void) * * Return: a memory type enumeration. */ -static enum mem_type synps_edac_get_mtype(const void __iomem *base) +static enum mem_type edac_get_mtype(const void __iomem *base) { enum mem_type mt; u32 memtype; @@ -349,7 +349,7 @@ static enum mem_type synps_edac_get_mtype(const void __iomem *base) } /** - * synps_edac_init_csrows - Initialize the cs row data + * edac_init_csrows - Initialize the cs row data * @mci: Pointer to the edac memory controller instance * * Initializes the chip select rows associated with the EDAC memory @@ -357,7 +357,7 @@ static enum mem_type synps_edac_get_mtype(const void __iomem *base) * * Return: Unconditionally 0. */ -static int synps_edac_init_csrows(struct mem_ctl_info *mci) +static int edac_init_csrows(struct mem_ctl_info *mci) { struct synps_edac_priv *priv = mci->pvt_info; struct csrow_info *csi; @@ -367,15 +367,15 @@ static int synps_edac_init_csrows(struct mem_ctl_info *mci) for (row = 0; row < mci->nr_csrows; row++) { csi = mci->csrows[row]; - size = synps_edac_get_memsize(); + size = edac_get_memsize(); for (j = 0; j < csi->nr_channels; j++) { dimm = csi->channels[j]->dimm; dimm->edac_mode = EDAC_FLAG_SECDED; - dimm->mtype = synps_edac_get_mtype(priv->baseaddr); + dimm->mtype = edac_get_mtype(priv->baseaddr); dimm->nr_pages = (size >> PAGE_SHIFT) / csi->nr_channels; dimm->grain = SYNPS_EDAC_ERR_GRAIN; - dimm->dtype = synps_edac_get_dtype(priv->baseaddr); + dimm->dtype = edac_get_dtype(priv->baseaddr); } } @@ -383,7 +383,7 @@ static int synps_edac_init_csrows(struct mem_ctl_info *mci) } /** - * synps_edac_mc_init - Initialize driver instance + * edac_mc_init - Initialize driver instance * @mci: Pointer to the edac memory controller instance * @pdev: Pointer to the platform_device struct * @@ -393,7 +393,7 @@ static int synps_edac_init_csrows(struct mem_ctl_info *mci) * * Return: Always zero. */ -static int synps_edac_mc_init(struct mem_ctl_info *mci, +static int edac_mc_init(struct mem_ctl_info *mci, struct platform_device *pdev) { int status; @@ -415,10 +415,10 @@ static int synps_edac_mc_init(struct mem_ctl_info *mci, mci->mod_name = SYNPS_EDAC_MOD_VER; edac_op_state = EDAC_OPSTATE_POLL; - mci->edac_check = synps_edac_check; + mci->edac_check = edac_check; mci->ctl_page_to_phys = NULL; - status = synps_edac_init_csrows(mci); + status = edac_init_csrows(mci); return status; } @@ -446,7 +446,7 @@ static int synps_edac_mc_probe(struct platform_device *pdev) if (IS_ERR(baseaddr)) return PTR_ERR(baseaddr); - if (!synps_edac_get_eccstate(baseaddr)) { + if (!edac_get_eccstate(baseaddr)) { edac_printk(KERN_INFO, EDAC_MC, "ECC not enabled\n"); return -ENXIO; } @@ -468,7 +468,7 @@ static int synps_edac_mc_probe(struct platform_device *pdev) priv = mci->pvt_info; priv->baseaddr = baseaddr; - rc = synps_edac_mc_init(mci, pdev); + rc = edac_mc_init(mci, pdev); if (rc) { edac_printk(KERN_ERR, EDAC_MC, "Failed to initialize instance\n"); From patchwork Thu Oct 4 15:35:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10626341 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 BB681175A for ; Thu, 4 Oct 2018 15:37:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8413292CE for ; Thu, 4 Oct 2018 15:37:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9BF8A292D1; Thu, 4 Oct 2018 15:37:54 +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 C33EE292CE for ; Thu, 4 Oct 2018 15:37:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=0E8Z9Ix9VCIDmDCjCw7MUuTCEypNhC3jAk/ORoST6Bc=; b=gMguovgUfo0l2q eDQIKkdAT6wJ/jWn8Nluv/aU3g9soZKz5/tQVLykRNgV/Pe7mCE7ApQOIwjw5KGEEvVaXJOXqot2u F4IgAfNurNQmyj9EC/V7hjsg+UB6eownLqS8sPTI8MSskKUkToKxtUPmpXDO9jslYD7vbUJcdVxVA lLWLYIIEySp/pBpW9PBb2d8XMi0DBTkmoOIlq5COm/2bM5FGNLdd8jJAP1Sv4rS0txUBP255gXEA0 wdbrw0IR8a5DN+wMfRXSPBRPhDX6orhubzKEKIl3BFqEwcqIxycWlESikGb+6AwRWBelw52VhevFr ZOVG2GoMRsVk6WWL/tFQ==; 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 1g85h5-0005yp-5c; Thu, 04 Oct 2018 15:37:39 +0000 Received: from mail-by2nam01on0613.outbound.protection.outlook.com ([2a01:111:f400:fe42::613] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85fl-0005L5-9N for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 15:36:41 +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=r2XAboMntgAWTpDnMWOcs7c7Dyg2C2joYKDZYwf4Tro=; b=dRW2eY3iqqq68Xm+F5FGP4wnvpHgeGG9ZTBoxQgMC5DQP/h08QG9kBd+ofD1wMxX/2EH9pqNx8BCDG1ViF4eUbOH2Zi2Vk/m3MqNJJsJ8ZzKZQa7Sgetcog+Mi7yhTxmM5J+vQpFCn6NCEk93a7z6kcvx94obxaFsqpWE6hZgZY= Received: from BL0PR02CA0073.namprd02.prod.outlook.com (2603:10b6:208:51::14) by DM6PR02MB4474.namprd02.prod.outlook.com (2603:10b6:5:20::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.24; Thu, 4 Oct 2018 15:36:02 +0000 Received: from SN1NAM02FT062.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::203) by BL0PR02CA0073.outlook.office365.com (2603:10b6:208:51::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1207.18 via Frontend Transport; Thu, 4 Oct 2018 15:36:02 +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 SN1NAM02FT062.mail.protection.outlook.com (10.152.72.208) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1185.13 via Frontend Transport; Thu, 4 Oct 2018 15:36:01 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:55004 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1g85fV-0002YK-0Q; Thu, 04 Oct 2018 08:36:01 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g85fP-00005B-T5; Thu, 04 Oct 2018 08:35:55 -0700 Received: from xsj-pvapsmtp01 (xsj-smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w94FZsog030940; Thu, 4 Oct 2018 08:35:54 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g85fN-0008WR-Ry; Thu, 04 Oct 2018 08:35:54 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 135CF121465; Thu, 4 Oct 2018 21:05:53 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v8 03/10] edac: synopsys: Modify the comments in the driver Date: Thu, 4 Oct 2018 21:05:21 +0530 Message-ID: <1538667328-9465-4-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> References: <1538667328-9465-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)(136003)(346002)(39860400002)(376002)(396003)(2980300002)(438002)(189003)(199004)(48376002)(2201001)(8676002)(47776003)(63266004)(103686004)(4326008)(7416002)(90966002)(6666003)(305945005)(186003)(356003)(6266002)(52956003)(26005)(316002)(50466002)(16586007)(14444005)(5660300001)(51416003)(50226002)(2616005)(81166006)(81156014)(446003)(126002)(8936002)(44832011)(42186006)(5024004)(72206003)(2906002)(476003)(426003)(106466001)(486006)(110136005)(54906003)(336012)(478600001)(11346002)(106002)(36756003)(76176011)(36386004)(107986001)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB4474; 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; SN1NAM02FT062; 1:Qhdl9OLCWcq3N2N4NdQzbMKLCuWObnRUqz0oBGPU11pt82MZJr/8rX5B4Bzo6EenJ1yeMfNpwJa1DKHDAjdNkuQ0eALT7H0zOa3PeCZfXfvajSoSViF+4QrEm0TnQPT7 MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1c08cd3-ea66-4b06-3ad5-08d62a0f170d X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:DM6PR02MB4474; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4474; 3:FoCyyC9QZhaG+1QxcSP4uSWZJMxKHoLGOIgNZHavezpX/ySAXanXW7ltKj2v2XXRX9pmmWAtANnuwb3AwYKZbhS99JtIVQppJazZLVMzNZmDm3tAcwtAR+jWS5AjM1dHUMJQahtMDPEoYO60ctR/a8euw16j1Qu7UklHTRfgMPstpZvpcIsFdeptH6GzsIGYIfVcEMzwDzfNag5bbIIo5um2TGlaHM7VuI8I1d/dml/swIW5oPsa9RFbQIvI0Tv8nNYgZKC0G9n+buxjYSRLCgoTzj4OsfPPW8JAV3w6AMZTTElssete3W+B38gskCOPaeSFzkklEtfmAiAzw7Pmil5nb1ODsfFflvzxuXxtpbQ=; 25:JK+ShvGussSSsHVNjfHH2R/VPFF+vwr7OBn1ubd9Gzy+IXVOV9qKyFjGoMawpDRlfvwT2RvNbcIXEb6MNzPwZZYIJF6qi7DylBJPZgkTK9IRBu4N0JtgDvf8m7VobzJiCvyyvS/9M9T6v9pNrUY+ur7HV/LZhuAdf4KygPefNbWpk+pnzFXRtZDFn1uoU4mmDyb/bdcsEaFxsuhXIa6+c1c8bizJz4rlbSJ4ogZkZAHSnAl6iSVS2xsnDfrxVZe2fnNEkvTspwJvH6jwLTGdRMCdhcmjVuya/pKbIpOYlWxGBQmeCdAouQ9b6+dipzkXA+q3jVpXkjDqkb7n8pm3fg== X-MS-TrafficTypeDiagnostic: DM6PR02MB4474: X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4474; 31:Lsgu4ebi46UODuxhpqE+8rV5Trxh6dSZJkAszrDqTuD4zPtVQy2TGzq0zUQzmwZFYglII8cVQvhy+ZtHJucsXAkygmF4A0X9ltTh1j7tQrb0e9R1lFCaohVUekYRvkdDTI3VRTezJinK7sY2WgOHUdm4MhxwUYF4JEh6DJqLDpPRRisWgycSdMqMuCj5mVf+NBObtSYEM5cStZsy8HEwRYM04b7vVX6bk80SnRvQXO4=; 20:AchAJxeXcMbE7NHFFSc/frDPcEjGneZpRBSSu7mruQUdegk1zFK3EUwKLd2YIWBOmg0yXCstG1YmT1tQVEthm6+nVVoTV6AnPN0J4CkcAt4NrHB3A0IccV2tjXk6wlOXASDz8NsL0UwLARMwUTM9A7k9QL5eTYKGKrgaQru0E8PgevUUokHfdjsXD+mld06LKbgB/5P03Mf65KVtWprguR3kdEZryqsshCRLDD4DqsnL9NvI5mmkWJ3y31g+0dwoPCKYJP6johQcxX95hjz3M9d5ejKIE1VqxI18+OB3MjTktPW3bTzJCyrvGoQjum+3VNdQlyMDInny/p03g6aetZ4wIQf2OVOvAN4w539SZt3GhzQ7u77csMayalvH4jjSH5ZZcpPJj88Gdo4VocvCnnqEVz/c2o0htCFBmgva/Tth+CHEUJx3lajzkwsDxW6dPUYlyczR9FTwih6CyNfurkuPy9huRw7qBDIMdOAxM5IZ0I5kxwMMiYNqoRSXJV85 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)(8121501046)(5005006)(10201501046)(3231355)(944501410)(52105095)(3002001)(93006095)(93004095)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699051); SRVR:DM6PR02MB4474; BCL:0; PCL:0; RULEID:; SRVR:DM6PR02MB4474; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4474; 4:q7MXTwZJXcndpifZ+b9JLTBRZYw0l0gF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K9mmvQo4JaVvo6a4mZChictzsDFmoT+htSlX5ofigpc8zqto0P65CYuZXAGWM9Q5DolJcIBtnDd2Zm/vYLwbbKaFJgLsaUmCwfVuM3XWLiHt3R4SZdw3oWARk8snl2AN1yD0eKvO3g3ssxkaW5xV92EQrQEFBio26G8I2ZCv3Ust+GnwNAyoR65a+wyxhcD9yPLYUG8eUXFwq+tAfk707DC44HdIkoFZx1n2RTBpXufSRIZvo0RQxXWsTRBALmwpOcBY8ozq4NRgU8PKFu0aXvmcr292NG6tWiWH7t0yrWy22IVmO1CUcJL7K4b6zQnTuz8rCYpq0nw/V2tBLrsOVkQiWvrvKPMfppQzpLOmWJqPq4Ef2392OfY2UEkR2lIbU0028tSdC3MavJv3AURJWruB3ZswgmTWjW8/WwYrXFghtzMvZLq+WMqa/MXtlDJJmDBCQitZ1ASCILnLLodMU93FJtaXbSUjugieBya550MIdbqg+hqamh7ESX49Roq00TZE/MjVBoxKFq/w/HUidC8OLpP9AEGylYjVggwgCTtAVff0S09y3vE2r8+HECdJaFamhsMsPBxq7ZWcVwxR7i60/BAgNS+M7uHcthV73yOsXqzGmO163QMFLPJJyGQ== X-Microsoft-Antispam-Message-Info: t5Y3QjS26TCYWt6coPb3eoLaLIwQh+xDZ5omKjLEx/tFnsU00aq412bbmf/E4t8BcwOaJc3b210iu7OCRKLa7gVQf+rH8o9+IYhCUW6gilyH76yNw1XHuzT2OLkalHk9QIzpNx8p7O2Vix/jQUl0SlRZiiT6qXDN3StUzAgS9NM0xPpCzSzr1oTxdMLOQB504tV3W6e5FFAXoVVNZO+r710pPDjoW+bI/yY6FkT2+dq380E7d5zPbwi6yQyVaWqg3lSVmw2kv4wNm8yb+nzf483b7M5KsqjmWwKphj21TNc1Hu7y5tCZojAxHHTY4hG67Gdo+X2QNV4oRC6nf18NChprPpgRSM4jubTQW4LADpI= X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4474; 6:kaTkrJdA3fXjwEZFQpusR2dQnj5PD9BxiaLAiFMH4kcVtNwv5q9JxtmW+Dy+gRYIHLlG/1ok13xuydP4Yu8d4EfoD8liD8n6Nl/4YKuOwddqJjT5o7YkzdpcqL5U5bWRD3J7pTkAfhe3tiqq5UnoCgIPowmT3iy6Lg9Wyx4R95pTIYyeYT2dmFc3dXyW05KcFpx8qbpbYWtLIGkP6NJeuyay3aUiGP8hrYBQ7rnQM8pBcG7eBrXYUbIARQuYwNkwRpjRVoqEgcAfxg5yjXwujcc26//2r2Th/YRtTDnITX24n7fRJTEfeWS0ZwJISARH+nnRJrDaFHShsczDlOWPh48Ey4keqVr3P0q9Rmg1lN+W5NwKgIOZx2y/NW8XdOvxdG8y3+yZmHqZ4nqflfLrV1m9JMWdfbGOsUXXpZebCHnh/5WtIFT1pgNAVurfoC6OVuDppyz5TaCo/jdQrtp1Kw==; 5:wRE2seXDYfdGyymYLvFiLIfi6IdFTm23kNTJ36i2M4zIcs1f9wiOjwy4HPzx/GjPw+a+OSmcZxJ+iiR6woM+Gk/+Y1tFnn2euZo7G/jYtF0ZH6luRJIOvwFlhrjJB6ZAG/nrF5PLp4PDs0sVBYBRC2y+qaszMbgTlVLjOvpEKFQ=; 7:kvAWqPRGWvvhSE91c/h+AtwAcQ1MQIxqPXfD2erYHpp5m7JBmSXf7CaFHxmG5VvyMlCKXZjmFyooKmev5gKG3KhrkMUMsCIYOQSyvENHeSC6JsC0SpIU2fzaAr6wnXAhekJ0ZmlBUy7Xkrzs4xXts/VCKg7diRvVMv4PHtUnthwul+OpuvHOlkoaTJ1avs+LUAnXa8YzGrv87R1ycufMweOAvI4CM/BQruuEqZou4WvCa3KBCgZFVD5rNJ7ABX/T SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2018 15:36:01.4122 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f1c08cd3-ea66-4b06-3ad5-08d62a0f170d 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: DM6PR02MB4474 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_083617_644832_E3D7EF38 X-CRM114-Status: GOOD ( 11.78 ) 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 There are some comments which can be updated for better readability of the driver. Update abbreviations to capital letters in the comments. Signed-off-by: Manish Narani Signed-off-by: Manish Narani Signed-off-by: Borislav Petkov --- drivers/edac/synopsys_edac.c | 98 ++++++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index abb5de8..7db5928 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -96,12 +96,12 @@ #define SCRUB_MODE_SECDED 0x4 /** - * struct ecc_error_info - ECC error log information - * @row: Row number - * @col: Column number - * @bank: Bank number - * @bitpos: Bit position - * @data: Data causing the error + * struct ecc_error_info - ECC error log information. + * @row: Row number. + * @col: Column number. + * @bank: Bank number. + * @bitpos: Bit position. + * @data: Data causing the error. */ struct ecc_error_info { u32 row; @@ -112,11 +112,11 @@ struct ecc_error_info { }; /** - * struct synps_ecc_status - ECC status information to report - * @ce_cnt: Correctable error count - * @ue_cnt: Uncorrectable error count - * @ceinfo: Correctable error log information - * @ueinfo: Uncorrectable error log information + * struct synps_ecc_status - ECC status information to report. + * @ce_cnt: Correctable error count. + * @ue_cnt: Uncorrectable error count. + * @ceinfo: Correctable error log information. + * @ueinfo: Uncorrectable error log information. */ struct synps_ecc_status { u32 ce_cnt; @@ -126,12 +126,12 @@ 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 - * @ce_cnt: Correctable Error count - * @ue_cnt: Uncorrectable Error count + * 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. + * @ce_cnt: Correctable Error count. + * @ue_cnt: Uncorrectable Error count. */ struct synps_edac_priv { void __iomem *baseaddr; @@ -142,13 +142,11 @@ struct synps_edac_priv { }; /** - * edac_geterror_info - Get the current ecc error info - * @base: Pointer to the base address of the ddr memory controller - * @p: Pointer to the synopsys ecc status structure + * edac_geterror_info - Get the current ECC error info. + * @base: Base address of the DDR memory controller. + * @p: Synopsys ECC status structure. * - * Determines there is any ecc error or not - * - * Return: one if there is no error otherwise returns zero + * Return: one if there is no error otherwise returns zero. */ static int edac_geterror_info(void __iomem *base, struct synps_ecc_status *p) @@ -196,11 +194,11 @@ static int edac_geterror_info(void __iomem *base, } /** - * edac_handle_error - Handle controller error types CE and UE - * @mci: Pointer to the edac memory controller instance - * @p: Pointer to the synopsys ecc status structure + * edac_handle_error - Handle controller error types CE and UE. + * @mci: EDAC memory controller instance. + * @p: Synopsys ECC status structure. * - * Handles the controller ECC correctable and un correctable error. + * Handles the controller ECC correctable and un-correctable error. */ static void edac_handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) @@ -232,10 +230,10 @@ static void edac_handle_error(struct mem_ctl_info *mci, } /** - * edac_check - Check controller for ECC errors - * @mci: Pointer to the edac memory controller instance + * edac_check - Check controller for ECC errors. + * @mci: EDAC memory controller instance. * - * Used to check and post ECC errors. Called by the polling thread + * Used to check and post ECC errors. Called by the polling thread. */ static void edac_check(struct mem_ctl_info *mci) { @@ -255,8 +253,8 @@ static void edac_check(struct mem_ctl_info *mci) } /** - * edac_get_dtype - Return the controller memory width - * @base: Pointer to the ddr memory controller base address + * edac_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. @@ -286,12 +284,12 @@ static enum dev_type edac_get_dtype(const void __iomem *base) } /** - * edac_get_eccstate - Return the controller ecc enable/disable status - * @base: Pointer to the ddr memory controller base address + * edac_get_eccstate - Return the controller ECC enable/disable status. + * @base: DDR memory controller base address. * - * Get the ECC enable/disable status for the controller + * Get the ECC enable/disable status for the controller. * - * Return: a ecc status boolean i.e true/false - enabled/disabled. + * Return: a ECC status boolean i.e true/false - enabled/disabled. */ static bool edac_get_eccstate(void __iomem *base) { @@ -311,9 +309,9 @@ static bool edac_get_eccstate(void __iomem *base) } /** - * edac_get_memsize - reads the size of the attached memory device + * edac_get_memsize - reads the size of the attached memory device. * - * Return: the memory size in bytes + * Return: the memory size in bytes. */ static u32 edac_get_memsize(void) { @@ -325,8 +323,8 @@ static u32 edac_get_memsize(void) } /** - * edac_get_mtype - Returns controller memory type - * @base: pointer to the synopsys ecc status structure + * edac_get_mtype - Returns controller memory type. + * @base: Synopsys ECC status structure. * * Get the EDAC memory type appropriate for the current controller * configuration. @@ -349,11 +347,11 @@ static enum mem_type edac_get_mtype(const void __iomem *base) } /** - * edac_init_csrows - Initialize the cs row data - * @mci: Pointer to the edac memory controller instance + * edac_init_csrows - Initialize the cs row data. + * @mci: EDAC memory controller instance. * * Initializes the chip select rows associated with the EDAC memory - * controller instance + * controller instance. * * Return: Unconditionally 0. */ @@ -383,9 +381,9 @@ static int edac_init_csrows(struct mem_ctl_info *mci) } /** - * edac_mc_init - Initialize driver instance - * @mci: Pointer to the edac memory controller instance - * @pdev: Pointer to the platform_device struct + * edac_mc_init - Initialize driver instance. + * @mci: EDAC memory controller instance. + * @pdev: platform_device struct. * * Performs initialization of the EDAC memory controller instance and * related driver-private data associated with the memory controller the @@ -424,8 +422,8 @@ static int edac_mc_init(struct mem_ctl_info *mci, } /** - * synps_edac_mc_probe - Check controller and bind driver - * @pdev: Pointer to the platform_device struct + * synps_edac_mc_probe - Check controller and bind driver. + * @pdev: platform_device struct. * * Probes a specific controller instance for binding with the driver. * @@ -496,8 +494,8 @@ static int synps_edac_mc_probe(struct platform_device *pdev) } /** - * synps_edac_mc_remove - Unbind driver from controller - * @pdev: Pointer to the platform_device struct + * synps_edac_mc_remove - Unbind driver from controller. + * @pdev: Platform_device struct. * * Return: Unconditionally 0 */ From patchwork Thu Oct 4 15:35:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10626355 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 61D9E1926 for ; Thu, 4 Oct 2018 15:40:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F8B02931E for ; Thu, 4 Oct 2018 15:40:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D141293AD; Thu, 4 Oct 2018 15:40:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2466F2931E for ; Thu, 4 Oct 2018 15:40:52 +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=knKzNlKauoruN7XD2Yl9cFCvIY2vxxcEoF9GFl8Ih4A=; b=lNpteSwXosg23e CImvp1TNo+/xia6+ZGw0xPpibupMYEhHxGbe4pOO77rfqfhxrlO4O7ABXcpp+NzjKeZFT1GdRj+ra 77ic8FU/DUoj12HFi+h29rqlTILhQ//PGdfZW5MDLmKzZ3mwdz+7B0CbAH313PKcdWLL3dMu4R7MT CKjSvI+witamsPKD+XQA5XmQJ3HM7ONSO3uR3F/JHlWYFLwnUjBEGEAO1ZzkXM+nx2HN405mqVEJ7 wp+mfkFswCIBUzH32L0LHugTi0Z7sfTLMSb4oJr+dlE3MygQdCIftqpQfQ8NxNMU8m3C5niUNToa1 x4zrr5lkQ6XgNyjrsYmw==; 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 1g85k0-0008MA-HQ; Thu, 04 Oct 2018 15:40:40 +0000 Received: from mail-co1nam03on0050.outbound.protection.outlook.com ([104.47.40.50] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85fv-0005P3-0l for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 15:36:59 +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=d+pGG3FMw9mEJZCm1XTU+8qGnxatwFkfFx+NIqS6uIU=; b=pcq6w764PHC79Ls93htubxk8ubU/LwUxkn2AJVtyi4/7uSSw4RVb8s7QIsS5lqzZrUHf6jEezB4NTJMLsqG4PJAiWQxfxor+B1plgcuxkmlfEW7M8vuRUtRpcEmMzwgybHv0+PXUiLw/tHIhFS7l0e41jIomvpnOtpXrAHCgoK0= Received: from BN6PR02CA0025.namprd02.prod.outlook.com (10.173.146.139) by BN7PR02MB5108.namprd02.prod.outlook.com (20.176.26.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Thu, 4 Oct 2018 15:36:12 +0000 Received: from BL2NAM02FT028.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::202) by BN6PR02CA0025.outlook.office365.com (2603:10b6:404:5f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1207.18 via Frontend Transport; Thu, 4 Oct 2018 15:36:12 +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 BL2NAM02FT028.mail.protection.outlook.com (10.152.77.165) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1207.19 via Frontend Transport; Thu, 4 Oct 2018 15:36:12 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:55803 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1g85ff-0002YR-Gq; Thu, 04 Oct 2018 08:36:11 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g85fa-0000EC-Bq; Thu, 04 Oct 2018 08:36:06 -0700 Received: from xsj-pvapsmtp01 (mailhost.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w94FZue3030950; Thu, 4 Oct 2018 08:35:57 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g85fQ-00005M-Kr; Thu, 04 Oct 2018 08:35:56 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id D1ECD121465; Thu, 4 Oct 2018 21:05:55 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v8 04/10] edac: synopsys: Make return type void for functions always returning 0 Date: Thu, 4 Oct 2018 21:05:22 +0530 Message-ID: <1538667328-9465-5-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> References: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(346002)(376002)(136003)(39860400002)(2980300002)(438002)(189003)(199004)(90966002)(81156014)(50466002)(106466001)(4326008)(5660300001)(16586007)(63266004)(110136005)(336012)(6266002)(316002)(103686004)(36386004)(6666003)(42186006)(76176011)(2906002)(126002)(47776003)(2616005)(51416003)(26005)(7416002)(476003)(305945005)(48376002)(486006)(44832011)(8936002)(72206003)(426003)(11346002)(356003)(186003)(8676002)(446003)(50226002)(478600001)(54906003)(2201001)(52956003)(36756003)(106002)(81166006)(107986001)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN7PR02MB5108; 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; BL2NAM02FT028; 1:n6+iRLvS70orhqzyUu9hGH7RcmUBjOu3m2f5QeqJJwGzmCyweQBOpFlQOP4AMhhOvb09KW7o4b6YNcYDc3w2XO8MsfjstZBBmRiNq9M63bXvX30U9b6kvNOPFx7Fxzlq MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 159b65e6-5b78-44e1-d0b9-08d62a0f1d3a X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:BN7PR02MB5108; X-Microsoft-Exchange-Diagnostics: 1; BN7PR02MB5108; 3:S/IY9a+3LK+8VJ0+KrrnnySUErfts/SEpkKwILx0R7yMOuOk9EdHs0M2SFuMB/WXWEVJySHWPK5emSY55expEEVDapzMhGaaeKmMYV+R5pKIXBbEOqyQfU4OVkL8D5Tw/6jgkI0Az3q+V7LYGtjcSDzFVLwTS1gvd+ZOTKknSYgxlsXyzOjhuv+Z62l246IlT8063epTcqLLkI07EljORZChW3bDwq7ZajRLFupLQ98rWGhKvFIe+w8AsivBo+Ht8IqtIOrtPDZ840020JLJbFwT/XGbouSPC7AU/spKsvVV89/TOcDrsvVCNSIHb9mPSBLAv4qJBpsTfEIp+l/tIVfEgiVU8doL/OpQ0JdKD1Q=; 25:e3jmAbVTzAcnfXntigTNsNTSPjaJ4KdKPP1Yv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jW/wFVRL3Dw95TpHy26efDcgccs1JrFhpBUzT1Wk 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)(10201501046)(3002001)(3231355)(944501410)(52105095)(93006095)(93004095)(6055026)(149066)(150057)(6041310)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(201708071742011)(7699051)(76991048); SRVR:BN7PR02MB5108; BCL:0; PCL:0; RULEID:; SRVR:BN7PR02MB5108; X-Microsoft-Exchange-Diagnostics: 1; BN7PR02MB5108; 4:8GGGOqpVGtgb+0zQVO8X+n7fW3RL7IHQMSrWLKJj26bu12fC2PxUQyjeH/4ARo8jooFBAhT/GZTV5p3uHmEMrsjfK6YbsyvwlEkYT8UNoG7fV/2lIrKGf4FRHiIsZe6GSgwVMiASA/ZnDTMr08kxvwe8B2/cHhAlBlfEjmYvbgeusRHmtBHlbWFwKzfnL3I/KSfuYN1i8IWfrNEns0yjZlvR/yJ1pEx9QyZ8IfBUkuMkXjvvQei6wM9noZzXiP4bAnhvD7mvztDiWduDIbOGeg8w8tA2HRyScy4haAD9BledE16NYzONyrjQA8l5ROnm X-Forefront-PRVS: 0815F8251E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN7PR02MB5108; 23:QPmaOysEb6br4Rn88bSEjnl4EPFCHmeAQrijEf851?= Ofkm9hZUwjvnMQmjbYQMw9odwoeEEym1Pa2gaTzJb4XW9VIWTRghyrxI87b1Fzn5Qirbmgoco3MVHv/G/qqNI4zA2SMpZb6D9t5IyheZbA6GysavY+Zd2mrcaorLDgZf2Z6OfaQTanDFYIUHuX/JwGZziw7IS3ndk46rfwGt6ZBwpawVQyzxkPpmCHufscectPcrH8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+1/WlOHbu+OzJCVlgHdNtLT/7Avo4Edo/G9yJcqfDm2lR+xJNDaDN7mEVA09o2ZteffvNSKHy/mHl1vf+UAhtErkNS9Ac3gzbeqc6DRI4an6whk+k8dEpnzsVxTBSf2KTtE9hg7i5F3bSwLv4jXWtD0WBT7KhsV+UZsrUztQYoYbeK4s8sNez3di3T32fxMGvW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2018 15:36:12.0898 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 159b65e6-5b78-44e1-d0b9-08d62a0f1d3a 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: BN7PR02MB5108 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_083627_110122_903578AD X-CRM114-Status: GOOD ( 11.64 ) 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 current driver has functions which are always returning 0. Those functions can be modified to void. Signed-off-by: Manish Narani --- drivers/edac/synopsys_edac.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 7db5928..675155f 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -352,10 +352,8 @@ static enum mem_type edac_get_mtype(const void __iomem *base) * * Initializes the chip select rows associated with the EDAC memory * controller instance. - * - * Return: Unconditionally 0. */ -static int edac_init_csrows(struct mem_ctl_info *mci) +static void edac_init_csrows(struct mem_ctl_info *mci) { struct synps_edac_priv *priv = mci->pvt_info; struct csrow_info *csi; @@ -376,8 +374,6 @@ static int edac_init_csrows(struct mem_ctl_info *mci) dimm->dtype = edac_get_dtype(priv->baseaddr); } } - - return 0; } /** @@ -388,13 +384,10 @@ static int edac_init_csrows(struct mem_ctl_info *mci) * Performs initialization of the EDAC memory controller instance and * related driver-private data associated with the memory controller the * instance is bound to. - * - * Return: Always zero. */ -static int edac_mc_init(struct mem_ctl_info *mci, +static void edac_mc_init(struct mem_ctl_info *mci, struct platform_device *pdev) { - int status; struct synps_edac_priv *priv; mci->pdev = &pdev->dev; @@ -416,9 +409,7 @@ static int edac_mc_init(struct mem_ctl_info *mci, mci->edac_check = edac_check; mci->ctl_page_to_phys = NULL; - status = edac_init_csrows(mci); - - return status; + edac_init_csrows(mci); } /** @@ -466,12 +457,7 @@ static int synps_edac_mc_probe(struct platform_device *pdev) priv = mci->pvt_info; priv->baseaddr = baseaddr; - rc = edac_mc_init(mci, pdev); - if (rc) { - edac_printk(KERN_ERR, EDAC_MC, - "Failed to initialize instance\n"); - goto free_edac_mc; - } + edac_mc_init(mci, pdev); rc = edac_mc_add_mc(mci); if (rc) { From patchwork Thu Oct 4 15:35:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10626359 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 3B220174A for ; Thu, 4 Oct 2018 15:42:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2753A29174 for ; Thu, 4 Oct 2018 15:42:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A56C291E8; Thu, 4 Oct 2018 15:42:33 +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 B705329174 for ; Thu, 4 Oct 2018 15:42:31 +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=Rfg/2aLb3Q28hp3EgQolWuPm/vdu4T7WsaCiYKDL05M=; b=ZPAK6J/OrxRiE6 kCyvs6BmnU/W/rf0fWuZSgQMAo+29P3t5iybhxe2d/+GKHxkT3gcSeKxHI7SsauwmxRK2cLZ75URM 2dK1PRlrOu0dYYrl8Pb/GA34vCE0BC/wXchwf5Zusn9u+abkrecyYXL8GlDN6bzIOvjabUFeuaOy3 1siPOuYbhNBXJzPw83FoKRt6mGpcQ4cA5lQLMeAaecaGMqaWrrbsHiMtUkZtWaCZqj1gSblDEE5oA Xts4gpMVRLzQgqO4QbybBooPEWXwbZH6cbGmJF6MBlOWELtWSBuXcRT2FWWS9vtUAf5U+YSkGEIQh FL4lNszKXKRHKYr48Vkg==; 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 1g85lZ-0000X0-Dz; Thu, 04 Oct 2018 15:42:17 +0000 Received: from mail-sn1nam01on0086.outbound.protection.outlook.com ([104.47.32.86] helo=NAM01-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85fu-0005P1-Uj for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 15:37:09 +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=QIt0qXOzGyOVVNwOcKFgS1oy2fmuA/hEdBN8+15A41s=; b=zFAFFxOWZ7EH+ElzBxYuyqOZUImjvAGY7N9mmDDyZdB0MELvhacP5fuj5NWPERh8AphManIkmpn99QfOeWPxLvwrsiyjbcxPIjTwonaW3ZHlwM1EIpezEnhNUfXINedCKIc/eIbeVecvaZHgLhr+rNPnQlB4961T90/osr88qCk= Received: from BL0PR02CA0015.namprd02.prod.outlook.com (2603:10b6:207:3c::28) by BYAPR02MB5109.namprd02.prod.outlook.com (2603:10b6:a03:70::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.20; Thu, 4 Oct 2018 15:36:13 +0000 Received: from SN1NAM02FT057.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::207) by BL0PR02CA0015.outlook.office365.com (2603:10b6:207:3c::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1101.15 via Frontend Transport; Thu, 4 Oct 2018 15:36:12 +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 SN1NAM02FT057.mail.protection.outlook.com (10.152.73.105) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1185.13 via Frontend Transport; Thu, 4 Oct 2018 15:36:11 +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 1g85ff-0001Oa-8g; Thu, 04 Oct 2018 08:36:11 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g85fa-0000EC-3k; Thu, 04 Oct 2018 08:36:06 -0700 Received: from xsj-pvapsmtp01 (xsj-pvapsmtp01.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w94FZwnb023816; Thu, 4 Oct 2018 08:35:58 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g85fR-00005X-Px; Thu, 04 Oct 2018 08:35:58 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 02D8B121465; Thu, 4 Oct 2018 21:05:57 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v8 05/10] edac: synps: Add platform specific structures for ddrc controller Date: Thu, 4 Oct 2018 21:05:23 +0530 Message-ID: <1538667328-9465-6-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> References: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(136003)(346002)(376002)(39860400002)(2980300002)(438002)(199004)(189003)(305945005)(356003)(36386004)(26005)(36756003)(6666003)(478600001)(63266004)(186003)(106466001)(5660300001)(76176011)(72206003)(2906002)(8936002)(50226002)(486006)(7416002)(110136005)(126002)(2201001)(336012)(106002)(103686004)(51416003)(90966002)(446003)(16586007)(6266002)(54906003)(50466002)(4326008)(81166006)(81156014)(476003)(426003)(11346002)(8676002)(42186006)(48376002)(2616005)(316002)(14444005)(47776003)(575784001)(44832011)(52956003)(107986001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR02MB5109; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT057; 1:gBwIvTLGillcsCZaO1B7JLEIw0XKm1NwxP9+rX7kCc8DiXZetLkilefZgCkhFnZsLkmVK7sYB9HPhEa739UwaYVySdSXwAtHl5RTnDcF1wZ4iODFsWTyUBBt7Bwb0LxR MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7f501627-6c78-43dc-46de-08d62a0f1d2c X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:BYAPR02MB5109; X-Microsoft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g226SifzBDF2UHFmC7qRZqAqhgjKtYJqwMXVhEsZIr2J7KWwxkPMG7TR9jDyQErhmKKDfON9Svewivym3ujm0pKL/CsVVh9DRGBj0iueHLsW6+o3qWlZMNjT2mtD0gbO0FY/l1EGRvg2twjqgF7cl6seSIPKtBihIlBBpp7vwvc18G2X/ibHgi66OnXJVb7iYYI9xZWiFxuUAgLAdBRNdvli0WdBvYomKOlZANEigQHJIdaqf3pXMfTfj/Mz+sIDxVILLe+qfV+k1YjF5mobUTG1EJonfE4l2JRB17ecpbHG885LbMd4Whppg+hYQkIUWoVIJy+QjpHsRxg1Z4rSCaN8VdxQdyn11C4HWmkY43jNGbZ1dqhJ5A18Zxy9QnHdxluZOMG1pA1XE+5kVT9zPvKqSl4Dfr8DzdYjptdse3MTJmQ4MhFnhm/xyuMKdSu2p+cgmdlao01rnSjAvn1+fg2qly3ECDuzg9VWb4bV X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(163750095850); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93004095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051); SRVR:BYAPR02MB5109; BCL:0; PCL:0; RULEID:; SRVR:BYAPR02MB5109; X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB5109; 4:mt57AoxiWGyk4YrynKwL//jbtwSjb9B8f06yZF+9RAIqmcuharIJ5ZWoNHi58w+T2S7c0AQKT6t+o9MS91Q+ztbhsB7siOBe92FQ7KgBYdJ+QatO6Rk9KBhiP0/EbgrO3zAgQnmeu7YOgb3pmKi7Qk1aRNmTEpZjusjBYn8eGuX7x2QsQVuKLlXABeLMixhVnHDMVSfUoiegPyskqM8eZMpVITdoAthFS3WgM5ugHUSNe3MlMGSdI+PxiuS1jwWwtFCUfBXfla0WIhDwxipUhEoCTq9QkAWRBQLEMdDagolCQN1V/UseNM7VwhXzmBUsv5UcfiIBbRMogXoWff75r2OsQQxoAPRd3HaIX5mnYyQ= X-Forefront-PRVS: 0815F8251E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR02MB5109; 23:T5870WdPL26ULFzs5H2AYY3xKysOnB6PrB8OktGgC?= zlKHn/xitvxTIellduwCs7FKiePkUWtnxFRyMPNlmw49jUasf4IFlZJRBPTYwTvIzCIgxhL3PzC2yOws5a91zhx2hmavxpr3rfTcGfue/YFVQ1hfMhuaBjHUbepIUeW6UeosNoaQnQLKsK5+ESn+r2nd9wdl+4V2+rk3bLXaMINipuhiPS/pfnM077GoVQ3XwLsPrrzafKyxWqMJ0Vm/hU0huKNMit/nzbSAZWhaQWRW4nEpRFhedi6wjCyK7MqOs5TTAPiA+wROPJNK2MuJaPm1ye9DEQbiB5cbivW3x1LlodXEwVvllvlDfVJ3NYH0WqjfnNROpqjhI+//EiOVSHAz9Q6v0cSoeci/Yph1+9rDiGhkqo2orkmPO4GbG64k/J3lhCOdtKikRT98SimdvBzNygMjudNTzNGOvlASOeB7ijAY0v4O7rTBHbZhj4rxykrKKY66wruDu4rsM/en1HitHaABtzNN50447AlkIsEDi5m45qZ1grE7Km7sKEzrOuY/Iy4dFpOmobTILf8epCaLVN7P/eT4AgCJMZ30HH9zf++Lemi6AvQSg2noNkzetyiYg0LQoEW15NrlIMHD3Z2RZ0HBiVeXoCyZcgS3Vok9kfygMHujLWfKpBHYpFJMn0pJamLj7RYV12ldNit9ZxJG2135B9dn/ZlejmLbdoOGcFVfYveH6j113hsJ9jlDdu30wSmz+oajJYIz+6jivMqzp9q9/LtiYcdJ28hs1KybB4KcbLkFQXBy1h+5K4iT19vg4JI8hP7xsA1c1MK3cdHXfD/MgO18comfm3Q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K7kUC0j/Ai9i1qvuhuwvZk8n6FLmlRrQVssghwNm/4i41Vg2H3C1Vuz4csnjmJD7HJ/vAnT8ULNCd/v0xZNrfq3fzy79SvIP/k2M451JWxawuZzehPm7JPubpXvtkYYNvrmsEh2PdxS89zDqjw0EKc8cUyuorpt/M3XTqu8wWqEzbM0Y8t5NOiYTXIdZ/2hq6eZXzrP66ybqjR7GAZbjPUsXdj9RXpZkCGxalsOY4fQ==; 5:zkCEp0k4G+ny6/dwxkPK9uoVdYSX5BUq8q47OHj6aky2rtSC5YhJlFOloYgdYfIcJYZ884qOF3PlpQ/xpk9V00lriMbgzTL7WMI0STeEWObZK/h647wxDy/g5cz8msSQporuzSnRCjRSAi5bfHrbt4ELN7Qp27XAqQUVncbY4E4=; 7:r2uD30ERv9lCtR6Mv/KkGofzjJSYH9RrGgfFBQhnKoA+2elQAK70vYE7GgMSIC4Nw1bMiNQYvzg/IE46IylGUMiDB1CYq3c/2KAHi8V42BLrR9vOnlNGqiN1mTbsKD68RNhvfCfTuYqJYZNmWGPw5Az3p669xyI0bngp6wsiQbXZdoGT4DAIPZsAPkZvr58BawCMTgyxfmlnJqOd08q/GW/6A2FKZPMleOynj2zbWc4sC44OCQ/UuCajNocbLyt/ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2018 15:36:11.6664 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7f501627-6c78-43dc-46de-08d62a0f1d2c 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: BYAPR02MB5109 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_083627_097724_1F58C4F1 X-CRM114-Status: GOOD ( 13.23 ) 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 platform specific structures, so that we can add different IP support later using quirks. Signed-off-by: Manish Narani --- drivers/edac/synopsys_edac.c | 91 +++++++++++++++++++++++++++++++------------- 1 file changed, 65 insertions(+), 26 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 675155f..f0f4704 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include "edac_module.h" @@ -130,6 +132,7 @@ struct synps_ecc_status { * @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. */ @@ -137,21 +140,41 @@ struct synps_edac_priv { void __iomem *baseaddr; char message[SYNPS_EDAC_MSG_SIZE]; struct synps_ecc_status stat; + const struct synps_platform_data *p_data; u32 ce_cnt; u32 ue_cnt; }; /** - * edac_geterror_info - Get the current ECC error info. - * @base: Base address of the DDR memory controller. - * @p: Synopsys ECC status structure. + * struct synps_platform_data - synps platform data structure. + * @geterror_info: EDAC error info. + * @get_mtype: Get mtype. + * @get_dtype: Get dtype. + * @get_eccstate: Get ECC state. + * @quirks: To differentiate IPs. + */ +struct synps_platform_data { + int (*geterror_info)(struct synps_edac_priv *priv); + enum mem_type (*get_mtype)(const void __iomem *base); + enum dev_type (*get_dtype)(const void __iomem *base); + bool (*get_eccstate)(void __iomem *base); + int quirks; +}; + +/** + * zynq_geterror_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 edac_geterror_info(void __iomem *base, - struct synps_ecc_status *p) +static int zynq_geterror_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 + STAT_OFST); if (!regval) @@ -230,17 +253,18 @@ static void edac_handle_error(struct mem_ctl_info *mci, } /** - * edac_check - Check controller for ECC errors. + * edac_error_check - Check controller for ECC errors. * @mci: EDAC memory controller instance. * * Used to check and post ECC errors. Called by the polling thread. */ -static void edac_check(struct mem_ctl_info *mci) +static void edac_error_check(struct mem_ctl_info *mci) { struct synps_edac_priv *priv = mci->pvt_info; + const struct synps_platform_data *p_data = priv->p_data; int status; - status = edac_geterror_info(priv->baseaddr, &priv->stat); + status = p_data->geterror_info(priv); if (status) return; @@ -253,7 +277,7 @@ static void edac_check(struct mem_ctl_info *mci) } /** - * edac_get_dtype - Return the controller memory width. + * zynq_get_dtype - Return the controller memory width. * @base: DDR memory controller base address. * * Get the EDAC device type width appropriate for the current controller @@ -261,7 +285,7 @@ static void edac_check(struct mem_ctl_info *mci) * * Return: a device type width enumeration. */ -static enum dev_type edac_get_dtype(const void __iomem *base) +static enum dev_type zynq_get_dtype(const void __iomem *base) { enum dev_type dt; u32 width; @@ -284,20 +308,20 @@ static enum dev_type edac_get_dtype(const void __iomem *base) } /** - * edac_get_eccstate - Return the controller ECC enable/disable status. + * zynq_get_eccstate - 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 edac_get_eccstate(void __iomem *base) +static bool zynq_get_eccstate(void __iomem *base) { bool state = false; enum dev_type dt; u32 ecctype; - dt = edac_get_dtype(base); + dt = zynq_get_dtype(base); if (dt == DEV_UNKNOWN) return state; @@ -323,7 +347,7 @@ static u32 edac_get_memsize(void) } /** - * edac_get_mtype - Returns controller memory type. + * zynq_get_mtype - Returns controller memory type. * @base: Synopsys ECC status structure. * * Get the EDAC memory type appropriate for the current controller @@ -331,7 +355,7 @@ static u32 edac_get_memsize(void) * * Return: a memory type enumeration. */ -static enum mem_type edac_get_mtype(const void __iomem *base) +static enum mem_type zynq_get_mtype(const void __iomem *base) { enum mem_type mt; u32 memtype; @@ -356,11 +380,14 @@ static enum mem_type edac_get_mtype(const void __iomem *base) static void edac_init_csrows(struct mem_ctl_info *mci) { struct synps_edac_priv *priv = mci->pvt_info; + const struct synps_platform_data *p_data; struct csrow_info *csi; struct dimm_info *dimm; u32 size, row; int j; + p_data = priv->p_data; + for (row = 0; row < mci->nr_csrows; row++) { csi = mci->csrows[row]; size = edac_get_memsize(); @@ -368,10 +395,10 @@ static void edac_init_csrows(struct mem_ctl_info *mci) for (j = 0; j < csi->nr_channels; j++) { dimm = csi->channels[j]->dimm; dimm->edac_mode = EDAC_FLAG_SECDED; - dimm->mtype = edac_get_mtype(priv->baseaddr); + dimm->mtype = p_data->get_mtype(priv->baseaddr); dimm->nr_pages = (size >> PAGE_SHIFT) / csi->nr_channels; dimm->grain = SYNPS_EDAC_ERR_GRAIN; - dimm->dtype = edac_get_dtype(priv->baseaddr); + dimm->dtype = p_data->get_dtype(priv->baseaddr); } } } @@ -406,12 +433,27 @@ static void edac_mc_init(struct mem_ctl_info *mci, mci->mod_name = SYNPS_EDAC_MOD_VER; edac_op_state = EDAC_OPSTATE_POLL; - mci->edac_check = edac_check; + mci->edac_check = edac_error_check; mci->ctl_page_to_phys = NULL; edac_init_csrows(mci); } +static const struct synps_platform_data zynq_edac_def = { + .geterror_info = zynq_geterror_info, + .get_mtype = zynq_get_mtype, + .get_dtype = zynq_get_dtype, + .get_eccstate = zynq_get_eccstate, + .quirks = 0, +}; + +static const struct of_device_id synps_edac_match[] = { + { .compatible = "xlnx,zynq-ddrc-a05", .data = (void *)&zynq_edac_def }, + { /* end of table */ } +}; + +MODULE_DEVICE_TABLE(of, synps_edac_match); + /** * synps_edac_mc_probe - Check controller and bind driver. * @pdev: platform_device struct. @@ -423,6 +465,7 @@ static void edac_mc_init(struct mem_ctl_info *mci, */ static int synps_edac_mc_probe(struct platform_device *pdev) { + const struct synps_platform_data *p_data; struct edac_mc_layer layers[2]; struct synps_edac_priv *priv; struct mem_ctl_info *mci; @@ -435,7 +478,8 @@ static int synps_edac_mc_probe(struct platform_device *pdev) if (IS_ERR(baseaddr)) return PTR_ERR(baseaddr); - if (!edac_get_eccstate(baseaddr)) { + p_data = of_device_get_match_data(&pdev->dev); + if (!p_data->get_eccstate(baseaddr)) { edac_printk(KERN_INFO, EDAC_MC, "ECC not enabled\n"); return -ENXIO; } @@ -457,6 +501,8 @@ static int synps_edac_mc_probe(struct platform_device *pdev) priv = mci->pvt_info; priv->baseaddr = baseaddr; + priv->p_data = p_data; + edac_mc_init(mci, pdev); rc = edac_mc_add_mc(mci); @@ -495,13 +541,6 @@ static int synps_edac_mc_remove(struct platform_device *pdev) return 0; } -static const struct of_device_id synps_edac_match[] = { - { .compatible = "xlnx,zynq-ddrc-a05", }, - { /* end of table */ } -}; - -MODULE_DEVICE_TABLE(of, synps_edac_match); - static struct platform_driver synps_edac_mc_driver = { .driver = { .name = "synopsys-edac", From patchwork Thu Oct 4 15:35:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10626347 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 7047B14BD for ; Thu, 4 Oct 2018 15:40:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DDE6292D1 for ; Thu, 4 Oct 2018 15:40:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C0CE292DE; Thu, 4 Oct 2018 15:40:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 76A16291C9 for ; Thu, 4 Oct 2018 15:40:04 +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=WOIguvWTIjq6N3 fCT5AIHvPNg8RplRm2g6TMhuGm8+TKJI9SVP2csr1Bo2CjTJRY/D+FvNZJLaMp1xEQX7GEF0AZ2uE KqmKzeSpveSbQT4cyCdO0WXVLZoCSP4/3VlzengtTc55p6YAIeScGaiVT+w/CNfDhm8C1Yh0djY12 Nir8IaQKoZQsJzpsPKo9agMX38Jqwh1wqbHdVEA0fedVsurlFGnvp4MtveNIL6WW87OIy8g9VrfUe VCNB+CcphzxkDpoPdJGAuCLdyiYvmP2wTuYYmfaTUJYVh/hsX6ZkcWmewAmDGaYtdGJgPdZxVHet7 UqAOUL20g5RCwqtTsmng==; 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 1g85jA-0006pn-K3; Thu, 04 Oct 2018 15:39:48 +0000 Received: from mail-cys01nam02on062c.outbound.protection.outlook.com ([2a01:111:f400:fe45::62c] helo=NAM02-CY1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85fv-0005P6-Ip for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 15:36:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector1-xilinx-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LPlgHWwxxGeMmES3iC9R2B0x0FGDcuWpvXvIdyeQU0I=; b=ssLZbMy5s4yEGLosZ2yakv8tHwZTIUlHwDessYqvuWZxDWcgsdM20LFx80bzVXGsbAZhE0yIRpQNcc7i63SWqXHImcesO5xLxIfx4RJi4H3gK2kQFT3HNVAuM6+Y+To8bW5l2XWg97Zt8ZT1uQvZhLpRK1ioQt3lTlqn0qi2cKE= Received: from BN6PR02CA0040.namprd02.prod.outlook.com (2603:10b6:404:5f::26) by SN6PR02MB4765.namprd02.prod.outlook.com (2603:10b6:805:90::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.20; Thu, 4 Oct 2018 15:36:12 +0000 Received: from SN1NAM02FT029.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e44::209) by BN6PR02CA0040.outlook.office365.com (2603:10b6:404:5f::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1207.21 via Frontend Transport; Thu, 4 Oct 2018 15:36:12 +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 SN1NAM02FT029.mail.protection.outlook.com (10.152.72.110) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1185.13 via Frontend Transport; Thu, 4 Oct 2018 15:36:11 +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 1g85ff-0001OZ-5u; Thu, 04 Oct 2018 08:36:11 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g85fa-0000EC-2A; Thu, 04 Oct 2018 08:36:06 -0700 Received: from xsj-pvapsmtp01 (smtp3.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w94Fa0rQ030960; Thu, 4 Oct 2018 08:36:00 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g85fU-00005s-CJ; Thu, 04 Oct 2018 08:36:00 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 921DF121465; Thu, 4 Oct 2018 21:05:59 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v8 06/10] dt: bindings: Document ZynqMP DDRC in Synopsys documentation Date: Thu, 4 Oct 2018 21:05:24 +0530 Message-ID: <1538667328-9465-7-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> References: <1538667328-9465-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)(346002)(376002)(396003)(39860400002)(2980300002)(438002)(189003)(199004)(36756003)(16586007)(90966002)(446003)(5660300001)(50226002)(54906003)(110136005)(478600001)(63266004)(2906002)(8676002)(426003)(106002)(81156014)(81166006)(106466001)(336012)(26005)(2201001)(52956003)(48376002)(8936002)(72206003)(186003)(50466002)(14444005)(36386004)(2616005)(7416002)(6266002)(305945005)(44832011)(4326008)(103686004)(356003)(51416003)(486006)(76176011)(316002)(47776003)(126002)(42186006)(6666003)(11346002)(476003)(107986001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR02MB4765; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM02FT029; 1:HLIeRtopSgrdCgQejnV0+ocKKH+bLC0uNvBFK26jRtla19zDb7QBDYqPjZYOATlX1jHsERxKgYGmFWhxqbL6Zzaq2PXYuggq6f3/FXIatD9VzfZo3C8pMO2xAEVqxhvG MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1c5880f-a88c-443c-042b-08d62a0f1d15 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:SN6PR02MB4765; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4765; 3:NVBPF9v0TiUMsAC5ieFkAl5uBEQSl2S+aaXEE90r+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z67OPQzi4Vd8FOMRB+9XdPcRIjHEeGBgsuF+Q+OhSAAcmPlQxeN0IE+dp9/jKildZvfhEtbiXLviO+WFo1XiG5+ZF9dLy7T3t7v7VZTX5Bn+aSSh3NII2VTqqJd5HALlE3Gg3kioDCab8X9MJAIJvfrLQOXJ5CW4F9g4s3KdZw/qmzhY1qGzT1pRVVn29Vuh0FbtXf+efgWpSNTGFuwv2m+DcsP6g11eHPMNZVYwQwm5bZY8P8sD4AOAGQ150x7NftbVK71PTecnGL96Og948Ps64V1H3NxabZ4EQoCHC4uprwUFleBv1eSC6SKKs5dL+XVWRMuI3wALSy62YcR85YIWNZloXN6c4t+Kx84CpYc9+DCZ3D+vezsxWQYEug2N48zAvVFBGv8UmIbzr/3lQQkkOuc7 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)(10201501046)(3002001)(3231355)(944501410)(52105095)(93006095)(93004095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051); SRVR:SN6PR02MB4765; BCL:0; PCL:0; RULEID:; SRVR:SN6PR02MB4765; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4765; 4:g8KOQJwTZK4f7bpmxqMRlpARA8UUekcZvJ9ZZ7XGNQ2q9D16ipzPW8PiHVglqAgbTYHgils6c9HpOwKSR4vjJsDmdOzgv0Ssd3D91K+hnI/SSOa8DBXEOmfOXioIoYrGjQRJQJAIizECI+owlwU1XRXlkb+Hs+SeK+DUaAk1vuJHDjsjDJdlzP4hBm3Hr9gbVZYClmOUhB7RydAMZR/sMoEtrof/u9JHRobKMcoCIwDLtnmkPTC6AIx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tXfje7Ofp9Zdfr3T0E5+DqbG111kjkBFA8u+5h87Vep6Sq+qfcB+vuKOYLMqrux7RerVd9Gs1uJ76y8r+HhT69paSq+9j5g4el7eEYoWyIrH0048uIyjGWlmjjJkX1ZF1XABfiM1cX7m8E2mV4YtUGBGtI2CkkknhPjGMvp6y68g39Ssw+yFU6+WENxZ/29Rg==; 5:Ke6yuuw8NSTzmBYIM/WFmklY65o7ua2jeglX35jqwdvcc71EkU116dQlu2H/7XDHAPBFIoctuLQxwn0ZdP4lScEXcqUN9C55ZSTPvZfhu5pcs4tb55vzBuwAbzg3704ko/liqi9/Wd9bW9Y6pvRzkRGeqAJ56atNiUDaavLvItU=; 7:XifYbkVULzU7/4RFKVrFeq36YZyXbLBO8MlCIDkVprfte78JcHPg8/AmHv8bo+COvqJcw41xWzr9vyFe3G/m/gIOf+0ZlJ0lsAJMniNpSpOzhjNkkb8L66jp8znlSrDWwsC0HEosU1/qd3g5huba9IQVDD1T4w9qdjmPXNo8QfgmWt45CjqCvMiRqlffkrSMTHyRs1u+rFehcC7oHXjkpPDsRksoh7ziK4wVrzeb0uRFhhGn7ZgsMOASOA1kcOP+ SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2018 15:36:11.5765 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f1c5880f-a88c-443c-042b-08d62a0f1d15 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: SN6PR02MB4765 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_083627_817743_448DB5CF X-CRM114-Status: UNSURE ( 9.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add information of ZynqMP DDRC which reports the single bit errors that are corrected and the double bit errors that are detected. Signed-off-by: Manish Narani Reviewed-by: Rob Herring --- .../bindings/memory-controllers/synopsys.txt | 27 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/memory-controllers/synopsys.txt b/Documentation/devicetree/bindings/memory-controllers/synopsys.txt index a43d26d..9d32762 100644 --- a/Documentation/devicetree/bindings/memory-controllers/synopsys.txt +++ b/Documentation/devicetree/bindings/memory-controllers/synopsys.txt @@ -1,15 +1,32 @@ Binding for Synopsys IntelliDDR Multi Protocol Memory Controller -This controller has an optional ECC support in half-bus width (16-bit) -configuration. The ECC controller corrects one bit error and detects -two bit errors. +The ZynqMP DDR ECC controller has an optional ECC support in 64-bit and 32-bit +bus width configurations. + +The Zynq DDR ECC controller has an optional ECC support in half-bus width +(16-bit) configuration. + +These both ECC controllers correct single bit ECC errors and detect double bit +ECC errors. Required properties: - - compatible: Should be 'xlnx,zynq-ddrc-a05' - - reg: Base address and size of the controllers memory area + - compatible: One of: + - 'xlnx,zynq-ddrc-a05' : Zynq DDR ECC controller + - 'xlnx,zynqmp-ddrc-2.40a' : ZynqMP DDR ECC controller + - reg: Should contain DDR controller registers location and length. + +Required properties for "xlnx,zynqmp-ddrc-2.40a": + - interrupts: Property with a value describing the interrupt number. Example: memory-controller@f8006000 { compatible = "xlnx,zynq-ddrc-a05"; reg = <0xf8006000 0x1000>; }; + + mc: memory-controller@fd070000 { + compatible = "xlnx,zynqmp-ddrc-2.40a"; + reg = <0x0 0xfd070000 0x0 0x30000>; + interrupt-parent = <&gic>; + interrupts = <0 112 4>; + }; From patchwork Thu Oct 4 15:35:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10626357 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 62C7D1731 for ; Thu, 4 Oct 2018 15:41:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 501EE29174 for ; Thu, 4 Oct 2018 15:41:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43507291FA; Thu, 4 Oct 2018 15:41: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 7C77829174 for ; Thu, 4 Oct 2018 15:41:40 +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=SDCnCpM99fYmznU5XZadkQyGK41vYF/ydUZZ9va4rqU=; b=YWh28x9MKvMvp5 0/CYGCErrLDxu4uLbTh0iWFqhx0Y7C2UAgoiy/l0wESHJzdQTAtcne6YfaHhyL6LyqblZuMqXxVlR uwR935t6qQSMAIo2bejzvHBozQYHdPcBniMybrroBdBk+Tj2/IPYpxR8tY03IKXd4g0g1/Ip+ucti uYPvxLi/l3BcZBpMB6HdyRemppnXf6mG3FqHCRsM1G5UsHTxCyotiY5Ne7XYk3lcDw515OINpVJ1A pAv4AnWlv6MuFvk/L3tITnNiBxlYKBCJiS7mgkVb2m7MHnRJFhxjyxf/HPGABdvBk4Y+FNg0IWPRN 3+Ng7ot89qL8+WeSjjWA==; 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 1g85km-0000DB-A5; Thu, 04 Oct 2018 15:41:28 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85gY-0005mX-2f for linux-arm-kernel@bombadil.infradead.org; Thu, 04 Oct 2018 15:37:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZCZY73Xk3ZmXiimGXMWTNBwnmHabA+H34FtKHqpqPuU=; b=A5eTdCKAnVXsrQWeopKbG7KE1 8o22tm1+4zFEcVze60HUTJKMOAAf1DNmmMVk8TlrU4P5/4ALVN6rUzw65T28TpnFIQJT2mgiCD8NX yKf7mjrQlm7pc302hs/c9zHjtaS7R6ZMkE32GgBdKkw89MpJVMarTcUNjHCDn2jn//ccc3UaeLSe4 sVGWX1sOlq7OfA7qyr5O/JnZ+bwz1gvRNcOPrmsUodJOJtbLOGv17bwWPMLiLu8hAT8dFfA7/GiGE 3JS38Ot/yoDd/cIIn5Ua4rjJQORQBdppM4Vw8aBWjKavSiAPyew3T+9LCTzMBlzd4zjtm9zfsSPja AsSZjkq4Q==; Received: from mail-cys01nam02on060c.outbound.protection.outlook.com ([2a01:111:f400:fe45::60c] helo=NAM02-CY1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85gU-0002LF-Kn for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 15:37:04 +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=ZCZY73Xk3ZmXiimGXMWTNBwnmHabA+H34FtKHqpqPuU=; b=TrXz5pWX+MDyObUIJThoWix2t7iQwQbEno8AkHpIpnwtnphgskFeFcgidkTSkp+ROZ69O3SrQwO1airLBphsv8bwxLG33M1xRQTKN5yVZ4T2xlRdBSAVTaGzsJF4Djasat8xhIr3Cl5HeVbush7Z/CZ9Ps2Eg04wU6ByFQcxc4g= Received: from SN6PR02CA0006.namprd02.prod.outlook.com (2603:10b6:805:a2::19) by SN6PR02MB4765.namprd02.prod.outlook.com (2603:10b6:805:90::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.20; Thu, 4 Oct 2018 15:36:12 +0000 Received: from CY1NAM02FT056.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e45::208) by SN6PR02CA0006.outlook.office365.com (2603:10b6:805:a2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1207.18 via Frontend Transport; Thu, 4 Oct 2018 15:36:12 +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 CY1NAM02FT056.mail.protection.outlook.com (10.152.74.160) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1207.19 via Frontend Transport; Thu, 4 Oct 2018 15:36:11 +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 1g85ff-0001Ob-EC; Thu, 04 Oct 2018 08:36:11 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g85fa-0000EC-AI; Thu, 04 Oct 2018 08:36:06 -0700 Received: from xsj-pvapsmtp01 (maildrop.xilinx.com [149.199.38.66]) by xsj-smtp-dlp2.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w94Fa2QV023971; Thu, 4 Oct 2018 08:36:02 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g85fV-00008Z-KL; Thu, 04 Oct 2018 08:36:02 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id CB6F1121465; Thu, 4 Oct 2018 21:06:00 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v8 07/10] edac: synopsys: Add macro defines for ZynqMP DDRC Date: Thu, 4 Oct 2018 21:05:25 +0530 Message-ID: <1538667328-9465-8-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> References: <1538667328-9465-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)(346002)(376002)(396003)(39860400002)(2980300002)(438002)(189003)(199004)(36756003)(16586007)(90966002)(446003)(5660300001)(50226002)(54906003)(110136005)(478600001)(63266004)(2906002)(8676002)(426003)(106002)(81156014)(81166006)(106466001)(336012)(26005)(575784001)(2201001)(52956003)(48376002)(8936002)(72206003)(186003)(50466002)(36386004)(2616005)(7416002)(6266002)(305945005)(44832011)(4326008)(103686004)(356003)(51416003)(486006)(76176011)(316002)(47776003)(126002)(42186006)(6666003)(11346002)(476003)(107986001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN6PR02MB4765; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; CY1NAM02FT056; 1:Mt8FCA94WEkIlO+B6IZp+CNDRgXh1/FV/aM0fB96FlKEkyDViau5siV84DGAHC5cNVeO/L4+PO5Du63MEtLGbnMCpOIdjgmJufWKr9d6K0oyUlrmXuyizlMm/WpdeNNl MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 368b4a9a-a105-4f8a-d6f7-08d62a0f1d6b X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:SN6PR02MB4765; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4765; 3:QgLMCKZSe1vL99Qnd/iFDQQMrx+jA/dgH9j97Tjz8/tuqht9dK2sPSzDGerGK5LlMgyNjBl28zvLEKqxvXeL+VNorGHP+fwNQUI2WV//EEsowGxf7ZOk8WBDso6NWHOd3zpJ+E1coMrfIbz8F35K7ZCo3qdKI4RdRmKAB3Jv77KJWfkmvkmMrffGvFZi1OwRsb/eESV+G2ML2LREiE0VhX8EGmd8FF6bf35mET/42M3DFGpW88i3wi/cjYrhMc+QS4VVZUEwnp1BP7fCn0tio798m9F+Dvr4U9aVkMkQUMnWobO3bqKo7W8G34+zOQeYKQKavEusefoiaSwjqX4HyWDjBfqHmc3LW4k3I9Jq0K0=; 25:6e6lEP9BxUZ2sP3UNjuwS6ik3fS7iyYkYwt9HiF6nW6tQqT0NGNRNY9awNAGlu24rsfUBkoiCJx1dumPC8j6m/7XURny/LktXWQ8Rc9UzwkZ35TYTh+fe0MV/Wfn80TnH7Hjx1RRA4UaadFV6nDgv6btUZFVRG1BHhOFSKI96vrFe9gsP36ih9vOUsKWJY8rStsECJ7zvuE2ZlYild+u73OWifzOj+T2DXWjuPxxgDm4tYTT4goDbwdkvO4aKte5QyLFObgkSfR2BZtqbGF73vFIWMvbcNuZM9I5K1o/KvgNFBk16IPLRfcsnu6VVjuyIV9rcGh7aAmVpfWIuA9+/g== X-MS-TrafficTypeDiagnostic: SN6PR02MB4765: X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4765; 31:40Y2kd+bw7O340waPR/PV8kW0qe/6nPW1jI/tq0k8W0quCHZHzl11k856W7D4B5XKNBSd6qlcaUk0yjjV+BryfIdj8OuPB2hhjMA/Gx7KW8SDpAyCfUbuRSkwUp2uDXojBYJyw3ibi6MOnFnPcIipu1jRmhYWAr0c0u6U9lH8yYUnl+jSRS2ECVsCgIeRrFtPETnjBhpQrtjeE+ZMVWrHousd+GiUhDloEtDXndTyg8=; 20:TmE90vkpYs9adR3yy6zmjPBsir5ypgPcH4umHHgC63xQbL+tpEIKJ35HJ9jj6B1BZD236VaujXinRHeCxZiHt4M7qZeKYTPog9tFL9XNqiaCiib4iJrPdi3g2qW1JXMn2ZPyuX9EATkP61IKiiqIxQtyzvYs7b1Xd6t+X9MappJjcg7DCu7dKzFwwFJ+iNcTw0ec0byeLVTUmgA9rzBmctEJP2akEOQ9Een4yZNMfBaGGsjMGW26znVCvR+EP4MS8fQK4VlNnz4fTrPBp4ADgZLtvYekh6H5XhBkbWU30vNcg+3PQdHAQ9jykNTVslc1bxm83c3TmKenVg/IPcEiHRACgilGbY7MNq7Pa+9YJJb8hixOm0mt1WZs+mqyqKQq7CRFFOVeLjEBEEuLsUEiTF/JI1rxFQOxLk9d/vgWORDOwXPgS6hTnINjNbiWXkacAS1NmpvX1WV8THCWRONitkIjWLhYBPm9pyxChESKo55Brd2kUlHD2X7PWwVtHxSe X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192813158149592)(105169848403564); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231355)(944501410)(52105095)(93006095)(93004095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051); SRVR:SN6PR02MB4765; BCL:0; PCL:0; RULEID:; SRVR:SN6PR02MB4765; X-Microsoft-Exchange-Diagnostics: 1; SN6PR02MB4765; 4:NX1HNePpar8CMqHys8LCL8fjq+aLbVBRORWjQ3CMKjnuPZRJxD5jjIdka8VLh3FK6pNzw++ea1mBzewwtn2LcgeUH+drrgABJ2kqf17WC3c9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t2ilxDZ09WM/7H29nT5EEYpkaBrZI4LEspvuupipk1wPzdpCxqLdX40Cme9O+AKZvkF6VE8x8rGkax/qwUzeXY3CTBEU+sf8i/FtYJFAPYsS/CMw1ZS9RnJeIlFS+7FizFSSuUXXF8AEUYJAV/Kt/os2gajQhjoh8R0+iV7FBXH4sKZx0DM3m6uAMfcOWwY8/CyWFcw7+E31ox/hO7r0xKBJFEw9vg0J5MemYU9w1jysOxYCuqKsTeprM9H5iIlUjHdbbZyFvAwS6N9mE8lZVBaqOg9ucZhXgxOOXCF+Rs+my3XGRqStteNfsE/LBnyibOUrQ==; 5:O+cf0HEc/LkfQKlCzAtAPjApxIVLbyOkSg1l55isllB/YHhgsj9O4jtBuUNJUt7rOB1irAMFj7CuDMYlWNkYs0bGdfsHWJPIxpL1G1Kd8UPTZUUGMEhaWYrconKKno/AYG+/xC7yWo7yO5Ppys2fFoiO42N50JgBljmQ1vYJEmU=; 7:w2oztlCQi9tGlg/aR6fjcpnC45/C84hSPi61nv+QbgBzzU4wdFi0RNOx4JiGAO0FTWgi2evDuVDcUXMa2uUspKEbbfogYaknrCEXNBI4om6mTkwde9ST7ptTLRsSIwuyvfAFXKEUnIGzZ5ym+aKLT1VQGVYx2MDyiiZP+/nb3B26ShKqxxN4DtMTwrvYkset3n0xI2LwymeBmZDOOp8X6y776JaXCDdr3vvjcaan/D6sjE4K63Vf/0Bs1t40YMJn SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2018 15:36:11.8955 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 368b4a9a-a105-4f8a-d6f7-08d62a0f1d6b 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: SN6PR02MB4765 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_113702_924738_F5C0DA47 X-CRM114-Status: GOOD ( 10.32 ) 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 f0f4704..94d1398 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -97,6 +97,174 @@ #define SCRUB_MODE_MASK 0x7 #define SCRUB_MODE_SECDED 0x4 +/* DDR ECC Quirks */ +#define DDR_ECC_INTR_SUPPORT BIT(0) +#define DDR_ECC_DATA_POISON_SUPPORT BIT(1) + +/* ZynqMP Enhanced DDR memory controller registers that are relevant to ECC */ +/* ECC Configuration Registers */ +#define ECC_CFG0_OFST 0x70 +#define ECC_CFG1_OFST 0x74 + +/* ECC Status Register */ +#define ECC_STAT_OFST 0x78 + +/* ECC Clear Register */ +#define ECC_CLR_OFST 0x7C + +/* ECC Error count Register */ +#define ECC_ERRCNT_OFST 0x80 + +/* ECC Corrected Error Address Register */ +#define ECC_CEADDR0_OFST 0x84 +#define ECC_CEADDR1_OFST 0x88 + +/* ECC Syndrome Registers */ +#define ECC_CSYND0_OFST 0x8C +#define ECC_CSYND1_OFST 0x90 +#define ECC_CSYND2_OFST 0x94 + +/* ECC Bit Mask0 Address Register */ +#define ECC_BITMASK0_OFST 0x98 +#define ECC_BITMASK1_OFST 0x9C +#define ECC_BITMASK2_OFST 0xA0 + +/* ECC UnCorrected Error Address Register */ +#define ECC_UEADDR0_OFST 0xA4 +#define ECC_UEADDR1_OFST 0xA8 + +/* ECC Syndrome Registers */ +#define ECC_UESYND0_OFST 0xAC +#define ECC_UESYND1_OFST 0xB0 +#define ECC_UESYND2_OFST 0xB4 + +/* ECC Poison Address Reg */ +#define ECC_POISON0_OFST 0xB8 +#define ECC_POISON1_OFST 0xBC + +#define ECC_ADDRMAP0_OFFSET 0x200 + +/* Control register bitfield definitions */ +#define ECC_CTRL_BUSWIDTH_MASK 0x3000 +#define ECC_CTRL_BUSWIDTH_SHIFT 12 +#define ECC_CTRL_CLR_CE_ERRCNT BIT(2) +#define ECC_CTRL_CLR_UE_ERRCNT BIT(3) + +/* DDR Control Register width definitions */ +#define DDRCTL_EWDTH_16 2 +#define DDRCTL_EWDTH_32 1 +#define DDRCTL_EWDTH_64 0 + +/* ECC status register definitions */ +#define ECC_STAT_UECNT_MASK 0xF0000 +#define ECC_STAT_UECNT_SHIFT 16 +#define ECC_STAT_CECNT_MASK 0xF00 +#define ECC_STAT_CECNT_SHIFT 8 +#define ECC_STAT_BITNUM_MASK 0x7F + +/* DDR QOS Interrupt register definitions */ +#define DDR_QOS_IRQ_STAT_OFST 0x20200 +#define DDR_QOSUE_MASK 0x4 +#define DDR_QOSCE_MASK 0x2 +#define ECC_CE_UE_INTR_MASK 0x6 +#define DDR_QOS_IRQ_EN_OFST 0x20208 +#define DDR_QOS_IRQ_DB_OFST 0x2020C + +/* ECC Corrected Error Register Mask and Shifts*/ +#define ECC_CEADDR0_RW_MASK 0x3FFFF +#define ECC_CEADDR0_RNK_MASK BIT(24) +#define ECC_CEADDR1_BNKGRP_MASK 0x3000000 +#define ECC_CEADDR1_BNKNR_MASK 0x70000 +#define ECC_CEADDR1_BLKNR_MASK 0xFFF +#define ECC_CEADDR1_BNKGRP_SHIFT 24 +#define ECC_CEADDR1_BNKNR_SHIFT 16 + +/* ECC Poison register shifts */ +#define ECC_POISON0_RANK_SHIFT 24 +#define ECC_POISON0_RANK_MASK BIT(24) +#define ECC_POISON0_COLUMN_SHIFT 0 +#define ECC_POISON0_COLUMN_MASK 0xFFF +#define ECC_POISON1_BG_SHIFT 28 +#define ECC_POISON1_BG_MASK 0x30000000 +#define ECC_POISON1_BANKNR_SHIFT 24 +#define ECC_POISON1_BANKNR_MASK 0x7000000 +#define ECC_POISON1_ROW_SHIFT 0 +#define ECC_POISON1_ROW_MASK 0x3FFFF + +/* DDR Memory type defines */ +#define MEM_TYPE_DDR3 0x1 +#define MEM_TYPE_LPDDR3 0x8 +#define MEM_TYPE_DDR2 0x4 +#define MEM_TYPE_DDR4 0x10 +#define MEM_TYPE_LPDDR4 0x20 + +/* DDRC Software control register */ +#define DDRC_SWCTL 0x320 + +/* DDRC ECC CE & UE poison mask */ +#define ECC_CEPOISON_MASK 0x3 +#define ECC_UEPOISON_MASK 0x1 + +/* DDRC Device config masks */ +#define DDRC_MSTR_CFG_MASK 0xC0000000 +#define DDRC_MSTR_CFG_SHIFT 30 +#define DDRC_MSTR_CFG_X4_MASK 0x0 +#define DDRC_MSTR_CFG_X8_MASK 0x1 +#define DDRC_MSTR_CFG_X16_MASK 0x2 +#define DDRC_MSTR_CFG_X32_MASK 0x3 + +#define DDR_MAX_ROW_SHIFT 18 +#define DDR_MAX_COL_SHIFT 14 +#define DDR_MAX_BANK_SHIFT 3 +#define DDR_MAX_BANKGRP_SHIFT 2 + +#define ROW_MAX_VAL_MASK 0xF +#define COL_MAX_VAL_MASK 0xF +#define BANK_MAX_VAL_MASK 0x1F +#define BANKGRP_MAX_VAL_MASK 0x1F +#define RANK_MAX_VAL_MASK 0x1F + +#define ROW_B0_BASE 6 +#define ROW_B1_BASE 7 +#define ROW_B2_BASE 8 +#define ROW_B3_BASE 9 +#define ROW_B4_BASE 10 +#define ROW_B5_BASE 11 +#define ROW_B6_BASE 12 +#define ROW_B7_BASE 13 +#define ROW_B8_BASE 14 +#define ROW_B9_BASE 15 +#define ROW_B10_BASE 16 +#define ROW_B11_BASE 17 +#define ROW_B12_BASE 18 +#define ROW_B13_BASE 19 +#define ROW_B14_BASE 20 +#define ROW_B15_BASE 21 +#define ROW_B16_BASE 22 +#define ROW_B17_BASE 23 + +#define COL_B2_BASE 2 +#define COL_B3_BASE 3 +#define COL_B4_BASE 4 +#define COL_B5_BASE 5 +#define COL_B6_BASE 6 +#define COL_B7_BASE 7 +#define COL_B8_BASE 8 +#define COL_B9_BASE 9 +#define COL_B10_BASE 10 +#define COL_B11_BASE 11 +#define COL_B12_BASE 12 +#define COL_B13_BASE 13 + +#define BANK_B0_BASE 2 +#define BANK_B1_BASE 3 +#define BANK_B2_BASE 4 + +#define BANKGRP_B0_BASE 2 +#define BANKGRP_B1_BASE 3 + +#define RANK_B0_BASE 6 + /** * struct ecc_error_info - ECC error log information. * @row: Row number. From patchwork Thu Oct 4 15:35:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10626363 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 79D89174A for ; Thu, 4 Oct 2018 15:44:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6496B291EA for ; Thu, 4 Oct 2018 15:44:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 565D62929A; Thu, 4 Oct 2018 15:44:01 +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 211AF291FA for ; Thu, 4 Oct 2018 15:44:00 +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=F/1Pj/7T0wlxG0kpxi48nutDW/BuRzNQH+EVFicCnws=; b=Po7blQGFbm78Lv SEeTBLwp0Pf+JSYwRT0VOkaVj1EeigOuOgvGkMR9jq7mQKaUgQ0MzYx1IHNDQtZKx+ayoMfFeF0Kp ypvU0v7czxUY4U8DZuhpZfrjuNOxPaFj+PtJPSRCTN+HrNlKkZRBOYF+EQdiGtbtiqQKFi5/JO5yx Cam3WkmWnxVvxnTO429ek5v4N9Z6h1RkShheMPkYzST4wYojzvgvLwjtrO3WRIRVujR5omXhn9ysd Mf79eJjZDfhlaRqdsr2qjj6D9kVqkfqzc3Wv6rAwZdqi4fCaoPuzJBxE76ePFt27Raurgot12bfuA SFFcZ2sMszHplEHLfs6Q==; 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 1g85n2-0001Aq-Eb; Thu, 04 Oct 2018 15:43:48 +0000 Received: from mail-bn3nam04on0602.outbound.protection.outlook.com ([2a01:111:f400:fe4e::602] helo=NAM04-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85fw-0005Pb-Vd for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 15:37:12 +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=ii3kUvklkMyjKv/KZKvZ0U/8TK00+4QAZeczvI6Ah4k=; b=FJRZXoB87tZPV2Zqhi3FTzhvJ6dZ1wYZ0TaRedoAztzNh1Iu7N5tJLAf/S4lj0NZRp3QshwOx/g1xArHfD7AOx1iEne17JKxaKsKVmNIPyJAO7itR4QidM6RRHilEfQRGTNB94apJtogT0/6UN6kpV0MjlQvL0iiZ+UhovCDdL4= Received: from BN6PR02CA0088.namprd02.prod.outlook.com (2603:10b6:405:60::29) by BYAPR02MB4470.namprd02.prod.outlook.com (2603:10b6:a03:10::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.18; Thu, 4 Oct 2018 15:36:13 +0000 Received: from BL2NAM02FT056.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::202) by BN6PR02CA0088.outlook.office365.com (2603:10b6:405:60::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1207.18 via Frontend Transport; Thu, 4 Oct 2018 15:36:12 +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 BL2NAM02FT056.mail.protection.outlook.com (10.152.77.221) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1207.19 via Frontend Transport; Thu, 4 Oct 2018 15:36:11 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:55790 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1g85ff-0002YQ-AO; Thu, 04 Oct 2018 08:36:11 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g85fa-0000EC-76; Thu, 04 Oct 2018 08:36:06 -0700 Received: from xsj-pvapsmtp01 (mailman.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w94Fa36i031104; Thu, 4 Oct 2018 08:36:03 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g85fW-0000Bj-NM; Thu, 04 Oct 2018 08:36:03 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id ADB5B1214C9; Thu, 4 Oct 2018 21:06:01 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v8 08/10] edac: synopsys: Add EDAC ECC support for ZynqMP DDRC Date: Thu, 4 Oct 2018 21:05:26 +0530 Message-ID: <1538667328-9465-9-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> References: <1538667328-9465-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)(396003)(39850400004)(136003)(346002)(2980300002)(438002)(199004)(189003)(2906002)(478600001)(90966002)(2616005)(106002)(6266002)(110136005)(476003)(126002)(446003)(486006)(426003)(4744004)(54906003)(44832011)(336012)(16586007)(11346002)(47776003)(72206003)(316002)(42186006)(2201001)(186003)(52956003)(36756003)(217873002)(356003)(305945005)(106466001)(5660300001)(8936002)(26005)(36386004)(103686004)(81156014)(7416002)(81166006)(6666003)(8676002)(63266004)(14444005)(76176011)(48376002)(4326008)(51416003)(50226002)(50466002)(107986001)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR02MB4470; H:xsj-pvapsmtpgw02; FPR:; SPF:Pass; LANG:en; PTR:xapps1.xilinx.com,unknown-60-100.xilinx.com; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT056; 1:ws5JBWmNbBOh6rVyTfhc8NhH95SvMwCWCcD0ASmASGtTMYhh/MkvN9kDIIvGqBJmLNkoS1KWIM50KjV4MYvgBHsYffYKFijqHTgpBYjuOQJQ9SiLUe2gfonDj1+cMBSz MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d73fdbc5-47ed-4e9b-0c8c-08d62a0f1d35 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:BYAPR02MB4470; X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4470; 3:sSp3PxpPjFv72x58Fg51HKcSivELN911KfPFwvDyKiOP7wEwAsBZSzCBKYk35eGb+FPHofjv19tpG6Xyra/hvPJmRY6PgjP4as42NUEVhhOYo9PoTghD8S8UJL039ApX+zDdnhPEqUHDPa7/RaRQIqXNp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BP7/ldqpoy9DKpeG1x8+QWluiiDKUGxTvsFkRXw/JFswHzGvVFxXCjK7MParqMK46TkylzwopYFpB/MxcDLq4Dyg7tUMUvb2GTaCPwetxLc+mRq7Tthflem6dCIvIRbzEEowcdxJZbKmWtcflL4aa7VfJRU0aSyfaNfCuf2Y+f/UBkOPcLJEtxjQpiFFT/EMcForGq2wx8hJ7PvKpzLlmTFyEBS4rIJXV83AU7UjBb936gLrh8l+v1BJ2HE2HrNFEmlWtwILwYCFoOEiIzT3YFcl7bQ1FJbVQDFeBc5CwNlcp6shgERcJBP7qXZ+ 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)(8121501046)(5005006)(93006095)(93004095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201708071742011)(7699051)(76991048); SRVR:BYAPR02MB4470; BCL:0; PCL:0; RULEID:; SRVR:BYAPR02MB4470; X-Microsoft-Exchange-Diagnostics: 1; BYAPR02MB4470; 4:18+EN9inVUm6YCduzZ5SqpmuTr6eZ1at7+4lC0FDOqom7pIP8W2SSB6Rzfr6xdngqssBejVjdKRRz2G3uz1M504gUkh7iTgM1ic2u2s9/OaFZK0TXA4MsYdjkLS+rz333yTRrc+GQxkvIec7qt7q50u1KOIh+Q0IvlrASQwlENpufAyvGJnYO5Y8+tNANOieGu/zJGWUVLFQQ7smvAMORdOqmarz3ZIpva/4FXNc343fkZX3+dcY3ezM7v5uyHRRxIWeKTR88SIWkADMjLgxsySK858qUAZ6J8KkcM2O/CSVLu7/B1z/9bjqfY1uoi5AosPXdFX2VmWQyPGJ4Eeqa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1QYesFA5IvPng1xFeK+knscdFj9nIRpUCdKTnUJIntHh+Z5aMw/8PJFSFIsLlreO187O6/cKlivFUdDj8ONPYkekaThGBb70nHcZkeJn+tpQsdEsSmeYY0SMAsc/UYXBeAiyJ0ZT/KAtqjX2UkiKvrdIW8RizxD0nFigeg==; 5:bGyFnPsvo6BGjz5+w5ZOITp5h0Iq2Yqd2V92UtObqsQC5wJyBSU7fpZQ7cjpYD0Uy+DnYFlWAQaQ+U9K4nddi09vIKN+u5quzfuP5N5bxVSh4ymIzJZJmA2pYqn6lhSyk7xkhgeYH3Mhzxg7mX5WWhlz1IdaveGttm+5OQ/SVh4=; 7:AVOIncfDnjk1P+wYnUAFTmNS4z6ODyiKemdxze3HCY0w/9JlEG4nACIOxsimW6zepQ6FCiurusVyXvA2dVAoVnSVqXrH3TbBage8gXiUDAUyGYFxmHXPOtcLd7jsNsnqDQ4/HodfcPC7NlBllbN5KDx5ky9kBZC6EORElRUWbRJSb1pjZ35m2Nz55qfvx9EGIOhlizBiEG03MrPAb9M+XJr9GJSAUgqLoYq8VCpTvvbDPCpkdlR37nvjior94waq SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2018 15:36:11.9114 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d73fdbc5-47ed-4e9b-0c8c-08d62a0f1d35 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: BYAPR02MB4470 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_083629_356255_EDAE438D X-CRM114-Status: GOOD ( 15.43 ) 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 | 328 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 311 insertions(+), 19 deletions(-) diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index 57304b2..b1fc7a16 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 || ARM64 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 94d1398..adfa3bb 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,68 @@ static int zynq_geterror_info(struct synps_edac_priv *priv) } /** + * zynqmp_geterror_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_geterror_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; +} + +/** * edac_handle_error - Handle controller error types CE and UE. * @mci: EDAC memory controller instance. * @p: Synopsys ECC status structure. @@ -399,9 +466,25 @@ static void edac_handle_error(struct mem_ctl_info *mci, 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, ""); @@ -409,9 +492,19 @@ static void edac_handle_error(struct mem_ctl_info *mci, 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, ""); @@ -421,6 +514,42 @@ static void edac_handle_error(struct mem_ctl_info *mci, } /** + * synps_edac_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 synps_edac_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->geterror_info(priv); + if (status) + return IRQ_NONE; + + priv->ce_cnt += priv->stat.ce_cnt; + priv->ue_cnt += priv->stat.ue_cnt; + edac_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; +} + +/** * edac_error_check - Check controller for ECC errors. * @mci: EDAC memory controller instance. * @@ -428,10 +557,13 @@ static void edac_handle_error(struct mem_ctl_info *mci, */ static void edac_error_check(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->geterror_info(priv); if (status) return; @@ -476,6 +608,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_eccstate - Return the controller ECC enable/disable status. * @base: DDR memory controller base address. * @@ -485,19 +650,43 @@ static enum dev_type zynq_get_dtype(const void __iomem *base) */ static bool zynq_get_eccstate(void __iomem *base) { - bool state = false; enum dev_type dt; u32 ecctype; dt = zynq_get_dtype(base); if (dt == DEV_UNKNOWN) - return state; + return false; ecctype = readl(base + SCRUB_OFST) & SCRUB_MODE_MASK; if ((ecctype == SCRUB_MODE_SECDED) && (dt == DEV_X2)) - state = true; + return true; + + return false; +} + +/** + * zynqmp_get_eccstate - 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_eccstate(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 state; + return false; } /** @@ -539,6 +728,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; +} + +/** * edac_init_csrows - Initialize the cs row data. * @mci: EDAC memory controller instance. * @@ -600,13 +817,58 @@ static void edac_mc_init(struct mem_ctl_info *mci, mci->dev_name = SYNPS_EDAC_MOD_STRING; mci->mod_name = SYNPS_EDAC_MOD_VER; - edac_op_state = EDAC_OPSTATE_POLL; - mci->edac_check = edac_error_check; + 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 = edac_error_check; + } + mci->ctl_page_to_phys = NULL; edac_init_csrows(mci); } +static void edac_enable_irq(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 edac_disable_irq(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 edac_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, + synps_edac_intr_handler, + 0, dev_name(&pdev->dev), mci); + if (ret < 0) { + edac_printk(KERN_ERR, EDAC_MC, "Failed to request IRQ\n"); + return ret; + } + + edac_enable_irq(priv); + + return 0; +} + static const struct synps_platform_data zynq_edac_def = { .geterror_info = zynq_geterror_info, .get_mtype = zynq_get_mtype, @@ -615,9 +877,26 @@ static const struct synps_platform_data zynq_edac_def = { .quirks = 0, }; +static const struct synps_platform_data zynqmp_edac_def = { + .geterror_info = zynqmp_geterror_info, + .get_mtype = zynqmp_get_mtype, + .get_dtype = zynqmp_get_dtype, + .get_eccstate = zynqmp_get_eccstate, + .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); @@ -673,6 +952,12 @@ static int synps_edac_mc_probe(struct platform_device *pdev) edac_mc_init(mci, pdev); + if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT) { + rc = edac_setup_irq(mci, pdev); + if (rc) + goto free_edac_mc; + } + rc = edac_mc_add_mc(mci); if (rc) { edac_printk(KERN_ERR, EDAC_MC, @@ -684,9 +969,10 @@ static int synps_edac_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); - return rc; + if (!(priv->p_data->quirks & DDR_ECC_INTR_SUPPORT)) + writel(0x0, baseaddr + ECC_CTRL_OFST); + return rc; free_edac_mc: edac_mc_free(mci); @@ -702,6 +988,12 @@ static int synps_edac_mc_probe(struct platform_device *pdev) static int synps_edac_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) + edac_disable_irq(priv); edac_mc_del_mc(&pdev->dev); edac_mc_free(mci); From patchwork Thu Oct 4 15:35:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10626345 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 839EA15A6 for ; Thu, 4 Oct 2018 15:39:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7091D291BE for ; Thu, 4 Oct 2018 15:39:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63BFD291D7; Thu, 4 Oct 2018 15:39:23 +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 C8929291BE for ; Thu, 4 Oct 2018 15:39:22 +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=ufTSUmU+Bqx/JE QXGb11Ja8xH/CnrgbqN/bQKsqrx5KxldQeRyJLj9YG7GS+sC4V4XS+L0vr0ClXATbRpcag6jqic6c tvr1NqhfLQT1qRmDIYxV2/SJ61KA0Xf0dqhoYJ0LO7WGDNytq+a+BhdlLH88EZzAM1PcaRmNrjVvR ftvYCeFQpPN5+oVFdnY6QOWO87I7jlmukQX9bCxazOcDNCnK/BRFIyCw2EOXAaeac+2I52me+4IAt z/qejhc+U5tui7ITZTWHTJZICXM/N8Ka3ShIoHHeuEsQn4Zgx4KHcTKmnKh3r1PL65ixygNGq8uiN ZHYPTE8B9sJ2HQ0DKIRg==; 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 1g85iW-0006Xy-8H; Thu, 04 Oct 2018 15:39:08 +0000 Received: from mail-co1nam03on0060.outbound.protection.outlook.com ([104.47.40.60] helo=NAM03-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85fs-0005O0-SL for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 15:36:55 +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=Mpd37JminP5MdOffOmvovErovj6CHRLE/kliRJTSdNvKGXFaqFsHODg6XRQESJg+0h6Q58hTvqspCU0gVl8ZgnI2cpD4Xl+aLx7yjUB1SaB7Mq07JS+YiRZcmLhgaD8IniCkUMVZnTTULMoYTaHK4o8gCEU1IPhc5qiAOIOd40I= Received: from MWHPR0201CA0092.namprd02.prod.outlook.com (2603:10b6:301:75::33) by DM6PR02MB5115.namprd02.prod.outlook.com (2603:10b6:5:51::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.23; Thu, 4 Oct 2018 15:36:12 +0000 Received: from BL2NAM02FT055.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::200) by MWHPR0201CA0092.outlook.office365.com (2603:10b6:301:75::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1207.20 via Frontend Transport; Thu, 4 Oct 2018 15:36:12 +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 BL2NAM02FT055.mail.protection.outlook.com (10.152.77.126) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1207.19 via Frontend Transport; Thu, 4 Oct 2018 15:36:12 +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 1g85ff-0001Oc-Ja; Thu, 04 Oct 2018 08:36:11 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g85fa-0000EC-FY; Thu, 04 Oct 2018 08:36:06 -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 w94Fa37b031106; Thu, 4 Oct 2018 08:36:03 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g85fX-0000D4-By; Thu, 04 Oct 2018 08:36:03 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 740A2121465; Thu, 4 Oct 2018 21:06:02 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v8 09/10] arm64: zynqmp: Add DDRC node Date: Thu, 4 Oct 2018 21:05:27 +0530 Message-ID: <1538667328-9465-10-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> References: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.83; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(346002)(39850400004)(376002)(136003)(2980300002)(438002)(189003)(199004)(5660300001)(52956003)(47776003)(44832011)(575784001)(316002)(42186006)(103686004)(356003)(305945005)(4326008)(14444005)(7416002)(2201001)(6266002)(16586007)(48376002)(90966002)(50466002)(72206003)(6666003)(478600001)(426003)(36756003)(336012)(63266004)(110136005)(54906003)(26005)(106002)(186003)(126002)(36386004)(2906002)(486006)(81166006)(81156014)(76176011)(8676002)(51416003)(50226002)(446003)(2616005)(8936002)(11346002)(106466001)(476003)(107986001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB5115; H:xsj-pvapsmtpgw01; FPR:; SPF:Pass; LANG:en; PTR:unknown-60-83.xilinx.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BL2NAM02FT055; 1:juvDfuz8INP5YTDKknMU1Ngk0zWVbk4NpV30l1giIo5JpSWunLpAwewyGivfm1jar6nq03idJPxdV6KAn9QJJR+4RlDu/KKD9gDvqOoKsa8Wz+ctMtWTbrbPtLqdzVel MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dd5318f5-83d8-41fd-e5e0-08d62a0f1d50 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:DM6PR02MB5115; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB5115; 3:qk+Lt0Aye4Ww4GPrcTdpYxU+e7h1FnaCiFf4f2bd9NbhH2jEeoxz8vSlAsqYGsbVMg9xz984xg8PHuNHG6kv6mWZsRtDBc5yrieoGgYkWjkUqO//lXvSgi6ESLg8m3fs/5eyftRcwxMhUMzxfRlmbKuG218Jt5qWPUXqaDUlnQXQnE7MYuPkaBPivcOOTwLxslMucbB02ZI6KaxkrjVo+glO+CEbm5N3tKVIGDripnwWhMnfxh6x7NfJQVAuPJc1cQHbfhjZVk5xHke0GmlEhvjn/EchmEUwYej8hTjXC+TlRCMzhqme1Mjt9kwpcbpIsQQJ77UCG0XiRYpxrL8U0G0WAcC5VXFYkk3FfF7dDTQ=; 25:Uk99tP6Q40cfyrSZLCftX+gIlKMrHdCLjcQQ+C2P7qfnfRvFkiy151XV2c8T9cE0IuRqKaNZSibYOuPdaZkZOvKSh1ZmssNJ4b7ja9akPKjp8MHAuwB9/Z8+4DFbpX8REpbB/foEWpnWEW7xxIGqb7FHl/bl6jx5QOdL09uuKaIQlv4CYO4aR0m7OFqDhrZYPLRxgHmF/DhBs+MoQBlHKR2kJTaVsKXVoibAJ7f8KP89Ku3p16Q6ps+PHx7ZKvUgY0BkTHf89klL69UKrN7ABUJkFoy0MFIerDiA8sLuzhLUZcnzxBhF1jxKg/ciHjrzABdC8LEJN0dz8EZ7WL0WSQ== X-MS-TrafficTypeDiagnostic: DM6PR02MB5115: X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB5115; 31:JFN9ZKW1y0xfnR798ttg6JixbxvwasPQxqLia9Mi/SOAo0JMYPUGWUcjKbKjYIhFFAcLlSWScBS4T3iCE1E4rd5E5bPni1DteLOid75f8lWCCUp4XcPTOp3gwLG9iZmZoY+OPpkM765y0NAWZYp9cAnVs+x10ydSpq+qWe4vuXWa+jmPhMYT3AbvtFdoDv0pYgDmQyKxvELjRgxipfsW4seoYMALJmyjudoA6o8p22A=; 20:0/zm4r1qQbf/G9nHg+SOjxox9OsJ+mEwVy7xeXrvXA7FbjToZVDL1ApiQVAbWj1Rf98L2mWmbGCSJJjH7jKCfHezum8sq7SujsyVblO2oz1dVn8IriyQn816i8qBdqG1YnlcT4dhFwSM41AuVadZbSFyq2hWvvwdpYDz7ArLakqHtuqvDZqynCFAarN8exhpvqO6VN1TeiU+RFfVn1KBFmwHJevFvVlSQkNCkVj79KDcMH7N4IcQGNkQdUGqT4qYyR8dthdpLixyt4BtTMlmRYi648/vuYM4xRfS7BeO+/HDb1eCx1JOdqtu8bctxVByG1KBHqzUg0AVBdFWkTEkOHoEb3x+qmHFButhHx8gyKBuyZg4hjsAtdoX93/BSq0EQxfrg7PeX/sYdI85BGt7+fJSlzu7fCrlrpLtqlrJwHNCVR7vrbeWifqZxI0bO2cWCZ47RG8/V0fvarn3FLjG884bLG5X4LHFku5zAPe6qkMzvLayGDxVgcwQxb0Bdoft 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)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93004095)(6055026)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(201708071742011)(7699051); SRVR:DM6PR02MB5115; BCL:0; PCL:0; RULEID:; SRVR:DM6PR02MB5115; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB5115; 4:B2Zd3o1qhgtCN+X0PKFJaqu/EtQAPGDhE0h3SYEqKtggwCsIjfnnXe1zvD+1Gm9V2ZUjDWagaJJxtGkk4sHlN8g2AfK3ADH3Qm0Dr8MfjvxbiRkDMhmu3LjF7Sn2mXv3q5mcq+pIM7OZDfjSXKfzf2JZpoQWxcBLcfTrBZN5+PVUf9zJq6MGH78DXfqBD+93qqAXPm9ulVXxEKBU8H7JHJAJwliK+OLnAmx9OJ/HQLdoMH9pRpEr/qg2LpM8h4ClDSvjdT9LAN8rPtc4R/Khga9GX+yr5GW2Bx0Sc7jvBvppVeMh4ZcRXdjY82HhzhYx X-Forefront-PRVS: 0815F8251E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR02MB5115; 23:DFVhiu7WOMUSHOau1WPQ3FWOgaWnob+4+QOKsIkgm?= Qup8Z6VGljChhAqTNASCutxXdCmscc6F/HiFXJACoqq9JgH0eiOQapiFRHCw/pPMQ0Ns3eDceJ+13V7SBuZeHnFE+kHtG7XoirwUTFyw2Eq5IJYnA68yNeKCg4nNvoyyiCu5M3FfzdacerG4Qv1iJBzcoiQl+9LATiG73HpFW8tq2HByi0bM9XSHvvxvrTqoOe7XNf49mPQMrsuwwtgdatVeLpyZgtJ7ss1omhdS5xyEZXEbHiUhjxY9/TEnledoHqv+t2l5EYZ8loQ3+l24mNacjdEalVrQ9BiRrX3UcvjfCcdwPRlSbQXjB0F94oSxP14U0cgFbBTkB1UMGhiGMNlI2TlEPWGeroHPkl47WCGmizo2mK2Ad6akLop7xkL4ItKQxx7hzGbXeNQzKC4WP+Il2FBINGGtC6uTGEOG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SPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2018 15:36:12.2345 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dd5318f5-83d8-41fd-e5e0-08d62a0f1d50 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: DM6PR02MB5115 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_083624_994874_87BECFD3 X-CRM114-Status: UNSURE ( 8.29 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add ddrc memory controller node in dts. The size mentioned in dts is 0x30000, because we need to access DDR_QOS INTR registers located at 0xFD090208 from this driver. Signed-off-by: Manish Narani --- arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi index 29ce234..a81d3b16 100644 --- a/arch/arm64/boot/dts/xilinx/zynqmp.dtsi +++ b/arch/arm64/boot/dts/xilinx/zynqmp.dtsi @@ -355,6 +355,13 @@ xlnx,bus-width = <64>; }; + mc: memory-controller@fd070000 { + compatible = "xlnx,zynqmp-ddrc-2.40a"; + reg = <0x0 0xfd070000 0x0 0x30000>; + interrupt-parent = <&gic>; + interrupts = <0 112 4>; + }; + gem0: ethernet@ff0b0000 { compatible = "cdns,zynqmp-gem", "cdns,gem"; status = "disabled"; From patchwork Thu Oct 4 15:35:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manish Narani X-Patchwork-Id: 10626367 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 D4A301731 for ; Thu, 4 Oct 2018 15:44:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD2B229042 for ; Thu, 4 Oct 2018 15:44:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD9C1291EA; Thu, 4 Oct 2018 15:44:52 +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 87FC129042 for ; Thu, 4 Oct 2018 15:44:51 +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=yPoKHP8rQP/CaQI6BJ0akLabM/jcEzYwWlyq7TIvEHE=; b=YAZxDDSjQbXsxK yNoEbIeQpYchXqQ0Y9I+rr5sFSeifGXckpXTkNr4KtZa1oyWic6mJUPIOELW3JOV0ulzjRanHIKMB 8qIHr5hRSygkUG1SU107ElXWbPztZHPLvNtTRhU5I9sllZNjMnhePwM3XBCybQ0El28dlhvU7ejzw UoMIblRKq3HH7djqOAAxRJ7j08YaPTBGfaqR+H1s1x/UlYSRG/N7ex2AcruyuezOpbN9fqPokNE+a 66jvAFqZjOH+5aJKU2k3jLtxYvO0Anlm8yE9m80+GDdLm2GZrbQ9YGLaK8EBbHqZ8H7/A+B5V8T30 xxbhS9hO+flmQ/jOPidA==; 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 1g85nr-0001Tn-JD; Thu, 04 Oct 2018 15:44:39 +0000 Received: from mail-bn3nam01on0074.outbound.protection.outlook.com ([104.47.33.74] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g85g5-0005U8-67 for linux-arm-kernel@lists.infradead.org; Thu, 04 Oct 2018 15:37: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=WyMAkILLJW4ETM49OKktK74BjI0dbUhZNgvTXIYgT3M=; b=V1rU9qot5lh4OuzRrynNSn1czEXUNF6LcYBA47dASXKh7fetP2r9ISeIlS5CvDf1RSL21A2BgORJdufcdzWOv2DOH2d1U+U6unAnIUDBlgCSR8hO6t9gaJmBMwh0cps/cZZFWm8es3Axlwq8HpQOML7pT//PaNhmtU6thYhM6ic= Received: from BL0PR02CA0099.namprd02.prod.outlook.com (2603:10b6:208:51::40) by DM6PR02MB4764.namprd02.prod.outlook.com (2603:10b6:5:18::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.20; Thu, 4 Oct 2018 15:36:23 +0000 Received: from BL2NAM02FT058.eop-nam02.prod.protection.outlook.com (2a01:111:f400:7e46::205) by BL0PR02CA0099.outlook.office365.com (2603:10b6:208:51::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1207.23 via Frontend Transport; Thu, 4 Oct 2018 15:36:22 +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 BL2NAM02FT058.mail.protection.outlook.com (10.152.76.176) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.1207.19 via Frontend Transport; Thu, 4 Oct 2018 15:36:22 +0000 Received: from unknown-38-66.xilinx.com ([149.199.38.66]:55976 helo=xsj-pvapsmtp01) by xsj-pvapsmtpgw02 with esmtp (Exim 4.63) (envelope-from ) id 1g85fp-0002Yd-Tj; Thu, 04 Oct 2018 08:36:21 -0700 Received: from [127.0.0.1] (helo=localhost) by xsj-pvapsmtp01 with smtp (Exim 4.63) (envelope-from ) id 1g85fk-0000Gz-Q0; Thu, 04 Oct 2018 08:36:16 -0700 Received: from xsj-pvapsmtp01 (smtp.xilinx.com [149.199.38.66]) by xsj-smtp-dlp1.xlnx.xilinx.com (8.13.8/8.13.1) with ESMTP id w94Fa4tG031116; Thu, 4 Oct 2018 08:36:05 -0700 Received: from [172.23.64.106] (helo=xhdvnc125.xilinx.com) by xsj-pvapsmtp01 with esmtp (Exim 4.63) (envelope-from ) id 1g85fY-0000Dm-1z; Thu, 04 Oct 2018 08:36:04 -0700 Received: by xhdvnc125.xilinx.com (Postfix, from userid 16987) id 396D71215BD; Thu, 4 Oct 2018 21:06:03 +0530 (IST) From: Manish Narani To: , , , , , , , , Subject: [PATCH v8 10/10] edac: synopsys: Add Error Injection support for ZynqMP DDRC Date: Thu, 4 Oct 2018 21:05:28 +0530 Message-ID: <1538667328-9465-11-git-send-email-manish.narani@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> References: <1538667328-9465-1-git-send-email-manish.narani@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.2.0.1013-23620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:149.199.60.100; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(136003)(376002)(346002)(39860400002)(2980300002)(438002)(189003)(199004)(16586007)(36386004)(106002)(6266002)(476003)(126002)(42186006)(356003)(316002)(6666003)(54906003)(76176011)(11346002)(4744004)(426003)(110136005)(81156014)(8676002)(5660300001)(478600001)(52956003)(72206003)(2906002)(2201001)(81166006)(50226002)(8936002)(51416003)(106466001)(63266004)(486006)(44832011)(103686004)(4326008)(26005)(47776003)(186003)(305945005)(48376002)(90966002)(50466002)(446003)(2616005)(336012)(7416002)(14444005)(36756003)(107986001)(2101003)(5001870100001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR02MB4764; 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; BL2NAM02FT058; 1:DfFLzTRdUDwGQCl7Or6+MqJtCvSJoONJYrz/q7W4fldsiqjpW6dhAlfBtMlLxXiC6XT2z1Pk24OL63TSIRmE1VqJJhUtsPSQwsdI4takgfv1pTd70JsU2Uc71Wq6Hk6c MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c0225e99-d624-426d-2374-08d62a0f238b X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060); SRVR:DM6PR02MB4764; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4764; 3:rUSN4caGFpZtX23U4Ky+LKrPEOsyLO6zmV5k/iWWVFaXocVjEfEUJHglBn2mbzSNS7RGisEIbbARdHl6LJcMmvsTYEbkHhq4AMD3e+ZFJ4Ug0GGJKKECNVbSRMe+XflDxtgPPRUdYNXAnyr/Z1V7Zd1RNY1wCq6SfM9OcLZVP+MQro1LFJLWj5OIq9hyn14X86yjsANJwhSoQMZDWr0EoW949ZRNstrZmCJ7NWWZd1vlHi96hU96h4ZyZEzgADSYjHt55ZTyIOnDzv6J4xkRdeNMR02wq6bFPiO380yhYkIWS52AnHQQee1risjKId5lfhHHSEBkQat1TXj2PnAe8uUZN4wAULZetgeXoITMwmg=; 25:kJuqRWenVp0qD+8HjUl30cRJ9te3PPCjjYjZJDfHxJFeW7qhCCw7hgsjiD4kezSTR2xZ6be1bSLa7IFUn68qQ5dWqHMRRRtm5Qzl080yw8DUOWk7OvkQuxiANHpPLdhQyzX4EN6fSCRQjUq8OwcVBfTv8GhIGAk/J6Va0m3/9ipFiU/Gh0sPt9rxT2N5bm/e4ohhwnDPkzU6kJtkK010K8BqnoRVEABf8D3n1PSrIvFf/h7shGCvUd0iVxXsx9wwJ8jKXwFfkg7ZLLcJn5q7W2z8j5r9LKSmhX0Dcs1y5t4YE6uCBXhH9PGbp5QDP8vNbND+2GkZo1C1Cc+7AdsBGA== X-MS-TrafficTypeDiagnostic: DM6PR02MB4764: X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4764; 31:qpn5SmWomKUGV58hsNeJ5/S7CdmkBv0M/nPYTAtQSPRhIklUl1lKCIVm/Ik8LKCtQ1zPpQzRwtSKToTRpT5jEUV5Dze91maEFQy5/xfqpIClIsAXoqQjEMkFC55f/doUfyM/7hf+pPn+/Z6mPq1Nu7x1Nl4kulnRGc0G46r0nDTJeUtjUwnx4y6C7dq4uxvaCdUsXRMfv5citC0EPP3a4gNAPb+Kf7TVNEZtlXId3gk=; 20:58x/ebUvX1q4fmHYdLfO1eCNmUz4m8RtvQuq/0+iC5k0yt33wEqBtsCKEPCBKvhzvqQsw58+MJYSi8zFDRb6prE79f84GdPZb6taHrOWLOXJHJAvbqKuUyZTuzYZODfD5C6TA0g89/Cg2J5I3AJrCJnf25gTWqE9vf/Yp6cZBtOkIL5FB1WFrfsE0tKA8zDD4oFKDE+vAC0pSywq693EjV8juSZo/3N6JWhri4Z+aS3eIiPvmHRBk+R9RZvXaJ7DDSqj4WD9erbUwkZK3VT4cJQT7RBUpyoasNKQia/wnI2RmPoWS70GpIeG7IZzGdR1aWl32wpe71KfxoB0v1d8aAhVJ7Q6bDWlyl559Sa9mnNW90K0v3VXh3+3crnWN0I28GNM5b4NgO3WJK8sMvYsJWF5dmlQPpX9w+VaiiUuOVzOCiXbERFuDirWiw5+AYpcTrcs6ZvKophle9jboxbqVgbOdGoEyjOvN9M6K2v7x4BmQPSvkZtGS2pNkom/ytC6 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(105169848403564)(192813158149592); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231355)(944501410)(52105095)(3002001)(93006095)(93004095)(6055026)(149066)(150057)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(201708071742011)(7699051); SRVR:DM6PR02MB4764; BCL:0; PCL:0; RULEID:; SRVR:DM6PR02MB4764; X-Microsoft-Exchange-Diagnostics: 1; DM6PR02MB4764; 4:Ybu/MDSSMkRbpJq7C15e1E3osOFlOGTrmMZESIeoGs7pwxRkeS1G8ECBwFrBPfu47CoUofuxHS8ykzRYMHxWX7zaodh3AsjGCATUJgsuScJjQUuJ1Qglb4oQvF37ml/lLQ0s2mLSbKxihiDQfLZ1vm/wy3rh1ZtU1bALxfj3exSnpiTaNfDE2EBNXBwxg/oAF6hqpz+gD+xHD869jw+wQnwq9kNpvesY0Tm/FfUKjeeUStImR324TFJph5jaO86bNjLhNnJR4cHhsu1qxexTxm11HhW6eOQqVYZIFQKOyLw4OvFUJn0K4W1SpiTAYejagujNx6XqsLyJAqHDmx0SzdJWR2qTmNtm14vMbosrVMo= X-Forefront-PRVS: 0815F8251E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM6PR02MB4764; 23:HWJuDOIihXAVTmZW3a4pk8IP9uk8j2D5zKjF7UqO0?= tTEE9f51ZRC3ZubmZ0/f4IhgvvdnargpVbm9df+znr6c/UMIRU/dM/gbLItVf7Zi8aLafU3ZdOzTIrDlOsy+9rlD+xgCJ+QOS178rKrCY0l6s5xOeuG9oaPoqUL0q3tMBguS6QRz4oSdDj9NDWFUcpDs/vhcBAFe4JQe5VPZJYPEPgf9LiqP5DtS3vgWX/4czj6D77XlETsMcu0wLm0wCthVKvNz/m5ewWy0P+GAzQbsaT/vUagWxp5T6mW8vRV6eT478T/7AcYE3CaOQ9TYNPamWo0MYxDd7Nkw2bSLFBkbtSv5Hm3dbaV+j8dIMgRsv4zAwtLqSHxPLXB0+D5fVkIPQblNBxobHTIHYX7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GdC2xAaEnMeuwDQFlfw35A2Vn8x4GRr37Lvj8NVaa/MM+eFnUXR9jGK3xNwgspDSvDtSVk3wjhdvOB+98T SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2018 15:36:22.5107 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c0225e99-d624-426d-2374-08d62a0f238b 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: DM6PR02MB4764 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181004_083637_487746_36863974 X-CRM114-Status: GOOD ( 13.55 ) 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 | 421 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 414 insertions(+), 7 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index adfa3bb..b64de4a 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 }; /** @@ -882,7 +896,11 @@ static const struct synps_platform_data zynqmp_edac_def = { .get_mtype = zynqmp_get_mtype, .get_dtype = zynqmp_get_dtype, .get_eccstate = zynqmp_get_eccstate, - .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[] = { @@ -901,6 +919,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 */ + /** * synps_edac_mc_probe - Check controller and bind driver. * @pdev: platform_device struct. @@ -965,6 +1352,20 @@ static int synps_edac_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. @@ -996,6 +1397,12 @@ static int synps_edac_mc_remove(struct platform_device *pdev) edac_disable_irq(priv); edac_mc_del_mc(&pdev->dev); + +#ifdef CONFIG_EDAC_DEBUG + if (priv->p_data->quirks & DDR_ECC_DATA_POISON_SUPPORT) + edac_remove_sysfs_attributes(mci); +#endif + edac_mc_free(mci); return 0;