Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2320786rdg; Sun, 15 Oct 2023 23:50:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOnz2D1UKNHlVrmGKkwwtNtwmW6hMQX9vXfWMOpnICUdaI2jfdx/BQbT584KPV08Ybn40y X-Received: by 2002:a05:6870:889f:b0:1d6:567c:deb4 with SMTP id m31-20020a056870889f00b001d6567cdeb4mr37589924oam.42.1697439021777; Sun, 15 Oct 2023 23:50:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697439021; cv=none; d=google.com; s=arc-20160816; b=ru2brcXYZh8QoRBJUE9P/hklsUEKeawoXw9gLuoauBo+2c8EPQi4TpjQNQSvh33XUe cYcqxeVNJzqtvDf5AZVLKYN0OEAQ9O0NtvS4Psidl1L46PRK/4vNsdWLonve7O6QIPci f93e6/+H+zZ7+n7cvq23I108rO9xjqtQaXoYRMf499jiTFPywKDPiwvSCS68yrTNciIB lELFwGXWcy6w4LG9Uu7TCzdRXvsfEPmBuxPO3aHoSCuF2qz5EzOxVpO2XHkzFm6QBtx+ TAk2g7/MNQT7XjiLoljhuL3XX6lbZj0ospPZ4zXFQr7s8kvRe0+mjG7RqsGwCRwIiafx BxzQ== 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=R/6LDKfsTOgzJjDqyAcsT+eAiz3c+ZCuar/i7kkuDOg=; b=cjH4uCSV/FQnm5Y+8JtLt9rCTEm9zFDaJXIKj66J4WBeRqajesvgx9He5o901InXKk H5NhkYlsdEpiynZAZFHC6eFGwZhzKo6EuJDLWAPCZWFVhVzS2xuEecOrx8R5mGhBKv4b eBZp4TFdN66WCbmF2EL08yJ+Ux82pZFzj2XesMDfnJ5iIHhQYVybJjbsGDpNlYDQVvto j0aQiIHXruSrHidFQEn9WnCcDSB5rwcfJ7cIxt72jDntutu/Jese4g2HafDE9jWvbPAM 2+x2NwXT6ALsY4YRNL3gkOzxRONV76549T8B6v1doETRMAo3Mldm8sP+ClTuafjcQ8Uz sqlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=O+OBkrup; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id r76-20020a632b4f000000b005acf91427cfsi6807625pgr.628.2023.10.15.23.50.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 23:50:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@marvell.com header.s=pfpt0220 header.b=O+OBkrup; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 1B1D08031D12; Sun, 15 Oct 2023 23:50:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229478AbjJPGuB (ORCPT + 99 others); Mon, 16 Oct 2023 02:50:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbjJPGuA (ORCPT ); Mon, 16 Oct 2023 02:50:00 -0400 Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10BB1C5 for ; Sun, 15 Oct 2023 23:49:59 -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 39FMpvtJ000575; Sun, 15 Oct 2023 23:49:44 -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=O+OBkrup9FSN8T8yozjQVVJOk+tALzCdCJSZF8Z0bAd8Jo4xcSZpPiiLntp44nGArPsJ gQ52xKDb34XVtO/UtpVT1uZQH5nQuZHP+9K4zmNJBoGz5EFDSFimRsom3FlYrxN4xwYh CZz/5va04nrzpDsTMGoN4XtW0Xx9dxfZZ5TAiuP1f43egR2N2VjxXZP+mn1AB6XOmZrd PaYNauk7mDDpKX4+w/KmrI3yBs4foQEjd78yXKlrLwIP7kvS/0MFUtc/5JOjSC+CVGN1 zbIW5QoomwjknWhQFtuMF+dYWSoJcx4Zbccx8u+BOst2FnPsxbZ3/v6RC0R1pcGm8O/1 8A== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3tqtgkm927-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 15 Oct 2023 23:49:44 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 15 Oct 2023 23:49:41 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sun, 15 Oct 2023 23:49:41 -0700 Received: from localhost.localdomain (unknown [10.28.36.175]) by maili.marvell.com (Postfix) with ESMTP id 1ECF43F705B; Sun, 15 Oct 2023 23:49:38 -0700 (PDT) From: Srujana Challa To: , CC: , , , , , Subject: [PATCH 01/10] crypto: octeontx2: remove CPT block reset Date: Mon, 16 Oct 2023 12:19:25 +0530 Message-ID: <20231016064934.1913964-2-schalla@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231016064934.1913964-1-schalla@marvell.com> References: <20231016064934.1913964-1-schalla@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: yBL6O52rG8U5GErmQUwhzxoHBiYbSKKB X-Proofpoint-ORIG-GUID: yBL6O52rG8U5GErmQUwhzxoHBiYbSKKB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-15_09,2023-10-12_01,2023-05-22_02 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Sun, 15 Oct 2023 23:50:17 -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