Message ID | b0efa2abeba389a7739ea26956e8b342c65deab1.1670541364.git.quic_asutoshd@quicinc.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp478295wrr; Thu, 8 Dec 2022 15:36:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf5EEftYeYcSiBrCPpvgFJhc7f1F4B0VN06e/OrF+lKbhTSHoIBq22rUjYVp3BR3EAS3h7jE X-Received: by 2002:a05:6a20:4db0:b0:9d:efbf:7856 with SMTP id gj48-20020a056a204db000b0009defbf7856mr4191651pzb.11.1670542575043; Thu, 08 Dec 2022 15:36:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670542575; cv=none; d=google.com; s=arc-20160816; b=rrHVtofcNUSdE2JBh9ZsX3Bcsw4enB+A26TsdyrR4BHtme+Ifq9vcEFC9tMWzYG0UY EpwQO/DJIumwuzL6T79lU/RTn/L7U2YDdBoqSE4E6etL123EtDQ2ASbiYkWBc5pQPnSH h0veO1CmQEGpIqXs7dQsd1n+b6sXpQQ5g8/kUDVu6uwmbCuafukAC18tMAlZcyWva6GD ftShFEsskT+r2FpN1zOpZDjGcH41/IUn6HrUhAHaUBHS+7s8t4S0trlp6W57iGA6aFfr I9J9ij0C+7L+Y1yL5tQlfK1oqyC0gpoSZMEuh9RVUQSPV/f03oOPngUOE9NnF9fHDSBE qg+w== 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=8SFDvbzQ1dlolm07vRWQ6nGPb415dRbXSJxfEmPGi4I=; b=qLcewyb2XfbLcgsZdYJylSkIEWBTTBxz1xcKtyRzunNKrTxsSW7nEuPMItLCGhjZKS amHqOum857aRWRCwGwX3VZpsuiCw+6QrAHKPq1fTMeSJs3BTmxdB9qn7vRnAUgtKc6Fg TSQ10ozk+WSoNmSpURYuYCsSALgorOS+QPbdiHNBCiEXkaZokI0AVrz2RQgkWBjaTvq6 sviALzSKqTAdgzRUWxU1ABsS/O230aY1HfTUkbLYnRTXAG0ifVF4XnwPjiQhyE+j+S3+ iOfZDFawjwTLEvyGzIpLZ6pKiVcRKqPx1uvNunYNZH/4nx6uX/h9RFrDUOv8Ah3yY007 11NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="JX9Yl/S3"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l186-20020a6388c3000000b0046e96b9ecfdsi13040902pgd.801.2022.12.08.15.36.00; Thu, 08 Dec 2022 15:36:15 -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="JX9Yl/S3"; 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 S230266AbiLHXXi (ORCPT <rfc822;foxyelen666@gmail.com> + 99 others); Thu, 8 Dec 2022 18:23:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230218AbiLHXW5 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 8 Dec 2022 18:22:57 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C2A9A504F; Thu, 8 Dec 2022 15:21:55 -0800 (PST) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B8N7X3I015617; Thu, 8 Dec 2022 23:21:45 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=8SFDvbzQ1dlolm07vRWQ6nGPb415dRbXSJxfEmPGi4I=; b=JX9Yl/S3uQf0i4ed0/klIrdU9A6WnqTbL4j2jZrskvQ/Q7PeieJ14gVOnXHrjPcWmkkF dsSV30pW/C2yYi/EMf5i2m1V/7p9Cy5B4f7NM9ax/Q+yihDwdVx9pyPFAUJn9TJFwEzh LgAiE+pg2JK27dCkh6aaUg85fZiTqddKRVqXNR/vMxBzGmQGh71Q1hVghP2hOjTvB9Mo APal3RyjSucj8rmjqZp+kLMMXzVjOgzv5OKpUjwbkfjPv+NiuohIX4o5Q0X7Vi8NOlUK 4LL2pMuuSTPsY3EJ9YeGlxGN5vgz7+IV4k1zJHcrKey96bZDfEgFR/8XAx/KuaAumZr+ CA== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3mavtf4y7c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Dec 2022 23:21:44 +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 2B8NLiel017541 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 8 Dec 2022 23:21:44 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; Thu, 8 Dec 2022 15:21:43 -0800 From: Asutosh Das <quic_asutoshd@quicinc.com> To: <quic_cang@quicinc.com>, <martin.petersen@oracle.com>, <linux-scsi@vger.kernel.org> CC: <quic_nguyenb@quicinc.com>, <quic_xiaosenh@quicinc.com>, <stanley.chu@mediatek.com>, <eddie.huang@mediatek.com>, <daejun7.park@samsung.com>, <bvanassche@acm.org>, <avri.altman@wdc.com>, <mani@kernel.org>, <beanhuo@micron.com>, Asutosh Das <quic_asutoshd@quicinc.com>, <linux-arm-msm@vger.kernel.org>, Alim Akhtar <alim.akhtar@samsung.com>, "James E.J. Bottomley" <jejb@linux.ibm.com>, Jinyoung Choi <j-young.choi@samsung.com>, open list <linux-kernel@vger.kernel.org> Subject: [PATCH v11 16/16] ufs: core: mcq: Enable Multi Circular Queue Date: Thu, 8 Dec 2022 15:18:42 -0800 Message-ID: <b0efa2abeba389a7739ea26956e8b342c65deab1.1670541364.git.quic_asutoshd@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <cover.1670541363.git.quic_asutoshd@quicinc.com> References: <cover.1670541363.git.quic_asutoshd@quicinc.com> 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: xxePhSOhwBR-o6G3jTubTL-sbDvT-Oc_ X-Proofpoint-ORIG-GUID: xxePhSOhwBR-o6G3jTubTL-sbDvT-Oc_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-08_12,2022-12-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 adultscore=0 spamscore=0 phishscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212080192 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751690851078815291?= X-GMAIL-MSGID: =?utf-8?q?1751690851078815291?= |
Series |
[v11,01/16] ufs: core: Optimize duplicate code to read extended feature
|
|
Commit Message
Asutosh Das
Dec. 8, 2022, 11:18 p.m. UTC
Enable MCQ in the Host Controller. Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> --- drivers/ufs/core/ufshcd.c | 6 ++++++ 1 file changed, 6 insertions(+)
Comments
On Fri, Dec 9, 2022 at 7:30 AM Asutosh Das <quic_asutoshd@quicinc.com> wrote: > > Enable MCQ in the Host Controller. > > Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com> > Reviewed-by: Bart Van Assche <bvanassche@acm.org> > Reviewed-by: Manivannan Sadhasivam <mani@kernel.org> Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index e42d642..7f0bc10 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -8381,6 +8381,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],