Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp258629rdf; Thu, 2 Nov 2023 22:33:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGG0HtB+6OAopamHbae6tENg4wOwkvu2SwxvbCB2frVbfiyLh1zUIuZZw9w3AJU09yXcOV/ X-Received: by 2002:a17:903:2282:b0:1cc:6ace:e427 with SMTP id b2-20020a170903228200b001cc6acee427mr11048709plh.5.1698989631027; Thu, 02 Nov 2023 22:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698989631; cv=none; d=google.com; s=arc-20160816; b=a2uxHn9DPUcat5XDqPcgem/ciMPVXxYdn1AqfvF2LVcWBDMkzu/N/qi55RsJopRU/s A9UHbFwzEHE11depcgrQl880S/rdJcK2VNT2tsdOSpu1UTBpjZx7PbsFG4p18OpvuAwH gZJYPrNdR1PEuu1O1fOxw+oCJWL5AZTHE5dKxxMpAjYEG3aMP5tXCNYx/YthvaDotRUj XtadIWoaMbhqgMxBJcARA4W8y3uDKuFx3tPw5ZlifLicJB5YJV/hkzIWOYftryrBFCE9 UmXMbX6LbjKDvOMGEN+A2JeV3uOfkEJf0G8vPZGRhvJcY5QhRY3cOdeyozyUPhnbX5zD 4R0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UReJLMLrvpJIa4FY1T75cC81B7xyCL36z25xAsooeqc=; fh=SuRqZAnjbtSU8TpUTRvHG2OWeUeVGcL9zy4cGyCdhfo=; b=g/yL7lBWo9c8suHMgnAg9tPpsBEP+WGNsEQelOVVUrWPVQZokBmc5TnB45UldRSbJ9 yQf9xmCwmRvVVrbcRsbQcDZhMQUR86uBzcTVMzDzot4wDC5Ao9PYVX28PhsxnDYyqGX2 NsMVC8VxQ4hMmiz4icJNQYtf4U/bhvaLm/nrwdKGI5LQZkHf7VgaFpYNKn9i+eyvIhV/ YVrHyNQ5kQ7WzUNT3ENPvcn3qs2IM3Zk1gz51nMk1pb69UC/e0cPT811dprTG2fMaHU3 196rU2vhl+wnjpqxGjXOK+1WlDQ9XO02v5QyaHGM4yJ6q1p8TxGl7zj9fT00qej/T+JA mRBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=KBzYBERU; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q11-20020a170902dacb00b001ca119ef46csi890832plx.478.2023.11.02.22.33.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 22:33:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=KBzYBERU; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=marvell.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4AD5F825549B; Thu, 2 Nov 2023 22:33:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230005AbjKCFdh (ORCPT + 99 others); Fri, 3 Nov 2023 01:33:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjKCFdg (ORCPT ); Fri, 3 Nov 2023 01:33:36 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFFF71AD; Thu, 2 Nov 2023 22:33:32 -0700 (PDT) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3A2Ls1h0012385; Thu, 2 Nov 2023 22:33:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=UReJLMLrvpJIa4FY1T75cC81B7xyCL36z25xAsooeqc=; b=KBzYBERUqyPLv09zJTmVwlH/8aSqrzWRRH2xISuN9VYsMTvi477PuWy6/Dh0p60AYhSP 2flmh7Vx8AVm8ft06L51+638MQdk4BRUBHdPDSCqK/0nbz+eUUqP79P/CAtEwu7SY8QA hPIgvSPbivOnwn9Vm4QbtwNHkHamD9QP/uLImrFspTNQHJ1Cn3/7i/wMvHurO37rCtJ3 44Zg+nau1tvkeTp/hlVu408537mwImhv1oDvf4pTQi/M+ZRX2Xfjh7PY8bNjLdkD0kDX NrvSS8kqB8TCXDxbdyf/CsoWfKeCfAou5cA9eBu1dwlmOjNYiKrLpN8FApF493AUqfgn Kw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3u4m34980w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 02 Nov 2023 22:33:16 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 2 Nov 2023 22:33:14 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Thu, 2 Nov 2023 22:33:14 -0700 Received: from localhost.localdomain (unknown [10.28.36.175]) by maili.marvell.com (Postfix) with ESMTP id 590C83F7057; Thu, 2 Nov 2023 22:33:11 -0700 (PDT) From: Srujana Challa To: , CC: , , , , , , , , Subject: [PATCH v1 01/10] crypto: octeontx2: remove CPT block reset Date: Fri, 3 Nov 2023 11:02:57 +0530 Message-ID: <20231103053306.2259753-2-schalla@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231103053306.2259753-1-schalla@marvell.com> References: <20231103053306.2259753-1-schalla@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: nCuRpvPT4pSQO_aoFIjVQTeLPhTfIAtE X-Proofpoint-GUID: nCuRpvPT4pSQO_aoFIjVQTeLPhTfIAtE X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-03_05,2023-11-02_03,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 22:33:46 -0700 (PDT) CPT block reset in CPT PF erase all the CPT configuration which is done in AF driver init. So, remove CPT block reset from CPT PF as it is also being done in AF init and not required in PF. Signed-off-by: Srujana Challa --- .../marvell/octeontx2/otx2_cptpf_main.c | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c index e34223daa327..5436b0d3685c 100644 --- a/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c +++ b/drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c @@ -587,45 +587,6 @@ static int cpt_is_pf_usable(struct otx2_cptpf_dev *cptpf) return 0; } -static int cptx_device_reset(struct otx2_cptpf_dev *cptpf, int blkaddr) -{ - int timeout = 10, ret; - u64 reg = 0; - - ret = otx2_cpt_write_af_reg(&cptpf->afpf_mbox, cptpf->pdev, - CPT_AF_BLK_RST, 0x1, blkaddr); - if (ret) - return ret; - - do { - ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, cptpf->pdev, - CPT_AF_BLK_RST, ®, blkaddr); - if (ret) - return ret; - - if (!((reg >> 63) & 0x1)) - break; - - usleep_range(10000, 20000); - if (timeout-- < 0) - return -EBUSY; - } while (1); - - return ret; -} - -static int cptpf_device_reset(struct otx2_cptpf_dev *cptpf) -{ - int ret = 0; - - if (cptpf->has_cpt1) { - ret = cptx_device_reset(cptpf, BLKADDR_CPT1); - if (ret) - return ret; - } - return cptx_device_reset(cptpf, BLKADDR_CPT0); -} - static void cptpf_check_block_implemented(struct otx2_cptpf_dev *cptpf) { u64 cfg; @@ -643,10 +604,6 @@ static int cptpf_device_init(struct otx2_cptpf_dev *cptpf) /* check if 'implemented' bit is set for block BLKADDR_CPT1 */ cptpf_check_block_implemented(cptpf); - /* Reset the CPT PF device */ - ret = cptpf_device_reset(cptpf); - if (ret) - return ret; /* Get number of SE, IE and AE engines */ ret = otx2_cpt_read_af_reg(&cptpf->afpf_mbox, cptpf->pdev, -- 2.25.1