Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6834457rwb; Tue, 22 Nov 2022 20:45:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf4mYhsd16RMdHDH3yH/vZpZPWRSaiscSM4UZWDOraOlGBxZbX3usovnVE/UTz86JlRvYSmJ X-Received: by 2002:a17:906:19d6:b0:7ac:9917:c9c6 with SMTP id h22-20020a17090619d600b007ac9917c9c6mr5576818ejd.325.1669178750427; Tue, 22 Nov 2022 20:45:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669178750; cv=none; d=google.com; s=arc-20160816; b=TaFpTS2fDzT0IKqWIhX3RQTWrspWmRQaFnet94W43z417BOp8jUO+uPJcTua++ZemI PkawbYoLvAFb+eoqdPbGfKILVgQdYkH+CK+6qD/VAItzD1zDxFMF81JvUh6Vp0wy5uc1 NH8Fai3tF4cC1/VGVC2xLDu2A1m5NqaTsMZIkxitwYivfTa/XDp6gJzVrQhnwxswFdIQ o38NbsLVt/V2kyCLJJ2xIXJP1fmtMpir38MI7ZrUicEpfYrMQ9+QbezMxAT+gnRY9Wjw 9CePZTY89C4ctukOTSk2vJbyhkWqxihQGeAqJiH33ODKKWZL2OtlSvZRrkw4CXgYMvMI 0OrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Kp8HbRWiaCL4OTbinM/f8vMdJ6nRZPBnb8gsARp/mZc=; b=a5nlVMI5J907c5lQPYJO/+rYNvncLkl8bZNTvRPH9dLihiW5SawgktW3Yp3GxZlB7t UsduIACO/IVbS0MWln5pRnZuL92LwckkyhLo4dEIvp07n3a5JiR66U7JXFm4wCGr4qxz 6TcP5ltQ0W895/nfkL2Xiq7AU0zxuraUV55pchbMhFI5wbEQlb3uwnWGNOwy2olXzcMk 2ISSRJ+3VRktxfFxV0N6lyMG3NZA4Gs7p2uvyHTJG5Zs22qn6+NEacL7LOV5Akc6yx6G bwq6BmR9l1Mo+1O/EQz6VIBd4rWnDUuJU7dF+8LXWayj7MM6Csc5YZYT7qqgGszqFWr7 BHWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=IGVYx6X7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf8-20020a1709077f0800b007ba16fcfefdsi377554ejc.936.2022.11.22.20.45.27; Tue, 22 Nov 2022 20:45:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=IGVYx6X7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235935AbiKWESc (ORCPT + 89 others); Tue, 22 Nov 2022 23:18:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235816AbiKWERj (ORCPT ); Tue, 22 Nov 2022 23:17:39 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58927ED704; Tue, 22 Nov 2022 20:14:41 -0800 (PST) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AN2wRZS029604; Wed, 23 Nov 2022 04:14:29 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=Kp8HbRWiaCL4OTbinM/f8vMdJ6nRZPBnb8gsARp/mZc=; b=IGVYx6X7NnIF4a3YLrqeW1q2l6M++KIdmFKCVmmIt3OesdrrexDXy71/Qz6/GHwaJQsh z/na0LZq89wHe52yXNeo0la1snMf+V6qNijPMKArA+RzOt+4dfKEkcD3Jr6wp7PuYcI5 cUq38ncLlkgI+0zEBFzTi/29a6GU7awHuiVQi/7zDkYgbm9Gg83B/BePQfPiVQu1wYIk nW6vTjfCZfmx5s7/qxvcS944dljHSTHPY2dFt5Nm0AodSNWbxBThWgqInMOuF2RLtB4/ 6VHTrM5SSswf6GeE5l6Htp/goJ/yLy8KnPWJireeTst/yx/w4QSm+c36mPwiAd9sd1R8 4Q== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3m0ptsu8wj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 04:14:29 +0000 Received: from nasanex01a.na.qualcomm.com ([10.52.223.231]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2AN4ESYB004787 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Nov 2022 04:14:28 GMT Received: from asutoshd-linux1.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Tue, 22 Nov 2022 20:14:28 -0800 From: Asutosh Das To: , , CC: , , , , , , , , , Asutosh Das , , Alim Akhtar , "James E.J. Bottomley" , Jinyoung Choi , open list Subject: [PATCH v5 16/16] ufs: core: mcq: Enable Multi Circular Queue Date: Tue, 22 Nov 2022 20:10:29 -0800 Message-ID: <6a26d01d7362cc70af70a133910cf9ad55a6ec06.1669176158.git.quic_asutoshd@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: dUAdc_CGYu3bDyd92Xev0rLPBIxL7QGc X-Proofpoint-ORIG-GUID: dUAdc_CGYu3bDyd92Xev0rLPBIxL7QGc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-23_01,2022-11-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxlogscore=999 suspectscore=0 mlxscore=0 priorityscore=1501 spamscore=0 phishscore=0 clxscore=1015 bulkscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211230030 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enable MCQ in the Host Controller. Signed-off-by: Asutosh Das Reviewed-by: Bart Van Assche --- drivers/ufs/core/ufshcd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 8416d42..41005b8 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -8351,6 +8351,12 @@ static void ufshcd_config_mcq(struct ufs_hba *hba) hba->host->can_queue = hba->nutrs - UFSHCD_NUM_RESERVED; hba->reserved_slot = hba->nutrs - UFSHCD_NUM_RESERVED; + + /* Select MCQ mode */ + ufshcd_writel(hba, ufshcd_readl(hba, REG_UFS_MEM_CFG) | 0x1, + REG_UFS_MEM_CFG); + hba->mcq_enabled = true; + dev_info(hba->dev, "MCQ configured, nr_queues=%d, io_queues=%d, read_queue=%d, poll_queues=%d, queue_depth=%d\n", hba->nr_hw_queues, hba->nr_queues[HCTX_TYPE_DEFAULT], hba->nr_queues[HCTX_TYPE_READ], hba->nr_queues[HCTX_TYPE_POLL], -- 2.7.4