From patchwork Thu Nov 23 08:36:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Can Guo X-Patchwork-Id: 168774 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp300411vqx; Thu, 23 Nov 2023 00:37:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkfwfsdVT7GkoVUSWL0HLSk98zh7JZYCjDBQBk9lxyYUUaTUclBZwBRon/0pZTv+l2OSCB X-Received: by 2002:a17:902:db03:b0:1cc:4467:a563 with SMTP id m3-20020a170902db0300b001cc4467a563mr5266687plx.3.1700728630866; Thu, 23 Nov 2023 00:37:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700728630; cv=none; d=google.com; s=arc-20160816; b=j2Eqatf77D5Bnx9LJM/TDGV+hzKI6W1qaWTeL1zm+0rLdGOac8hwhhSlaRoNjYHA2W NvZLwOKdwmIjcaDb7CO5OmD4BH1YbXPSGu1HrXpfccyBvWXN24zESqIAQtspFpjwHrFq ruhZaScqs2W4yRXjdWpLiklEgfJtQ6j1bk625qTYlkhffHsZsQpTTcm0wfMhFZJnnqnQ PbPrjDgwWqB4qOZVURtsBuinuuQOv6FKkzM2lSaAZ7mOwYWJluy5i3uLUit7Vpn1mxur y5N6UQsn6vyrsXMuH7fLKGt2v2vVblKlTW1nUEhBJARbBT5pOo444Iql2iii4BOSnWy+ YqwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=mP3Zh3ghe1QobYCFwkdhcpkOdhL0iT2Q9aPGVoVes/U=; fh=fxJEPvKTez7RdWJWsxUNf9DmvHxinejR2Mp4BIurQhc=; b=Q9zVzoruT2Tjaxsxm/29QHdWohum3QmZU3AxAOEa1kPvFkY8XPpDDF9ghtedPaRASe o6hzGpGX9t+4RmB5Gp4Pg5iAJ8dwPAR8Q65dRHQ+gd/IfRXHeMljUd9/qqHICCtOEjo/ z1wyHRnPQsr1k5hA+1/w067U7umc4DA4HI9GpRK7uAojiNtbjAx0P1viseXp0IrOL0Eo 3klWPduhgO6xRgrCH7nb/n776YbJmV9YnbynKws+jillQOYnenZDkvakDrq1sMaFZXJZ oIcIjR62cFwI33WLpRWfbIS8PYW3FRNLOhokxtVROiZ7cc3vxciYA+0/CSBZfYLzg5Vs OHtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mlN8icQW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id e8-20020a17090301c800b001cf6e0c99bbsi748606plh.137.2023.11.23.00.37.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 00:37:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mlN8icQW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 2F10E80756DE; Thu, 23 Nov 2023 00:37:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344958AbjKWIgm (ORCPT + 99 others); Thu, 23 Nov 2023 03:36:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344953AbjKWIgi (ORCPT ); Thu, 23 Nov 2023 03:36:38 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 578A2D41; Thu, 23 Nov 2023 00:36:45 -0800 (PST) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AN5VaqD014987; Thu, 23 Nov 2023 08:36:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=qcppdkim1; bh=mP3Zh3ghe1QobYCFwkdhcpkOdhL0iT2Q9aPGVoVes/U=; b=mlN8icQW1SBwkV11Nv/PpT3023DZumixwDZwnctBAtcEZXKbIesFQ3efR1eTS7T5OzcW F5UxLwPli9dET/LIdJWk7FIrELPgE3/r9VuGc39RwRGpVq6XVssXgWu4mTFJa80rjS/f Jw2xS1w1mIg6GEUwTJzcsTYNwW7cfyNk3VBwIs5SxNa3lUsSrpS7H3tg8dk4Cojn2kX2 ZYbptRRxFw/VICAPhJnplpgt8uhatl4oIGxv5sUk65/kNLTIdMVcSMu0ULBTgaAseobw zC8iHGaDpK3zhI/GAXcNpUsQa/2+St4bcQ9na1bDRm+IA4EmhgAPRp2y0tKghP4NFMjI Bw== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uhkfnt4ha-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Nov 2023 08:36:32 +0000 Received: from pps.filterd (NASANPPMTA02.qualcomm.com [127.0.0.1]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 3AN8L3v5005972; Thu, 23 Nov 2023 08:36:31 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NASANPPMTA02.qualcomm.com (PPS) with ESMTP id 3uj1yvrv66-1; Thu, 23 Nov 2023 08:36:31 +0000 Received: from NASANPPMTA02.qualcomm.com (NASANPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3AN8Z82A024683; Thu, 23 Nov 2023 08:36:31 GMT Received: from stor-dylan.qualcomm.com (stor-dylan.qualcomm.com [192.168.140.207]) by NASANPPMTA02.qualcomm.com (PPS) with ESMTP id 3AN8aUoV025933; Thu, 23 Nov 2023 08:36:30 +0000 Received: by stor-dylan.qualcomm.com (Postfix, from userid 359480) id B9F1220A68; Thu, 23 Nov 2023 00:36:30 -0800 (PST) From: Can Guo To: quic_cang@quicinc.com, bvanassche@acm.org, mani@kernel.org, adrian.hunter@intel.com, beanhuo@micron.com, avri.altman@wdc.com, junwoo80.lee@samsung.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , "James E.J. Bottomley" , linux-arm-msm@vger.kernel.org (open list:UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER...), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v4 02/10] scsi: ufs: ufs-qcom: No need to set hs_rate after ufshcd_init_host_param() Date: Thu, 23 Nov 2023 00:36:08 -0800 Message-Id: <1700728577-14729-3-git-send-email-quic_cang@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1700728577-14729-1-git-send-email-quic_cang@quicinc.com> References: <1700728577-14729-1-git-send-email-quic_cang@quicinc.com> X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: zMRIhwht2_57gNLlgbHZ9SVAuWn2ukGa X-Proofpoint-ORIG-GUID: zMRIhwht2_57gNLlgbHZ9SVAuWn2ukGa 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-23_06,2023-11-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 mlxscore=0 clxscore=1015 spamscore=0 lowpriorityscore=0 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311230060 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 howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 23 Nov 2023 00:37:08 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783343225141101997 X-GMAIL-MSGID: 1783343225141101997 In ufs_qcom_pwr_change_notify(), host_params.hs_rate has been set to PA_HS_MODE_B by ufshcd_init_host_param(), hence remove the duplicated line of work. Meanwhile, removed the macro UFS_QCOM_LIMIT_HS_RATE as it is only used here. Signed-off-by: Can Guo --- drivers/ufs/host/ufs-qcom.c | 1 - drivers/ufs/host/ufs-qcom.h | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index aee66a3..cc30ad9 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -909,7 +909,6 @@ static int ufs_qcom_pwr_change_notify(struct ufs_hba *hba, switch (status) { case PRE_CHANGE: ufshcd_init_host_param(&host_params); - host_params.hs_rate = UFS_QCOM_LIMIT_HS_RATE; /* This driver only supports symmetic gear setting i.e., hs_tx_gear == hs_rx_gear */ host_params.hs_tx_gear = host_params.hs_rx_gear = ufs_qcom_get_hs_gear(hba); diff --git a/drivers/ufs/host/ufs-qcom.h b/drivers/ufs/host/ufs-qcom.h index 9950a00..82cd143 100644 --- a/drivers/ufs/host/ufs-qcom.h +++ b/drivers/ufs/host/ufs-qcom.h @@ -27,8 +27,6 @@ #define SLOW 1 #define FAST 2 -#define UFS_QCOM_LIMIT_HS_RATE PA_HS_MODE_B - /* QCOM UFS host controller vendor specific registers */ enum { REG_UFS_SYS1CLK_1US = 0xC0,