From patchwork Fri Aug 4 12:00:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 9881091 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B5F4F6031B for ; Fri, 4 Aug 2017 12:01:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9582528998 for ; Fri, 4 Aug 2017 12:01:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A822289D5; Fri, 4 Aug 2017 12:01:58 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 13BFA28998 for ; Fri, 4 Aug 2017 12:01:58 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=J1KK5UJ8c25UUynzPMcruHwRWq0FLiuEAafGUMEx7bM=; b=VpulAgeRmvgDCWTwdBlrGvSlCS lj4LGy/HCqkAmZeEYcKFTBVkbBPrTU3laS7OMzXcy5LCClZdqcTDGvJeOoWJwQ82gdJwTV7E6YVWI IFu3UJkxeV4I57RDxasbsBLPeIh9GTF74dvkcewfTbv4J1AkpfX0iHfIaxaYMvOr0XKvpQCFiC1Nd 2rEU7Ms6emqC6BgkzL1AHA28L4pn858edRBRYE5VOszoJTCNM0VJzAlEcN/eoIWM9gNKhKKj0ZHwQ znHYxY80+W/mewFjF+DCwiP5srQh0JgLrDuSNh7iZHoLk75E6nCThJKMHyIQK1b+i1Ilj2VSTXFAs 2j+ra7pw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ddbIg-0003kk-OS; Fri, 04 Aug 2017 12:01:54 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ddbHi-0002fb-Ep for linux-arm-kernel@lists.infradead.org; Fri, 04 Aug 2017 12:01:15 +0000 Received: by mail-wr0-x244.google.com with SMTP id y43so2854942wrd.0 for ; Fri, 04 Aug 2017 05:00:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=LtRxVacP2VOcwHMpjXMOmZFUGJYz8oAKxZaIQ9c/jmE=; b=nM0/YjN7uqd/k5PUKD+a+yZyR1JX7UOkoWoYB5oiRUZS5Gj7G6YLSaqMQwbJyE9Y95 NPRSOr0UhwU726cWLW+pZEId5nZmGzToTSpfiFNFDnN5fSmqkrq4eIOq0fotKc9SOGP9 XIY64tMHssVl4Qv3iErcgOmXRSg9W41tULTo4zvNDMmcicUqgcNHKgmW3kyAjTBoqbRJ ZTzSIPNS//mjgXbWOOKkedmRwvm6hvEYBtdZumc1TeEJiG+my+ek2/cX3ctdLCVlf8za E17TQn+m3nNcuhTQuUsbODpsv6TGW3tmKDdF1IM8rG0zsWEe3MAfBDjlGNpcuhDWEV+O k3+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=LtRxVacP2VOcwHMpjXMOmZFUGJYz8oAKxZaIQ9c/jmE=; b=Hww64wGsFUrNvzEHfoOAOOophxVqynRqZ2/Tnnjcan8zYvBp16J0dihmTQfDAhfTOO eMhTE7+gCLmtFtTWJwIY5NySi6ar4JkdDgs7k0HMjORhBsdFhagkXH2a1vrd6Ssfuz9v XIEpR+vZK6bk3e7yTK4y0gGX51cnxWjRa/xcb3GR+Hmm7S2a4VLUvdQLxImGB+Bp2pRv ICNeRtaoHeJmUpv6c2K856LlQggRfIj3FrwqWjT1AaL5gIJvM5NTCvkd9Lc+hkpJxG5t uyMVugOm81YLRzjFPHWTcZwfDVfwcRg0S/mQdI7c1drL4VpWMGHAZObo25Zb9RuTLUT6 8Zpw== X-Gm-Message-State: AIVw113xSJMK4kI7T2uqgvI9yQCPrqV5959GCcw2PwecJosL/j6Y2TBo LGQARYa0EsEU3853 X-Received: by 10.223.167.73 with SMTP id e9mr1451476wrd.205.1501848035925; Fri, 04 Aug 2017 05:00:35 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id b70sm2861593wmd.25.2017.08.04.05.00.34 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 04 Aug 2017 05:00:34 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu Subject: [PATCH 5/5] edac: synopsys: Enable CE and UE interrupts for ZynqMP DDRC Date: Fri, 4 Aug 2017 14:00:27 +0200 Message-Id: <52a6d49d3daf5de37a41c4a3b2e84072dc84ca2e.1501848023.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <60ff19f90adfd252cf296fe8988c614c4c3e43fd.1501848023.git.michal.simek@xilinx.com> References: <60ff19f90adfd252cf296fe8988c614c4c3e43fd.1501848023.git.michal.simek@xilinx.com> In-Reply-To: <60ff19f90adfd252cf296fe8988c614c4c3e43fd.1501848023.git.michal.simek@xilinx.com> References: <60ff19f90adfd252cf296fe8988c614c4c3e43fd.1501848023.git.michal.simek@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170804_050055_221970_9235F6C3 X-CRM114-Status: UNSURE ( 9.62 ) 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: Naga Sureshkumar Relli , Borislav Petkov , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org MIME-Version: 1.0 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 From: Naga Sureshkumar Relli This patch enables Corrected and Uncorrected Error interrupts for ZynqMP DDRC controller Signed-off-by: Naga Sureshkumar Relli Reviewed-by: Punnaiah Choudary Kalluri Signed-off-by: Michal Simek --- drivers/edac/synopsys_edac.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index 501ef447df37..6ce2f4c4cb3d 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -165,6 +165,8 @@ #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 @@ -1115,6 +1117,10 @@ static int synps_edac_mc_probe(struct platform_device *pdev) edac_printk(KERN_ERR, EDAC_MC, "Failed to request Irq\n"); goto free_edac_mc; } + + /* Enable UE/CE Interrupts */ + writel((DDR_QOSUE_MASK | DDR_QOSCE_MASK), + priv->baseaddr + DDR_QOS_IRQ_EN_OFST); } rc = edac_mc_add_mc(mci); @@ -1157,6 +1163,10 @@ static int synps_edac_mc_remove(struct platform_device *pdev) struct synps_edac_priv *priv; priv = mci->pvt_info; + if (priv->p_data->quirks & DDR_ECC_INTR_SUPPORT) + /* Disable UE/CE Interrupts */ + writel((DDR_QOSUE_MASK | DDR_QOSCE_MASK), + priv->baseaddr + DDR_QOS_IRQ_DB_OFST); edac_mc_del_mc(&pdev->dev); if (priv->p_data->quirks & DDR_ECC_DATA_POISON_SUPPORT) synps_edac_remove_sysfs_attributes(mci);