From patchwork Thu Apr 21 01:53:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sherry Sun X-Patchwork-Id: 12820996 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F187C433EF for ; Thu, 21 Apr 2022 01:58:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OT9fCTRSrEju0xBq2NkVhgfqyum6PixHZBS6XKIdiA4=; b=laTAnWfi8z40NF 9g4QO8pVbGwz9t6acJWNaLu9ZmR4prqWgeEm2nYBso5XkrcQJDtOVxbvDq4BErQifhwhlOAOK39jo wmuIskVrHmg5gmS3ZOvzFPrhaW2OfVPHNhrPUQ14Ch+4GTvgg2pHZZfkXhtUFAwsWztvNju08m7mJ KhNiSiRky/NAR6X5WdZlXCGixb6KtltgeXmLFefVmU65DEMtBIHnyyeA6VBjUQLBjYcSyXcIib7s/ ELcOrf1PeKlz2+8s16sjb2wVGEAD0DUQmCE8Uhq0Nbfy9V4kQ8Q4JtAMrqk21vFPVHNR5ChhW316O Itb47TGEEUoIyOzn7Hsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhM3t-00B4Ve-Cu; Thu, 21 Apr 2022 01:56:49 +0000 Received: from mail-dbaeur03on20617.outbound.protection.outlook.com ([2a01:111:f400:fe1a::617] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhM3q-00B4Tq-Fl for linux-arm-kernel@lists.infradead.org; Thu, 21 Apr 2022 01:56:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c9tbXuSd6zHGBRDXf2+0EUvoRB9QKcmdNSNq/83MLps9n6cMpXIKnYtGX0G1VrfaxMC3inHZ0+lnLFqakmSkg9UtA30X6u4bFng9YNz3MWJ0T9N2HjOH38PwBhOP7h03uGfP1tEiSMSwtrs+mS94XFlC5eS94SgiUI3+LnZdjKBgPJGiEAAvs8m5iRmBxDnOI8wOkmQSzZMfxMrDY6vzbtezAxOp6crV64cKM4zofJtHnEQ9td0EhtRyFUOdVE69/DW5ZE/rska0NnSzLe1EjuBdcWGBdoCE4CVc8YwSwpEOoy3LiiZ6wJw84jzNLIpnM5Z2ZE3l4TWXU6l8mPGpcQ== 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=dmedbkzsrtNbfac0i1cx10rR+ThhukgbfoNnb24Ofbo=; b=E5/TjHaOBHGbIU8XNlPNbNojOSf2X+aRH/Zl5cqat+aYBbrGDTylhc6ldHZbF3bdsdXIkY+isya3BtynCRIs6u91mMRYhoFIqdDRR02MCK/87uOZL9MZMFWqEyhkWK6LnHB0kAtvAU1PFj3dD+j8AHd4OLJcCkZYJ+weQrwH8Kw5oi3jYU+j4iIjDIaQgZ4qRe6uYMO3H5g3mqWsyoKiO+3qjfeCsmAu9XLzMzIlmwa1OsgmWI6DfIRCYxbuFAbtucyW0b+nww/69xzMXllw+ujVUwra8g8felXm9r+6Xz1fCq3DCjvkqQp5/Y2i0hIxDcWzo8hjCRBUmmAGi4iaJQ== 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=dmedbkzsrtNbfac0i1cx10rR+ThhukgbfoNnb24Ofbo=; b=HCeZ/8niAK3xOxddNYZ09o+cOc7Q/WYClxRLwtkrnoSY0jT/aLVg118c2zs++24yT+HnQlL8uRL6SS1kewRukE0jjYC6KPMfMNcBt/rmHttsm6GRYacq3rPdtxQEZsJEb5IbtGFpUAJde650eHt8ZPq+ikvRm5jeEraJob6HUPQ= 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 DBBPR04MB7564.eurprd04.prod.outlook.com (2603:10a6:10:1f7::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Thu, 21 Apr 2022 01:56:43 +0000 Received: from AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::55a2:d9e8:2c99:1433]) by AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::55a2:d9e8:2c99:1433%4]) with mapi id 15.20.5186.013; Thu, 21 Apr 2022 01:56:43 +0000 From: Sherry Sun To: michal.simek@xilinx.com, bp@alien8.de, Shubhrajyoti.datta@xilinx.com, mchehab@kernel.org, tony.luck@intel.com, james.morse@arm.com, rric@kernel.org Cc: linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com Subject: [PATCH V2 1/2] EDAC: synopsys: Add disable_intr support for V3.X Synopsys EDAC DDR Date: Thu, 21 Apr 2022 09:53:12 +0800 Message-Id: <20220421015313.5747-2-sherry.sun@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220421015313.5747-1-sherry.sun@nxp.com> References: <20220421015313.5747-1-sherry.sun@nxp.com> X-ClientProxiedBy: SI2PR02CA0009.apcprd02.prod.outlook.com (2603:1096:4:194::11) 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: 721845a6-4a9d-48f0-c772-08da233a2f02 X-MS-TrafficTypeDiagnostic: DBBPR04MB7564: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: YV2niFcFm7ht+2M0TjEESft1kS894NFxGeXyqhh1kYI7wXzsoovDGNJOiFvt0WdPUrtB8bWPg0hnJATxmd1Mx20NaJN3NE2z1jxsJbac5vAowX2Eo8dcswR5NmvGzrgRMFJ/qRerZvcZRvyJByZqiF7GEFivc9oqADgMPfqI9JfiuL/dKQUwMsrifO+gCX8Fb1QtKSZiUxNRi7EBcXXixdoN3F3U8DYxrJuZwnVEIm0vbhz4oiSgOnu0N8KbwKugkGCEAUQcYhvOGK9jUxOYzgkCkCzSqF23eeVdaBx7Q8dsZHmaSbUZSqyAeXiJ9wlU7GEuRlUaSQjgBcyg6W+enCLT5/4xwLrXjSE/y8MlDLXAKEo6Pxuo03EnxyhJbipm1oJsgA05C5ZWBe9XT3phdTV5O7xxbXK2zMnpEBKXX799gwQjTnysdt55NqeNUxTwha+GmaKmxFrGwTKGaUVW1wXhwZqV0mAuPZTOs3weRDWJ6V8iSXekp2XC20+IWC2LiSPw/fSdIu3YWk8GEGZtAmc+j7W5Tjd/znaLzKeZNEPv6UzCUm88p00869i8nOp4hQYqG2QznajjKrfHBNa49SAhVYy+yE/G5VyhKpBqRWCDIqtXkmy6HfXwPYSjGF+WJVLteVbLZfjTrDMOQAenbdHJGv4rIbxs/ntU4LS/wKk9fdL7qxtpPHmapY20u7kpCj5FxznLOH95NPId3Q0Z0Hm9PWLoU70akxVlYUpBM59Wl6PVCv8OOFuDerI+2J8Q 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)(86362001)(7416002)(38100700002)(38350700002)(508600001)(8936002)(5660300002)(6486002)(316002)(52116002)(6506007)(4326008)(8676002)(66476007)(66556008)(66946007)(6666004)(186003)(36756003)(83380400001)(2906002)(2616005)(6512007)(26005)(44832011)(1076003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OLKt1ErevKOs/2CQyvLdFxDBVRKWv39hSemhsDoYAYV4cmjxZz+Lg1uBAVh2oaicQEh01aEmCkjxg61naainIPbPB7IT+rQHrmjLmMPGCb3PS06/rdmVji7oX3ZnXWXmnENMW4n3Ov1PX/baVv76bGqoaFUpkUYtiO0OG1u+bD4KSIDgsAf/ZwSTQNjVy6wBjvc5HdoS2BQ6DAOWCKMBFyZ4Dm4F2/BTkcHbJaanOFQtwvLTGqYq6BAmd3t/IZPZ4aFQoqu75S4h58u5bc35uHgr/mEsXDgOHlu5DARV20f12+bjBQHyP0UR4LyLWrJ3VAZhPuu1VIt7i+PvUHKjHyGwbORKR8FC6QQpbj9qL9ZqGhpi6pV4IZAWo2IbTREt8ZPgmKmkX6xp3dpVY+sh3D+YcxLvGAttgIqsoG/iCOS10TNM04UbZxAC5oa3UQacUSfc5S7jhrckYmt4/agvKZfB8ghJ7Z/8jEmEKPPEcfExnoT7lRL4nSLr3N8F7D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3G0g/M9VvqkzRGs3gngqqIq+PKTycxHx1OWk4Rm/vtyrE/E68kXTU5fj/QQoT8Xm5YsXN2sJkAqxyBmQ+BRDT0nQTzFJPRUqH4+zS8rRjNye4NAPJAL9dqqKFMEqA22azx9fueq5jYi0RBmtrOdgj/1HD22xuA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 721845a6-4a9d-48f0-c772-08da233a2f02 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8404.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2022 01:56:43.2945 (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: BJfY5N8AZXihtLjWFKYSgdu2k+kxvO/WalD5NdUkmQZGhaUtbSOD+uvOJoYRKtux2Jc1B2ZAluuOZlSvBoTDgg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7564 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220420_185646_578665_8D6663F2 X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org V3.X Synopsys EDAC DDR doesn't have the QOS Interrupt register, need to change to use the ECC Clear Register to disable the interrupts. Signed-off-by: Sherry Sun Reviewed-by: Shubhrajyoti Datta Acked-by: Michal Simek --- Changes in V2: 1. Add the Reviewed-by and Acked-by 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,