From patchwork Wed Apr 27 01:51:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sherry Sun X-Patchwork-Id: 12828168 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C939C433EF for ; Wed, 27 Apr 2022 01:52:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356967AbiD0B4E (ORCPT ); Tue, 26 Apr 2022 21:56:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356922AbiD0B4C (ORCPT ); Tue, 26 Apr 2022 21:56:02 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70044.outbound.protection.outlook.com [40.107.7.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F4DE12A9F; Tue, 26 Apr 2022 18:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eMoH0RIoEzDkiLtAIv85xB3hbg1ChSYAl3GBEVbGGulwPeTYbsg0krt3hlhhN51ekL4LHJOK5z4mNtklbx7D8EOa+kY2w+EdyMoFPVKx0YfRBoSU4iYRoMjaDH/nwY9FjSdQmKuv8PUVNKZFjtfZaCX/Va9mT2WDPZX/jzuFG4skvFng3t2ia1iJ0Qv9+R/Pojz3F9RMVSfaiQ9aSKHfX6jjdWmUuKS6wGroZOn9fV8fKUk751sWbQGllkfuA/M2FqdIIo3xYuthGPxgvKNTRkGEPnvAfoM/6lnVxY8CbYLwI2TAvT76hgyceRYHR3TYLKepL5A2SZ6JjkiAivMnqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TwnHzvaiqyT04DKwzBRCFeurDGyjmox8aebpkR+ppng=; b=ILCd0xS9C/46ldbk3iRVLx2T3tLBYG7i0iVYetMBlIo1glxkUl72R79dHYV1kqqTUMppIxCxRLeRCpmt2UEnVnn8hq+WFVQ3/2zoIkPSWry3NJws7ujcMgKVlJeD046S6rgwHFRl56KC0Diry7F9pgdXEUHrfLF6YNlQ4WwgqEqOspRRuhRFVS/UqS0VqX6qWwEYqVJ3Mu5kkICHuE0r1AZZXHLPtHHaipaRk022tzh6CXXgZ6n50RgxMhvlodhz/GY2dix7BActGfgc5/kl9714CfQRiz+O6h3dTsSX7sB2q9yL7HK/1dI/ENpmcBUZAUzcwnA4WcLX5kMBMX1fGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TwnHzvaiqyT04DKwzBRCFeurDGyjmox8aebpkR+ppng=; b=GkeG5TwfgJRRTNwD8x4BCz6QNJ+fL1Lm2wpK9FE9NQMjZL91eMjq9pVq9x1UYGARuZ91bzS3w/T+Hx2jUjaaqo8Xxgfgcjj2uE3P7M4OBVwvA/oDQKtfbmj+KeuwnvtpflGLVmM35FxtYQXpr5mv+D7X32kooD9b9NMt3KzeQWI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) by VI1PR0401MB2589.eurprd04.prod.outlook.com (2603:10a6:800:4f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.21; Wed, 27 Apr 2022 01:52:49 +0000 Received: from AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::1cff:564b:c3cf:46e6]) by AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::1cff:564b:c3cf:46e6%5]) with mapi id 15.20.5186.021; Wed, 27 Apr 2022 01:52:49 +0000 From: Sherry Sun To: bp@alien8.de, michal.simek@xilinx.com, Shubhrajyoti.datta@xilinx.com, dinguyen@kernel.org Cc: linux-edac@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH V4 1/2] EDAC/synopsys: Disable the error interrupt on Synopsys EDAC v3.x hardware Date: Wed, 27 Apr 2022 09:51:36 +0800 Message-Id: <20220427015137.8406-2-sherry.sun@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220427015137.8406-1-sherry.sun@nxp.com> References: <20220427015137.8406-1-sherry.sun@nxp.com> X-ClientProxiedBy: SI2PR01CA0002.apcprd01.prod.exchangelabs.com (2603:1096:4:191::21) To AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3440baf8-2a75-41a9-3564-08da27f0a246 X-MS-TrafficTypeDiagnostic: VI1PR0401MB2589:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jzrC5r8x31MYlZRk+bY1+ZrV43W+74nUJbfYpGP997L97Yk7ze2AG/0popn3/ketpUPQr3K96i2fwBA19YnwcBj301cpGhiblQRlN5FjT+J0CP1m8z6T54Fu9FzB6inU0wTaBw5YYNrcG01eioo0fF2B5pE+6/BDXOA5AC0706oj5VFkoxXeFRsMQcQ+Pv526e4pvDCMM6QVc9xwYhCzbOZzslQz+T++jNJ0si4MipaXXmrcdhbxxfdjFNr1PaboucsnXk/AdcFjs7ehlx6qe0Ch/Pcoi48HP36CRyBd38EZBRdFm3n3UgNHpUfbJwMxPg0HVYhnrEIlT0vIBdGzJRZbX8DJmykA2N9/YHtaj2QnLxiMRLONdgGek1H8nW3NRFpMMUJ+cDvrC6mxYxNd/GvtWK5HWmVd35pXI+L3GtM0fd08XdXFGjONlZHJJ4p5vDdQJyKmZ05wQbrARdIDAO8l77lLOldiHHqADRQvKfLR1apn4ypdCak3mJY5qhE5mxYO2eNj49LxCPatiK2wPMM3u6xn6TdRX/ss9iXfOPFEZ9QU+rK5ZLmYqeoUNeEWVP4RCjJnV/NKFmw9daUSwy3cKNIbvL66kqawOfov4scbnIg3KyRwnPlnNTt3SJu+ZIhgFkYbiHzuAFpDJMcz0F6uWsB8U5IfJxbEp0tfMUH5h4/4ouW1s6531DOrieH3PG0QVDbIvKfr8aN56HIdGg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8404.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(38350700002)(2906002)(6486002)(508600001)(38100700002)(66556008)(66946007)(8676002)(4326008)(66476007)(86362001)(8936002)(44832011)(316002)(5660300002)(26005)(6512007)(83380400001)(2616005)(36756003)(186003)(6506007)(1076003)(52116002)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: N3X+eqZ4/s0ZoPsR0oQW1NGQVySCEdi9k0v7pihA+zb7iOqOk/BGckAfvc7eInQO6D2SauvoVQxrZrxMKtvcfTBZN7tWE3V9ukAnK84DwiGzp1PArvmC7mdpq80j+zeCi8hBmcMA75/YbwajkA5gld505XLkBbl2BvH7d24GkibXGzKq0zzFJ6fc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A4ryiF8+yHlGAn2YzztJ+YzZGooCNXgntsExJUsAVS4Acjv3ormsmtYKaYkB7WziV76AVaxeY3WAPCOfQyT8qhr5DPUz3g1f6/YUjAeF+ANtkzbf6vJLZ3MxtxfqEQemo3xCiiLi6icD2i9R0+H5vYb5IdjU6GgoQIXrU1viPmpPtlDx4FvjKFTznVPgV7A3unS2ZovInEXe0Ey96AbrqyImUbaYARbT+8GCLEN6oY68Eb0+qKHD7xGOCZ1XTShG8v9tc4EZKFgkLbk8Rv0jGeDzlazwzEpHaXDCp2eVgHUgxxw4wI2XWtzMzjxHE/XzuJgopMlSJxWfVTqnmSTfrTDYC8TIzBi/84r28xNKK+fTylZxaSJ0QX8eR1MrsVzwFZb59yUpsB/4G1PuxUBu+CIY85YgcxAuB4EIIqeIgAfjNnqAPTXkBsd4u6IOjWgbBFJx69VzUshLpztWRCQMTHL72nj4wXnKucMTuFqOmPgyDKDLNcGDk4SoSg== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3440baf8-2a75-41a9-3564-08da27f0a246 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8404.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2022 01:52:49.7614 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4nX1mz5nY6nPprudy9MAqfcFHIGQAXPceoAZhU9sW5uR6ceTRRm9PE01ERIzBfNXS8ycyU29HY/arpYAc/KJ7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2589 Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org v3.x Synopsys EDAC DDR doesn't have the QOS Interrupt register, change to use the ECC Clear Register to disable the error interrupts. Fixes: f7824ded4149 ("EDAC/synopsys: Add support for version 3 of the Synopsys EDAC DDR") Signed-off-by: Sherry Sun Reviewed-by: Shubhrajyoti Datta Acked-by: Michal Simek --- Changes in V4: 1. Add Fixes tag. --- drivers/edac/synopsys_edac.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 40b1abeca856..88a481043d4c 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -865,8 +865,11 @@ static void enable_intr(struct synps_edac_priv *priv) static void disable_intr(struct synps_edac_priv *priv) { /* Disable UE/CE Interrupts */ - writel(DDR_QOSUE_MASK | DDR_QOSCE_MASK, - priv->baseaddr + DDR_QOS_IRQ_DB_OFST); + if (priv->p_data->quirks & DDR_ECC_INTR_SELF_CLEAR) + writel(0x0, priv->baseaddr + ECC_CLR_OFST); + else + writel(DDR_QOSUE_MASK | DDR_QOSCE_MASK, + priv->baseaddr + DDR_QOS_IRQ_DB_OFST); } static int setup_irq(struct mem_ctl_info *mci, From patchwork Wed Apr 27 01:51:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sherry Sun X-Patchwork-Id: 12828169 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1785C4332F for ; Wed, 27 Apr 2022 01:53:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356970AbiD0B4H (ORCPT ); Tue, 26 Apr 2022 21:56:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356867AbiD0B4G (ORCPT ); Tue, 26 Apr 2022 21:56:06 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70040.outbound.protection.outlook.com [40.107.7.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B62411659C; Tue, 26 Apr 2022 18:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g/Ma2+pi4ULVCDe02jhqjlEJjXlaENU2VWnNwcE0BBFzupuNebjrfOinf5UXy4RPDpozPeHFftc5nL5xOX9Ki5of84fufj+BmXO/Lf9xlGiXWhwtet2J2Z0eMSP6O+W87UGLq2q9lK5kHf7qXX/IKEh5jdKXiqXlupYPR5ct55sIEWqEv3bRxezLjFFmZ8HpsTWeYbEJ0/er26rMyWmLZIAL7PK4i14PUTCy/KxBktkGvNQA1C7JBTy+CTnKlpPXViUXBtk/qARwcvfqQoC10J+gq2g7USbsitWixhhXVs23oiRbmz0JY7Rzz1r7mHRs5N0c6P9ezZIFN/kDMq/RDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=m+wKst/1sn+qTXKBupU2W4Bm9FBCzK0jzmuH19KoNW4=; b=hfO9K53RBuDz4qQKBAslt0nCMowsDCUcbE8xwWpgLlv7NGy1x4BD4qIfjaELlNE4GqkEe8wKKEQy+M6O5+VYB68isjRCeMvDmQuK5GxwPKrnvjgGs531olSP+57BeU/os/Jhp9ZDfdJNa1DnCaB+mOAhN96ZbiHB+LC3LrBp6sIt4pOIFWa00D6ixVmsGYdgkQGHmp/Ovr7fHuBJesnej3D+LhQSvNf5Il06Uvl4bl5l9b5nSwt71UqOOPZzd8Uf3SJIRdK2ym17JFzNtL9tr0Z3MVE63tvaTw0ZwAhk60cTiCFXKy4GDG+WjqRTpurn3mtOjhDUjZW4kYCRHgEFTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m+wKst/1sn+qTXKBupU2W4Bm9FBCzK0jzmuH19KoNW4=; b=TDk9A1KBcekHikJpEUu1dWGdnBooyxStZSwcoxYxIEu334PXEwNqwjR9EKhE64pOA5lcq/2uxH9aKQUaEZX8n/Z5NPEPntz3iahuryUb02PsSYeNOhr41yBXHHlUZ7x7N0koZFtpZzyVEoC4+IxPlxsneJGzMaaIN/q7MKB62qg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) by VI1PR0401MB2589.eurprd04.prod.outlook.com (2603:10a6:800:4f::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.21; Wed, 27 Apr 2022 01:52:54 +0000 Received: from AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::1cff:564b:c3cf:46e6]) by AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::1cff:564b:c3cf:46e6%5]) with mapi id 15.20.5186.021; Wed, 27 Apr 2022 01:52:54 +0000 From: Sherry Sun To: bp@alien8.de, michal.simek@xilinx.com, Shubhrajyoti.datta@xilinx.com, dinguyen@kernel.org Cc: linux-edac@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-imx@nxp.com Subject: [PATCH V4 2/2] EDAC/synopsys: Re-enable the interrupts in intr_handler for v3.x Synopsys EDAC DDR Date: Wed, 27 Apr 2022 09:51:37 +0800 Message-Id: <20220427015137.8406-3-sherry.sun@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220427015137.8406-1-sherry.sun@nxp.com> References: <20220427015137.8406-1-sherry.sun@nxp.com> X-ClientProxiedBy: SI2PR01CA0002.apcprd01.prod.exchangelabs.com (2603:1096:4:191::21) To AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8a88c95-a1fa-49dc-6768-08da27f0a508 X-MS-TrafficTypeDiagnostic: VI1PR0401MB2589:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NW9TmrynY4i4KF69PbcY1/jTcNlCqGiWBL5mIsXrEtLGzOC5TMOdUMZBhlOBFqbpZImoYHNvNia0ny6TuT8Baphg5hF1EeZnH1KiDvN5skaoUFcg6t1LBL/5filRIV4TTN9MFr0Bic/QVR/K19FJqRYZxdKNdhWTQ347qJS76hEdC17v02kse/ffLp3zugZmYals1VXStNQNcjHW6f1CLWjfMlGXZz7wp+t7T9MwE/IH+Un+w/QjQZLdtz4e+msWYlmv00i4hMEUqLS8KS2ObiYO3mThZhB040KTukSUnB8l1oRLvYrKv/lQycrraiVYTWL0dnCMViipbjuZDnj9XCXSPA+/AjYQmzXC1m4s6I1l2bs3fGQF39A1qmNlB8FntlVjaUMMcAMaLpoLDHEqDSf41Qst9gq4XL3q0CZW8XbxImyve7yPgaXbVgs9TcO4JsRKFcBHtryJwbVj8PGIoBPpHAu5/INdryF50DTT60teahEUQH19lAi1JQ/aGWa5HE1iAyRFF0GDumUPJQVF54xR52LRW4IrUpf+Aj7KTs71VrvWNSSzZOKEHKhHlFqwYkpbb2cqVp8dDD4YsFE+c43CuRIdedR319yJRjjPsSjo6mum6TMcP68gz6taS6GTM0j3tckGCTDyMiyFSoUxuEiTLyRwTENU33Sat7eg3NRsvm+ekJQ8tWPcIx7TV/FIdDew4bGbsm010WGpMHhoXg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8404.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(38350700002)(2906002)(6486002)(508600001)(38100700002)(66556008)(66946007)(8676002)(4326008)(66476007)(86362001)(8936002)(44832011)(316002)(5660300002)(26005)(6512007)(83380400001)(2616005)(36756003)(186003)(6506007)(1076003)(52116002)(6666004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: k+P/HeEDXrxFJTY7ZYH+P4MAJX5uz3Xn34qmxO8Jux5Tbj7K8GpZSqS5EQBRPo5but7hTMGLOZyJAXSY1X8r7LJE0AXnteNYOLk2jkf0nJmpGN9hEfYH3Gy0APSb2ja2r7jf3qWBxXsg7GROr5ITxJ1EQoeEvOAt7V5DQpVIrc0y/GyN48uY6HAOO+XjlFjlBUJiCa42bNfAweA7Q+VxMiLdKmul/OMniKtH70G4bi8c7i0XVBtEWc1XfRLpDtiVxwMfzQypJhy8TNcF3DhVUZdTbAdgPB29LJ1Co8rRzB0wrVFvk2KoSeQJxx+fvN7/wTBT5QfxbaQHM4uRkdzikv6+RJ2+/4255ngXXyN5mbT5QITW30C8IZfba2ZfuLCJstfr6Eg66m5rcXEgstf9+yiBGmLTU0RJkAbTAMWSP6gLaAFzs2MQVwgcc1/O1PU00RCMtXJVuHxpMGud7sIvBRNbjoX1OwcZ39pvKlt+phYsFqrZrNaxYajLBg8i5gO3pB9ovh1dtw7cMiZhpEwaEknGflITMmgK6Y3aoZb9pKH4Eb2ueoOXNlqeDSTVloOwhJpG6szXwRalslOqJSJJsrUeCbe4Q2Sqr5eccLSgvMYwLu5e3dD5DgNqtBmRgA6MbY6Yz9LbjELgoD0TPAnfWHgVlVBIQ+r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== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b8a88c95-a1fa-49dc-6768-08da27f0a508 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8404.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2022 01:52:54.2178 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GkPj+7a9DDi4Fjz0akH/bH8g5A1XbUSJoFeaLvROZAyY7gzATnIjMX4V0Ir8joxJSvU3I4GFfsb/hasN0whVLw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2589 Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org zynqmp_get_error_info() writes 0 to the ECC_CLR_OFST register after an interrupt for a {un-,}correctable error is raised, which disables the error interrupts, then the interrupt handler will be called only once. Therefore, re-enable the error interrupt line at the end of intr_handler for v3.x Synopsys EDAC DDR. Fixes: f7824ded4149 ("EDAC/synopsys: Add support for version 3 of the Synopsys EDAC DDR") Signed-off-by: Sherry Sun Reviewed-by: Shubhrajyoti Datta Acked-by: Michal Simek --- Changes in V4: 1. Add Fixes tag. --- drivers/edac/synopsys_edac.c | 47 +++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 88a481043d4c..a14baeca6400 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -527,6 +527,28 @@ static void handle_error(struct mem_ctl_info *mci, struct synps_ecc_status *p) memset(p, 0, sizeof(*p)); } +static void enable_intr(struct synps_edac_priv *priv) +{ + /* Enable UE/CE Interrupts */ + if (priv->p_data->quirks & DDR_ECC_INTR_SELF_CLEAR) + writel(DDR_UE_MASK | DDR_CE_MASK, + priv->baseaddr + ECC_CLR_OFST); + else + writel(DDR_QOSUE_MASK | DDR_QOSCE_MASK, + priv->baseaddr + DDR_QOS_IRQ_EN_OFST); + +} + +static void disable_intr(struct synps_edac_priv *priv) +{ + /* Disable UE/CE Interrupts */ + if (priv->p_data->quirks & DDR_ECC_INTR_SELF_CLEAR) + writel(0x0, priv->baseaddr + ECC_CLR_OFST); + else + writel(DDR_QOSUE_MASK | DDR_QOSCE_MASK, + priv->baseaddr + DDR_QOS_IRQ_DB_OFST); +} + /** * intr_handler - Interrupt Handler for ECC interrupts. * @irq: IRQ number. @@ -568,6 +590,9 @@ static irqreturn_t intr_handler(int irq, void *dev_id) /* v3.0 of the controller does not have this register */ if (!(priv->p_data->quirks & DDR_ECC_INTR_SELF_CLEAR)) writel(regval, priv->baseaddr + DDR_QOS_IRQ_STAT_OFST); + else + enable_intr(priv); + return IRQ_HANDLED; } @@ -850,28 +875,6 @@ static void mc_init(struct mem_ctl_info *mci, struct platform_device *pdev) init_csrows(mci); } -static void enable_intr(struct synps_edac_priv *priv) -{ - /* Enable UE/CE Interrupts */ - if (priv->p_data->quirks & DDR_ECC_INTR_SELF_CLEAR) - writel(DDR_UE_MASK | DDR_CE_MASK, - priv->baseaddr + ECC_CLR_OFST); - else - writel(DDR_QOSUE_MASK | DDR_QOSCE_MASK, - priv->baseaddr + DDR_QOS_IRQ_EN_OFST); - -} - -static void disable_intr(struct synps_edac_priv *priv) -{ - /* Disable UE/CE Interrupts */ - if (priv->p_data->quirks & DDR_ECC_INTR_SELF_CLEAR) - writel(0x0, priv->baseaddr + ECC_CLR_OFST); - else - writel(DDR_QOSUE_MASK | DDR_QOSCE_MASK, - priv->baseaddr + DDR_QOS_IRQ_DB_OFST); -} - static int setup_irq(struct mem_ctl_info *mci, struct platform_device *pdev) {