Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp314965rwb; Thu, 22 Sep 2022 18:51:56 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7oMwbvl/dk1sD0qg6Q+YCED1hU502qusaFdNIwRaDgk9Z6MvWrrhhRrtMfRUEXpsgcbBpX X-Received: by 2002:a17:90a:74c4:b0:203:336d:dd36 with SMTP id p4-20020a17090a74c400b00203336ddd36mr18103859pjl.107.1663897916186; Thu, 22 Sep 2022 18:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663897916; cv=none; d=google.com; s=arc-20160816; b=xa8WbRVgVgb1W688g624PW1knN294IUuVnBDa9tAuiiaI6sJYe6eS7lIb5WYGeZ7za xnGOVW76TTG2eEWwtmFiyTyQK4g7+aOkJzy/GO9VPGEu6kztAJtnWcBWnegpbfUhlxGo QbWghXazX8KWysysM8e5oAnnMm4/tfxjSlUE47uCLh4oCvav5eOU6heXBMfmfgA2cL1U UlT4ZfoLTsnhMLmW/BOHc7J0gx8u4zp5Ni1Bw0MTLTEu6SfLNj8qIapWXq9OTf0iL9dC QoVmrLuulrC2ICaqAT7CBAYEecr5LdOQv2ikVGH4zw+xX2kw/14oZA8H55Tm2bUFGFDw hvbA== 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=OBB2IUjlk3Tku5HcCdkZTFHCcqZ3cJIKTd4Gu75oCbU=; b=wOhN405adYh5VNfNB/7kq4BPh6++uTPJehxfS6gz51yJ/ZZZUTnrc98kSM5uOlmG0N EygruIAUCNkJhoUzLwbeoVs1xRGfI3HFhIUrjd8CYDruGfBQRIr9z946AOXYOYiyrBYu ARXcC5sRDPVj6Sw6jpqpNbRRthztPxliOQaWgOiB1sxBTY9jCI82OwOanGFKqPKr74Tc zpqieWt+HTYlBPF1lfS68Yo7yE9MV7KrtGEC0IbtvrZoilMC+XRH/Xv3ltxRGjHJ1Cni I1i2bk17gLJt3iN3dK+b/zGTvrEHwf9HIxxclGjBupu08s90kocHooAQQgwR5UcbvHN9 0zMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=wnZ9deZq; 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 o13-20020a63730d000000b00434ecfaa04csi7342292pgc.665.2022.09.22.18.51.45; Thu, 22 Sep 2022 18:51:56 -0700 (PDT) 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=qcdkim header.b=wnZ9deZq; 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 S231520AbiIWBMF (ORCPT + 99 others); Thu, 22 Sep 2022 21:12:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231560AbiIWBLg (ORCPT ); Thu, 22 Sep 2022 21:11:36 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43F823CBEE for ; Thu, 22 Sep 2022 18:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1663895479; x=1695431479; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=OBB2IUjlk3Tku5HcCdkZTFHCcqZ3cJIKTd4Gu75oCbU=; b=wnZ9deZqT9FtT4lvQwYjjl+JvOFxR3cUjwYcu3jt0+AW/b15iGWWUiE7 aOyCa7SNzPOixolx5LBqBQSg6gUcnITAdNaPjZdT/+2+kvt+6Rro1V8+o iTM7p4M3eMlbxOJBQt9s6/v0v07tVaftQYlTY0qyoWGDv+B57Y40y4jMH c=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-01.qualcomm.com with ESMTP; 22 Sep 2022 18:08:48 -0700 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 18:08:48 -0700 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.29; Thu, 22 Sep 2022 18:08:47 -0700 From: Asutosh Das To: , , , , , , , , , , , , CC: , Asutosh Das , Alim Akhtar , "James E.J. Bottomley" , Matthias Brugger , open list , "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" Subject: [PATCH v1 15/16] ufs: core: mcq: Enable Multi Circular Queue Date: Thu, 22 Sep 2022 18:05:22 -0700 Message-ID: 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-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 MCQ is enabled in the Host Controller. Signed-off-by: Asutosh Das --- drivers/ufs/core/ufshcd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 44b6c0b..a230897 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -8312,6 +8312,10 @@ static int 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