Message ID | 20231208065902.11006-1-manivannan.sadhasivam@linaro.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5284414vqy; Thu, 7 Dec 2023 22:59:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IG3nA3tgBkQYBTROgYGzuwldOiC9jw9+XQ3ZzbJwZUyodlsEdPWSkjUk/BCGFRbb5YpxNFg X-Received: by 2002:a17:902:c943:b0:1d0:d2e9:c1ce with SMTP id i3-20020a170902c94300b001d0d2e9c1cemr3821358pla.41.1702018773973; Thu, 07 Dec 2023 22:59:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702018773; cv=none; d=google.com; s=arc-20160816; b=JKpMpSPIzMkV1x42Je7gEC6Tn7OscWJfzzQ98R4IXbh4jy5U9bvn7jlVRkN+ime4hp 9tEYy6tU9Es2M4asJOdpvCbIu+vwa1bxZvzqM3t1V5nUxrmuPIfTOyoTPIBU5L8OLtm7 BURExIIkhP2krwT2JuiNOPQo0XvI9eD5nLFozyJ1zaA6t5bl6Q/hqGa4TnUUR96uu2Ma Q+SiUMjjiLgkJn9j2YDrJLdwX0NsTu1ZBe/sBnaS9HvBTo3n1FmHDBs4Coeu1x0veHkt V7SEupoFuPGaoA2bnlbx47CuQsvu7xUBQanrWFFOuS60fLnaODMkieYDTb6hjQg9MPIu KUzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CQ/+btG3R4BylCT3sRnAP96/2um/WTuuUn1kNLXJGP8=; fh=3M/8bTCRB16Lsc02X7bSCpILCqUt5UU6Z9lIcVlF+qQ=; b=IFLlYQCuvjwLvQz6cDApYO/SDoXt7h0lJO7pS4nrBINheKofkjLSQ93yV4Mlm+QuVp zKJprWyXNe5jpN7QUYL0jP7dCN5JRK2dS/Q96rlB4pW5bR13KhzL7I8ZjjbZ6IEoOnmc copBsqpZo8YG8RY7d2TMBkbRMJprfEiX2s2ZxlnAN+N/gSvaKdBZ0GiMs+sO6uIJLY9Y EcszQmVamN0zp0ybsowb3m9Sku2cQ43fd7rqm5ZOB2AtIvji5pIyz/5IqaC6SABr/jJq Lk3vGokfH9bb3/xVmDfCGr410fADeLlGZ5uhqVzbGZrLE21qOFulWzicX+AUoeNSfY1S G3DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u3E7tP5s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id n2-20020a170902d2c200b001c3411c9b83si1117438plc.454.2023.12.07.22.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 22:59:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u3E7tP5s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id B30D181FD28A; Thu, 7 Dec 2023 22:59:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233142AbjLHG7R (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 8 Dec 2023 01:59:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233199AbjLHG7N (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 8 Dec 2023 01:59:13 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F7B41727 for <linux-kernel@vger.kernel.org>; Thu, 7 Dec 2023 22:59:15 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1d045097b4cso13569895ad.0 for <linux-kernel@vger.kernel.org>; Thu, 07 Dec 2023 22:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702018755; x=1702623555; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CQ/+btG3R4BylCT3sRnAP96/2um/WTuuUn1kNLXJGP8=; b=u3E7tP5sJooWyyGLKqgrfdmhGSU1qzqu17kBjFp70pFSXTTE/ZVJLGjaynCx0i0piU 0ywuDpc86uuPFsxfeE98f2s9UGLHQkghauq/rUzn5UTTpNZi2D13w/wBIxU8b+EW0sQB bR6LWm02o9Jz55dKBegLjhttLtMU6kajytterlPVAtaj6br/SekiCE55oXwEBO3GEkUs vSzaOlF1IIM8m0HeT3y5bHdf5t1h+LnTz8SP1qi/EFmW4LTGwd1/X7wekLomJN39mfGX kzATlYfMJ5gUyp8skuLqxBg4IrUv/FYsreE6EfPQH1Kp0lpB2USKrRvj5scWqmrt4v4z veyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702018755; x=1702623555; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CQ/+btG3R4BylCT3sRnAP96/2um/WTuuUn1kNLXJGP8=; b=UbC+NW2gEIUuEZHAo6gJJ1bTq6MyIWcflqI2PsC9BkFDdd7H9UKvbjCNAmERVj/kdl h7iBr3hkiAkBIQX18u/ZomazB6074hA8IGUZCquLZUZIg8vxHlzfQX+lEPY4QYAuP6OA uCaRkBlad6jcTtcV8woYlPW81O84KSET7rTB2aSpnPHII59na25F1yr5fau0p46deIs2 WlZ8VQQW8u+XehKUaJA+8GfFf5txWvT2gGV8+6/RDwQf6JbF3htHPl1oaKvKIDck7nuw xBixM1e9dhYCeBluaHzhbz0qq4hCJ3I8stQ9hx/kHVpm8ySHcO0OiRjBmt26wcPTnwMy uOrQ== X-Gm-Message-State: AOJu0YzuCX/6NBf8n6FgGhtq4yYOVqIUUTfN4qyECjMzFObEyv/uUS3R zDER4wF7myHnCDaowJZs3AnX X-Received: by 2002:a17:902:ecca:b0:1d0:7b65:9f8a with SMTP id a10-20020a170902ecca00b001d07b659f8amr3282715plh.51.1702018754908; Thu, 07 Dec 2023 22:59:14 -0800 (PST) Received: from localhost.localdomain ([117.216.123.142]) by smtp.gmail.com with ESMTPSA id n8-20020a170902e54800b001b03f208323sm934263plf.64.2023.12.07.22.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 22:59:14 -0800 (PST) From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> To: martin.petersen@oracle.com, jejb@linux.ibm.com Cc: andersson@kernel.org, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, quic_cang@quicinc.com, ahalaney@redhat.com, quic_nitirawa@quicinc.com, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Subject: [PATCH v2 00/17] scsi: ufs: qcom: Code cleanups Date: Fri, 8 Dec 2023 12:28:45 +0530 Message-Id: <20231208065902.11006-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 07 Dec 2023 22:59:30 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784696037910811219 X-GMAIL-MSGID: 1784696037910811219 |
Series |
scsi: ufs: qcom: Code cleanups
|
|
Message
Manivannan Sadhasivam
Dec. 8, 2023, 6:58 a.m. UTC
Hello, This series has code some cleanups to the Qcom UFS driver. No functional change. In this version, I've removed code supporting legacy controllers ver < 2.0, as the respective platforms were never supported in upstream. Tested on: RB5 development board based on Qcom SM8250 SoC. - Mani Changes in v2: * Collected review tags * Fixed the comments from Andrew * Added a few more patches, most notably one removing the code for old controllers (ver < v2.0) Manivannan Sadhasivam (17): scsi: ufs: qcom: Use clk_bulk APIs for managing lane clocks scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key() scsi: ufs: qcom: Fix the return value when platform_get_resource_byname() fails scsi: ufs: qcom: Remove superfluous variable assignments scsi: ufs: qcom: Remove the warning message when core_reset is not available scsi: ufs: qcom: Export ufshcd_{enable/disable}_irq helpers and make use of them scsi: ufs: qcom: Fail ufs_qcom_power_up_sequence() when core_reset fails scsi: ufs: qcom: Check the return value of ufs_qcom_power_up_sequence() scsi: ufs: qcom: Remove redundant error print for devm_kzalloc() failure scsi: ufs: qcom: Use dev_err_probe() to simplify error handling of devm_gpiod_get_optional() scsi: ufs: qcom: Remove unused ufs_qcom_hosts struct array scsi: ufs: qcom: Sort includes alphabetically scsi: ufs: qcom: Initialize cycles_in_1us variable in ufs_qcom_set_core_clk_ctrl() scsi: ufs: qcom: Simplify ufs_qcom_{assert/deassert}_reset scsi: ufs: qcom: Remove support for host controllers older than v2.0 scsi: ufs: qcom: Use ufshcd_rmwl() where applicable scsi: ufs: qcom: Remove unused definitions drivers/ufs/core/ufshcd.c | 6 +- drivers/ufs/host/ufs-qcom.c | 377 +++++------------------------------- drivers/ufs/host/ufs-qcom.h | 52 +---- include/ufs/ufshcd.h | 2 + 4 files changed, 66 insertions(+), 371 deletions(-)
Comments
On Fri, Dec 08, 2023 at 12:28:45PM +0530, Manivannan Sadhasivam wrote: > Hello, > > This series has code some cleanups to the Qcom UFS driver. No functional > change. In this version, I've removed code supporting legacy controllers > ver < 2.0, as the respective platforms were never supported in upstream. > > Tested on: RB5 development board based on Qcom SM8250 SoC. > > - Mani > > Changes in v2: > > * Collected review tags > * Fixed the comments from Andrew > * Added a few more patches, most notably one removing the code for old > controllers (ver < v2.0) > I took this for a spin on sa8775p-ride when developing another patch today with no issues. Certainly doesn't hit all the cases here, but: Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8775p-ride > Manivannan Sadhasivam (17): > scsi: ufs: qcom: Use clk_bulk APIs for managing lane clocks > scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key() > scsi: ufs: qcom: Fix the return value when > platform_get_resource_byname() fails > scsi: ufs: qcom: Remove superfluous variable assignments > scsi: ufs: qcom: Remove the warning message when core_reset is not > available > scsi: ufs: qcom: Export ufshcd_{enable/disable}_irq helpers and make > use of them > scsi: ufs: qcom: Fail ufs_qcom_power_up_sequence() when core_reset > fails > scsi: ufs: qcom: Check the return value of > ufs_qcom_power_up_sequence() > scsi: ufs: qcom: Remove redundant error print for devm_kzalloc() > failure > scsi: ufs: qcom: Use dev_err_probe() to simplify error handling of > devm_gpiod_get_optional() > scsi: ufs: qcom: Remove unused ufs_qcom_hosts struct array > scsi: ufs: qcom: Sort includes alphabetically > scsi: ufs: qcom: Initialize cycles_in_1us variable in > ufs_qcom_set_core_clk_ctrl() > scsi: ufs: qcom: Simplify ufs_qcom_{assert/deassert}_reset > scsi: ufs: qcom: Remove support for host controllers older than v2.0 > scsi: ufs: qcom: Use ufshcd_rmwl() where applicable > scsi: ufs: qcom: Remove unused definitions > > drivers/ufs/core/ufshcd.c | 6 +- > drivers/ufs/host/ufs-qcom.c | 377 +++++------------------------------- > drivers/ufs/host/ufs-qcom.h | 52 +---- > include/ufs/ufshcd.h | 2 + > 4 files changed, 66 insertions(+), 371 deletions(-) > > -- > 2.25.1 >
On 8.12.2023 07:58, Manivannan Sadhasivam wrote: > Hello, > > This series has code some cleanups to the Qcom UFS driver. No functional > change. In this version, I've removed code supporting legacy controllers > ver < 2.0, as the respective platforms were never supported in upstream. > > Tested on: RB5 development board based on Qcom SM8250 SoC. > > - Mani > > Changes in v2: > > * Collected review tags > * Fixed the comments from Andrew > * Added a few more patches, most notably one removing the code for old > controllers (ver < v2.0) FWIW i found this snipped from a downstream commit from 2014: 8084 : 1.1.1 8994v1 : 1.2.0 8994v2 : 1.3.0 I'm yet to see any 8994 production device utilizing UFS (it wasn't very good or affordable in 2014/15 IIRC), so I think it's gtg. Konrad
Manivannan, > This series has code some cleanups to the Qcom UFS driver. No functional > change. In this version, I've removed code supporting legacy controllers > ver < 2.0, as the respective platforms were never supported in upstream. > > Tested on: RB5 development board based on Qcom SM8250 SoC. Applied to 6.8/scsi-staging, thanks!
On Wed, Dec 13, 2023 at 11:10:41PM -0500, Martin K. Petersen wrote: > > Manivannan, > > > This series has code some cleanups to the Qcom UFS driver. No functional > > change. In this version, I've removed code supporting legacy controllers > > ver < 2.0, as the respective platforms were never supported in upstream. > > > > Tested on: RB5 development board based on Qcom SM8250 SoC. > > Applied to 6.8/scsi-staging, thanks! > Thanks Martin! Andrew spotted an issue on patch 16/17 and I'm going to submit a patch fixing that. Please either squash it or apply it separately at your own convenience. - Mani > -- > Martin K. Petersen Oracle Linux Engineering
On Sat, Dec 09, 2023 at 06:42:31PM +0100, Konrad Dybcio wrote: > On 8.12.2023 07:58, Manivannan Sadhasivam wrote: > > Hello, > > > > This series has code some cleanups to the Qcom UFS driver. No functional > > change. In this version, I've removed code supporting legacy controllers > > ver < 2.0, as the respective platforms were never supported in upstream. > > > > Tested on: RB5 development board based on Qcom SM8250 SoC. > > > > - Mani > > > > Changes in v2: > > > > * Collected review tags > > * Fixed the comments from Andrew > > * Added a few more patches, most notably one removing the code for old > > controllers (ver < v2.0) > FWIW i found this snipped from a downstream commit from 2014: > > 8084 : 1.1.1 > 8994v1 : 1.2.0 > 8994v2 : 1.3.0 > > I'm yet to see any 8994 production device utilizing UFS (it wasn't > very good or affordable in 2014/15 IIRC), so I think it's gtg. > Thanks for digging! I was told that SoCs based on UFS 1.x controllers were not widely used in production, though I don't know why. - Mani > Konrad
On Fri, 08 Dec 2023 12:28:45 +0530, Manivannan Sadhasivam wrote: > This series has code some cleanups to the Qcom UFS driver. No functional > change. In this version, I've removed code supporting legacy controllers > ver < 2.0, as the respective platforms were never supported in upstream. > > Tested on: RB5 development board based on Qcom SM8250 SoC. > > - Mani > > [...] Applied to 6.8/scsi-queue, thanks! [01/17] scsi: ufs: qcom: Use clk_bulk APIs for managing lane clocks https://git.kernel.org/mkp/scsi/c/9caef8568831 [02/17] scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key() https://git.kernel.org/mkp/scsi/c/3bf7ab4ac30c [03/17] scsi: ufs: qcom: Fix the return value when platform_get_resource_byname() fails https://git.kernel.org/mkp/scsi/c/3a747c5cf9b6 [04/17] scsi: ufs: qcom: Remove superfluous variable assignments https://git.kernel.org/mkp/scsi/c/1f165c87ec3e [05/17] scsi: ufs: qcom: Remove the warning message when core_reset is not available https://git.kernel.org/mkp/scsi/c/d42d368647da [06/17] scsi: ufs: qcom: Export ufshcd_{enable/disable}_irq helpers and make use of them https://git.kernel.org/mkp/scsi/c/0ae7a02726bc [07/17] scsi: ufs: qcom: Fail ufs_qcom_power_up_sequence() when core_reset fails https://git.kernel.org/mkp/scsi/c/d11954711499 [08/17] scsi: ufs: qcom: Check the return value of ufs_qcom_power_up_sequence() https://git.kernel.org/mkp/scsi/c/e430c0e08957 [09/17] scsi: ufs: qcom: Remove redundant error print for devm_kzalloc() failure https://git.kernel.org/mkp/scsi/c/8291652ed8a2 [10/17] scsi: ufs: qcom: Use dev_err_probe() to simplify error handling of devm_gpiod_get_optional() https://git.kernel.org/mkp/scsi/c/c7afadacc180 [11/17] scsi: ufs: qcom: Remove unused ufs_qcom_hosts struct array https://git.kernel.org/mkp/scsi/c/e7458beab809 [12/17] scsi: ufs: qcom: Sort includes alphabetically https://git.kernel.org/mkp/scsi/c/be2e06c81a31 [13/17] scsi: ufs: qcom: Initialize cycles_in_1us variable in ufs_qcom_set_core_clk_ctrl() https://git.kernel.org/mkp/scsi/c/3b60f4564ff5 [14/17] scsi: ufs: qcom: Simplify ufs_qcom_{assert/deassert}_reset https://git.kernel.org/mkp/scsi/c/6b481af25ec0 [15/17] scsi: ufs: qcom: Remove support for host controllers older than v2.0 https://git.kernel.org/mkp/scsi/c/104cd58d9af8 [16/17] scsi: ufs: qcom: Use ufshcd_rmwl() where applicable https://git.kernel.org/mkp/scsi/c/0e9f4375db1c [17/17] scsi: ufs: qcom: Remove unused definitions https://git.kernel.org/mkp/scsi/c/cac50d04fffe