Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2284273ybl; Sun, 19 Jan 2020 23:32:00 -0800 (PST) X-Google-Smtp-Source: APXvYqyGxzBYGB1sdd3rcBPjvWh554bQnvMswo5/YpQzIee4uuTS1X5qvGva25VhiwJqN/MScLkh X-Received: by 2002:aca:b943:: with SMTP id j64mr12273400oif.155.1579505520590; Sun, 19 Jan 2020 23:32:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579505520; cv=none; d=google.com; s=arc-20160816; b=DdcvphViRP7/aNn1vzwCKFjM/a8NgdHsnHfFMJkKPV6WHf8B4dZFcZTPq+S7d2ouYr +pBKtI5PlZbfTR/KYFoeCWEMEq+j6Hd52diycPX/AydMyQScNVksNlXT7yCU4OGQAAV/ NNQ+UFRdSMd7n87jbtE1eua0WhBCneFH7jHjvxd77BifZ82ZkzoBoZuTafib3F7xmfa8 GlAsK69GiPmdukfmoFaaNBs27vqxBicbkISoiLbehvhAjoWLacaCX3Hvq75MmDX+jFMl glUa3ma2x4X5LvMx+rDVRwnL1Co67vx6+kbiX4AzDTzSFSjWScThseE1sIhEpRLHwroP m8pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=hfGlvbAdvvqu2Sny4AcpjMOMs415iN7uvXKOHwtI7YM=; b=nJMJuLKbrXchwoguTfKTv+oumDsNmc9nbWza0BB6dllXC21FJzU0O1u6+rYlBGeWT+ +KqdlcduFlrvriN1cUQr14YsoX/Q51rZo52wGkrs6+YylCUIm/AkTdVMBYs4gDmd5JBD S7j5nMWAgF68k6yshgynT9vNrDEjqwT7nNZ1Box0EzNF+N1h/COsb5/C4oymOZHG4YZU TBUnOa10aLGhkl7g6MRH16A02Ri+d/ThLd0r2kpABqgYMbdFIgtZqHjvhPHs91D8q7pb bb4GIWp4zVSyWRPUWS3NrT49k0RZmh3XSCi2g0+zdcq9n1mfnowZk6SdzcJD/Pz4d5nE qQhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u16si19213386otq.92.2020.01.19.23.31.23; Sun, 19 Jan 2020 23:32:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726400AbgATHaU (ORCPT + 99 others); Mon, 20 Jan 2020 02:30:20 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:42988 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726148AbgATHaU (ORCPT ); Mon, 20 Jan 2020 02:30:20 -0500 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C643B1FAA91938B1C091; Mon, 20 Jan 2020 15:30:17 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Mon, 20 Jan 2020 15:30:12 +0800 From: Shukun Tan To: , CC: , Subject: [PATCH 2/4] crypto: hisilicon: Configure zip RAS error type Date: Mon, 20 Jan 2020 15:30:07 +0800 Message-ID: <1579505409-3776-3-git-send-email-tanshukun1@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1579505409-3776-1-git-send-email-tanshukun1@huawei.com> References: <1579505409-3776-1-git-send-email-tanshukun1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Configure zip RAS error type in error handle initialization, Where ECC 1bit is configured as CE error, others are NFE. Signed-off-by: Shukun Tan Reviewed-by: Zhou Wang --- drivers/crypto/hisilicon/zip/zip_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/crypto/hisilicon/zip/zip_main.c b/drivers/crypto/hisilicon/zip/zip_main.c index 4f60b93..ec2408e 100644 --- a/drivers/crypto/hisilicon/zip/zip_main.c +++ b/drivers/crypto/hisilicon/zip/zip_main.c @@ -64,6 +64,10 @@ #define HZIP_CORE_INT_STATUS 0x3010AC #define HZIP_CORE_INT_STATUS_M_ECC BIT(1) #define HZIP_CORE_SRAM_ECC_ERR_INFO 0x301148 +#define HZIP_CORE_INT_RAS_CE_ENB 0x301160 +#define HZIP_CORE_INT_RAS_NFE_ENB 0x301164 +#define HZIP_CORE_INT_RAS_FE_ENB 0x301168 +#define HZIP_CORE_INT_RAS_NFE_ENABLE 0x7FE #define SRAM_ECC_ERR_NUM_SHIFT 16 #define SRAM_ECC_ERR_ADDR_SHIFT 24 #define HZIP_CORE_INT_MASK_ALL GENMASK(10, 0) @@ -378,6 +382,12 @@ static void hisi_zip_hw_error_enable(struct hisi_qm *qm) /* clear ZIP hw error source if having */ writel(HZIP_CORE_INT_MASK_ALL, qm->io_base + HZIP_CORE_INT_SOURCE); + /* configure error type */ + writel(0x1, qm->io_base + HZIP_CORE_INT_RAS_CE_ENB); + writel(0x0, qm->io_base + HZIP_CORE_INT_RAS_FE_ENB); + writel(HZIP_CORE_INT_RAS_NFE_ENABLE, + qm->io_base + HZIP_CORE_INT_RAS_NFE_ENB); + /* enable ZIP hw error interrupts */ writel(0, qm->io_base + HZIP_CORE_INT_MASK_REG); } -- 2.7.4