From patchwork Mon Aug 7 07:39:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 9884659 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 A9B1560363 for ; Mon, 7 Aug 2017 08:11:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A29C285D1 for ; Mon, 7 Aug 2017 08:11:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8EB9A285DD; Mon, 7 Aug 2017 08:11:06 +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 33FD6285DA for ; Mon, 7 Aug 2017 08:11:05 +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=3bmaA4vNpqs4fVjVlLL9jIUEE4/SwHp/1QXR2oxhqu4=; b=pZYK/L6r29Ics5uis/Hzvkf+SD PXX7Jaa7vsJ7XqHJ2iNWe+kKTJ402eX/gJg/cr46OeiEuuEDKJSTIgkXczrB56H6JMXK/kc0UbyAj 77RlWZdVeERf/Lr48mmWwTjdOzrJ4jHn8J4gehGW8MAtGBMUruielqVLwagynihbdJQ8Lv5ICQlPl nZAtsaFkM3ZjROH+iEm3I/BNpWqU5mq8hXvmjEWb5+AarWZjvTc6c+TAgpXOJ23cEvrnI1WKWtVDP ZmaHBSi62nOZke+s9ZtzDeUYhUQckEMtGsOPwTlTHSu/4phwudM60UbNqHUZ7zTST4OJ3e5cfj7Aj bJ8mNMsA==; 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 1ded7w-0007lo-20; Mon, 07 Aug 2017 08:11:04 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1decdu-0000IW-2m for linux-arm-kernel@lists.infradead.org; Mon, 07 Aug 2017 07:40:04 +0000 Received: by mail-wm0-x243.google.com with SMTP id x64so53234wmg.1 for ; Mon, 07 Aug 2017 00:39:41 -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=afp9K32kDYIKzSB+6/qUecCm3UoG9Aj3UKUzTZEdU6c=; b=Aq/tBZNS7wtrrNCncI1yyvhEOtC2Z3siYJa/LJWtO8X9M9MWtvYi4YcaHhEwYkXLFl QQFq/4Wb754ecpbs12oMWEU8RWiH9N2VyTLYWD09s6tgd6kYmLPWSN8Geg/MA/QHzjYp dnpzlqUTiPAr1iRZ8LV6phrEGgyOBb90/vlQwiv+MpqzPL0CeyLV0WHw4QGfnzn5m4xK YcIGfot5Zq+TMbrMroFPgmHp2+2+vY4iktyZb6ZUQbSOqzEQ6y96g+CvQjp+ndxavItE W8lCImKjFoHNQOYpUD8rMRlcU/3y6ua29PJ8OhtZiyFuqycUif2fL+a14F/7IcBduv// 8Q4g== 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=afp9K32kDYIKzSB+6/qUecCm3UoG9Aj3UKUzTZEdU6c=; b=YSg9Ng/pOyBsR34W8xQLVbj5e2LSalTNgl+PyXFJcL6p/WxuObar2uXmVbZ7cu2ziD VP+fqzMlmFfBV9bcxnpEOqqdTVIo+Pe3cXgXa0cd3wRAWRvRaH1zg1GKbyz/wHwX5VUR ANaDD3lnewT0RrnzpADWsmdvEa/VzN44jJDFqbkiRy8+qGVa2JiTgo/5AQWBAVKfflN0 vDrBrJlaqmuNNID34mslvOlgkaeoMU7CSYYGwPxVFuScI0gQRWfVvmMMMmiHIKaLVaPZ VDgThKeN45UDDYS54aByTuQPHlS7eI34jtkJ4WcKDpWA6lkA/+RyXgzXbtJGQWywrswE R0fw== X-Gm-Message-State: AHYfb5hPEINICLFW6gAdb/aipp7bX8MCJ62rFmHpkz94jGUJZEYec/Lt 0/OkucAAo3yqUCePuwc= X-Received: by 10.28.96.86 with SMTP id u83mr35695wmb.48.1502091580329; Mon, 07 Aug 2017 00:39:40 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id z7sm6451111wrg.74.2017.08.07.00.39.39 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 07 Aug 2017 00:39:39 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu Subject: [PATCH v2 6/6] edac: synopsys: Enable CE and UE interrupts for ZynqMP DDRC Date: Mon, 7 Aug 2017 09:39:28 +0200 Message-Id: <01ba1fac5b05242546c4d97dbe9a2800c1019cd8.1502091561.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <91fd6532076e4c905b5a228d852bba4941c54a28.1502091561.git.michal.simek@xilinx.com> References: <91fd6532076e4c905b5a228d852bba4941c54a28.1502091561.git.michal.simek@xilinx.com> In-Reply-To: <91fd6532076e4c905b5a228d852bba4941c54a28.1502091561.git.michal.simek@xilinx.com> References: <91fd6532076e4c905b5a228d852bba4941c54a28.1502091561.git.michal.simek@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170807_004002_594372_419A645B X-CRM114-Status: GOOD ( 10.42 ) 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 --- Changes in v2: - Fix function alignment - Fix macro indentation 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 24490334a4f2..f185a28d2db3 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 @@ -1112,6 +1114,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); @@ -1154,6 +1160,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);