Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp467248rdh; Tue, 19 Dec 2023 04:38:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHuXH0D0JxTHEj8MHKoq9kSIs4oi3hL1qjhgcnzsKu5+RzghdlXDZqVxC7juYr05Vs+MfH4 X-Received: by 2002:a17:90a:e618:b0:285:8cb6:6153 with SMTP id j24-20020a17090ae61800b002858cb66153mr1264152pjy.17.1702989530969; Tue, 19 Dec 2023 04:38:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702989530; cv=none; d=google.com; s=arc-20160816; b=jX5M1FHUOPaIDrsuIN0XLxC+c2Ylz1FVx8ixNlqBAHmLSKFTDceoqh0vFc9RRBHwju f1aqE9vorIwm+s4QSzqSbmfQauMknzhxULPigl+3L8xLKU0s2HOugJtg+LY/0nyLTuiv 5saIgMJjpnuMkgjOTl5iOrTbH50oEZpXuREIL2X8OrTPQIxBtmJtA/n8sQq0iu3jBhQB wfIav+zlemmXP3kuMdVtf/7lrYkf/CZGHWR4Hjig3NLpjTXMOBWYF/ndtjDtG3B2iCPA AUABvxIajlbRLD5D3KFO+Alhoimq3rz24zKq9SGuCHmC8Xxov0LIKyulz1XUv4LZM/0r V4Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LZx8uLBDEnuZ9FSMUG42V3XMmk2L95CFWxXVx8IS7+U=; fh=nIufmHu5noZrjJiRB9W7eT9xpqF+yZxN2pF+TqzqXqo=; b=0BhXIdfJ4IExj0+mZ/cUPfrjirQD8hSJVMWdrEpuzfMlaCgxcbVYc+nsjyMUHwPBWN 2JreNhw0NRXS6i5FR2mme8Wb44zlqV+OUbV8sc+1TYOEUxcx0CWHv2WuHxNHd1WKArIg ajg+ivlXdIiDc1BOOBIaVl8v5WPE4iudc18tZU4el2M9Ffxihs6FT68f6JVGkr/I0V/B D7h+uitMyva+NrXIUFgT4Xobyj1mMgeBULP8zFV3MiM8TwhAOJ8dHiM1xsfzsnptGTEe Lf6GUcmEaOjTYkaVFQxrPDjQ7yvhXfDvd4C2Opor958Mv2sTAeoQAW13uaNDrx4dFQTA ztXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iog+1JW+; spf=pass (google.com: domain of linux-kernel+bounces-5178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id ot17-20020a17090b3b5100b0028b391b40aesi1181411pjb.139.2023.12.19.04.38.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 04:38:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iog+1JW+; spf=pass (google.com: domain of linux-kernel+bounces-5178-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5178-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9ABA32842AC for ; Tue, 19 Dec 2023 12:38:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F84219444; Tue, 19 Dec 2023 12:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="iog+1JW+" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B2A618E3E; Tue, 19 Dec 2023 12:38:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BJBriY8025630; Tue, 19 Dec 2023 12:37:57 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 :mime-version:content-type; s=qcppdkim1; bh=LZx8uLBDEnuZ9FSMUG42 V3XMmk2L95CFWxXVx8IS7+U=; b=iog+1JW+mLoWC/orYTVlV7kpWiWEj47Cq6jt MYlgkXud+IYN76p1Glt8T6i39Jp52Mm0UTgI3mnyP2ka1tddLHhGWeChverfJb7L Hc5ip7kw63L55tCWaRctqTgFta7qikaphlft4yCFnnCOGcwBz5sXLhM5F/aQuSHn I7q+K5N/4Lwi2OpeoH5TxwSORN8RCj9Y1Nro+pFdsGszwePFrBa4yEwSLjDW0GWM 4I9X9iEWc/8zAl4Lh8LeJrUqA1vW2JiNc3ADmbdKiukfsSMnOQcFCIyqDf8f4cOx B3SMFTY1DfU5hWFO8kKGstnMm4cPsgOEKA4tg52VUoFFWuDbkA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v2yyxhje3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Dec 2023 12:37:56 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BJCbtsc013404 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Dec 2023 12:37:55 GMT Received: from hu-mnaresh-hyd.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 19 Dec 2023 04:37:50 -0800 From: Maramaina Naresh To: "James E.J. Bottomley" , "Martin K. Petersen" , Peter Wang , "Matthias Brugger" , AngeloGioacchino Del Regno CC: Alim Akhtar , Avri Altman , Bart Van Assche , Stanley Jhu , , , , , , Subject: [PATCH V6 2/2] ufs: ufs-mediatek: Migrate to UFSHCD generic CPU latency PM QoS support Date: Tue, 19 Dec 2023 18:07:06 +0530 Message-ID: <20231219123706.6463-3-quic_mnaresh@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231219123706.6463-1-quic_mnaresh@quicinc.com> References: <20231219123706.6463-1-quic_mnaresh@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: vgDwjcyfZ20GeiThkAikKdWfy6WmiljT X-Proofpoint-GUID: vgDwjcyfZ20GeiThkAikKdWfy6WmiljT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312190094 The PM QoS feature found in the MediaTek UFS driver was moved to the UFSHCD core. Hence remove it from MediaTek UFS driver as it is redundant now. Reviewed-by: Peter Wang Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Maramaina Naresh --- drivers/ufs/host/ufs-mediatek.c | 17 ----------------- drivers/ufs/host/ufs-mediatek.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c index 776bca4f70c8..f43eb945e011 100644 --- a/drivers/ufs/host/ufs-mediatek.c +++ b/drivers/ufs/host/ufs-mediatek.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -626,21 +625,9 @@ static void ufs_mtk_init_host_caps(struct ufs_hba *hba) dev_info(hba->dev, "caps: 0x%x", host->caps); } -static void ufs_mtk_boost_pm_qos(struct ufs_hba *hba, bool boost) -{ - struct ufs_mtk_host *host = ufshcd_get_variant(hba); - - if (!host || !host->pm_qos_init) - return; - - cpu_latency_qos_update_request(&host->pm_qos_req, - boost ? 0 : PM_QOS_DEFAULT_VALUE); -} - static void ufs_mtk_scale_perf(struct ufs_hba *hba, bool scale_up) { ufs_mtk_boost_crypt(hba, scale_up); - ufs_mtk_boost_pm_qos(hba, scale_up); } static void ufs_mtk_pwr_ctrl(struct ufs_hba *hba, bool on) @@ -959,10 +946,6 @@ static int ufs_mtk_init(struct ufs_hba *hba) host->ip_ver = ufshcd_readl(hba, REG_UFS_MTK_IP_VER); - /* Initialize pm-qos request */ - cpu_latency_qos_add_request(&host->pm_qos_req, PM_QOS_DEFAULT_VALUE); - host->pm_qos_init = true; - goto out; out_variant_clear: diff --git a/drivers/ufs/host/ufs-mediatek.h b/drivers/ufs/host/ufs-mediatek.h index f76e80d91729..38eab95b0f79 100644 --- a/drivers/ufs/host/ufs-mediatek.h +++ b/drivers/ufs/host/ufs-mediatek.h @@ -7,7 +7,6 @@ #define _UFS_MEDIATEK_H #include -#include #include /* @@ -167,7 +166,6 @@ struct ufs_mtk_mcq_intr_info { struct ufs_mtk_host { struct phy *mphy; - struct pm_qos_request pm_qos_req; struct regulator *reg_va09; struct reset_control *hci_reset; struct reset_control *unipro_reset; @@ -178,7 +176,6 @@ struct ufs_mtk_host { struct ufs_mtk_hw_ver hw_ver; enum ufs_mtk_host_caps caps; bool mphy_powered_on; - bool pm_qos_init; bool unipro_lpm; bool ref_clk_enabled; u16 ref_clk_ungating_wait_us; -- 2.17.1