From patchwork Wed Oct 9 11:21:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13828238 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EF91CCEDD88 for ; Wed, 9 Oct 2024 11:58:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ghtUYLBlSjf3IggEwHExig2CKcpoS8dsJVFld1RzVuU=; b=E6+0WC6iznbGexycs6V1jbQ6wg N6ytJMUOC1BdUNrhqSeq0/eiWrGDcIjZ0lxd1DUWhxxuVEcBLNwCsHJewceK6JUy4nj9SVXtxIH+o eAS2tBHfKqB7tvBsinMfGeq0WLn/n+Zrv4mvdo7ZV0BD3hhRQpUw5MLVeAZ1vpBUnK21YV1g7+LJ6 t5OMSKEyqQUT2TCMco5dYhaCjSLXbRJBV6hY86AZQ45QAlASSk6xN/8YSFTdFjIH2OSzoAFim0yq7 kdngLjqMU0IAmrBHMXsXc5h7OJo5afDFAIEd2iBm8nJMti0GiVa3xDesLaZPIpDV5EkDOc/OmB9sj qAl6mx+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syVK8-000000097VH-09Xd; Wed, 09 Oct 2024 11:57:48 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syUlN-000000092Sx-0pee for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 11:21:54 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42e748f78d6so60082285e9.0 for ; Wed, 09 Oct 2024 04:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728472911; x=1729077711; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ghtUYLBlSjf3IggEwHExig2CKcpoS8dsJVFld1RzVuU=; b=c1HpCoJ+dgNvySjJ7YAjZ30BQMOi1IN59kO+lkGnpmhxsHz4XQDQ6nhMtx/4uFwNY6 gVg2MkAbxiJDfi8VOqcVHBxOBM/DpF3cNVB27dIa+WJz0cToBpbb4R6PD1eooQoW6829 bZYk5K/QJVpiBJfswnQ+vYQLFZ/aCCqZosqIp6f/YtfbqhgeTZB8PU7267ZFfOC/B9sd WuDI8kbRvg33yhjrSMS79P5Zt39NPhTqqnqaA9K84LgexsI6/Z2ET/kMGnvytXjnrEbq PKcim54UZOUeol287SWM6ZCleojLyeLIv5HRYl6cfCbwv/PD5PkhiwY/pZSMw0aEh+vw xYdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728472911; x=1729077711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ghtUYLBlSjf3IggEwHExig2CKcpoS8dsJVFld1RzVuU=; b=XldmTmzxoL2QeshE/4qENKN0VyqprfTlzHUkg+aKzjKW6CfFPszEQ7AxU379qHbW/J 7Cgi1NO75jlJXZ6vzOTccv0KRti2kXtNkIZKlkAW5YgTZOmMOMOgus1bAvTdfo3du4Rq 05k40pwF3FfGnyhwIhjE2f/jXWUw2oppRz8ZgGO7wIkR0XKfCh693xAkM8bLm/obmVlM 8XeaOBA2AFsw46xOjBLvUlE+IH/+SGRt3mtL2X85u2/7nRxoGJXnQi2j+dFKMQ+Yz9q2 zEHdq8v42DfGhglwFUpqTzSyAsi6OWthCPhW7laf/mwZ35hP1XHq1D7DLxHgC7QO1Afq dflw== X-Forwarded-Encrypted: i=1; AJvYcCUOlgJlaQ4Un0hD0IGRnbs4nIdeAB50pgEQamGjYImJXvWmFbmA4t1l2yZ7LjhMnUxDY6k/OvHRx4uvgLagdSzg@lists.infradead.org X-Gm-Message-State: AOJu0YwsSxA0fIT0hRe0bDDAuzF42JcKctUN6kC7181SufQh/hJR7/yL s6TLcb8c+ugkAnpYXdrJaTC7O8O25TxhA7vZlNqzYvk3sfy0kzD4tVPfCVBMgJ4= X-Google-Smtp-Source: AGHT+IEJX2RjpFeLUHsr4Qx7o7zdf3TWL+5xxAUSFTySxWEYnSA6UXjwYDBXPN59NyQNksavaCy8pQ== X-Received: by 2002:a05:600c:3544:b0:42f:7c9e:1f96 with SMTP id 5b1f17b1804b1-430ccf091a7mr14596575e9.1.1728472911183; Wed, 09 Oct 2024 04:21:51 -0700 (PDT) Received: from gpeter-l.lan ([145.224.65.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4310c3dcdcbsm12331445e9.0.2024.10.09.04.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 04:21:49 -0700 (PDT) From: Peter Griffin To: alim.akhtar@samsung.com, James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, avri.altman@wdc.com, bvanassche@acm.org, krzk@kernel.org Cc: tudor.ambarus@linaro.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Griffin Subject: [PATCH 1/7] scsi: ufs: exynos: Allow UFS Gear 4 Date: Wed, 9 Oct 2024 12:21:35 +0100 Message-ID: <20241009112141.1771087-2-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog In-Reply-To: <20241009112141.1771087-1-peter.griffin@linaro.org> References: <20241009112141.1771087-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_042153_387724_8EA48467 X-CRM114-Status: GOOD ( 11.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org UFS Gear 4 offers faster speeds, and better power usage so lets enable it. Currently ufshcd_init_host_params() sets UFS_HS_G3 as a default, so even if the device supports G4 we end up negotiating down to G3. For SoCs like gs101 which have a UFS major controller version of 3 or above advertise Gear 4. This then allows a Gear 4 link on Pixel 6. For earlier controller versions keep the current default behaviour of reporting G3. Signed-off-by: Peter Griffin --- drivers/ufs/host/ufs-exynos.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 9ec318ef52bf..e25de4b86ac0 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -771,6 +771,21 @@ static void exynos_ufs_config_sync_pattern_mask(struct exynos_ufs *ufs, exynos_ufs_disable_ov_tm(hba); } +#define UFS_HW_VER_MAJOR_MASK GENMASK(15, 8) + +static u32 exynos_ufs_get_hs_gear(struct ufs_hba *hba) +{ + u8 major; + + major = FIELD_GET(UFS_HW_VER_MAJOR_MASK, hba->ufs_version); + + if (major >= 3) + return UFS_HS_G4; + + /* Default is HS-G3 */ + return UFS_HS_G3; +} + static int exynos_ufs_pre_pwr_mode(struct ufs_hba *hba, struct ufs_pa_layer_attr *dev_max_params, struct ufs_pa_layer_attr *dev_req_params) @@ -787,6 +802,8 @@ static int exynos_ufs_pre_pwr_mode(struct ufs_hba *hba, } ufshcd_init_host_params(&host_params); + /* This driver only support symmetric gear setting e.g. hs_tx_gear == hs_rx_gear */ + host_params.hs_tx_gear = host_params.hs_rx_gear = exynos_ufs_get_hs_gear(hba); ret = ufshcd_negotiate_pwr_params(&host_params, dev_max_params, dev_req_params); if (ret) { From patchwork Wed Oct 9 11:21:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13828243 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9DF0DCEDD88 for ; Wed, 9 Oct 2024 11:58:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0G5+DGHRH9uKXySVvDG2zjq1MsEuwXbycCIn4qhJYMw=; b=cdwh1IUuv1tckt9D08mq9qrt1w DELw2mEy6gPsqjvorg8EUIbNDku91nuhlaQcZUtI5xhh4xh9djJj+zsqIxXZpYv9JsTz/9nruQh0o wCSnJ7cnKFrl6r1mAVSXV4QanOjWevpPgOXI9Psgfi/+F+C8u+5B8ol8RVCRpQN9QiweoQL7g7gLi BW2kiWm6lC1yUCy3Cx10+75VBejYGik9LZndv2uSs5RUc2t+7kTkfTZnLr0OT1qzselonGSOIB5+1 qIe5/kJFPh0ZwOtWZj99l1qo5j6js29DOZjeElbSQ2biWeXIwJ3+5zGunypQUHYwNSXRezdB/AcaR EURwHHng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syVK8-000000097VN-35aP; Wed, 09 Oct 2024 11:57:48 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syUlO-000000092To-49Ja for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 11:21:56 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-42ca4e0299eso59920335e9.2 for ; Wed, 09 Oct 2024 04:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728472913; x=1729077713; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0G5+DGHRH9uKXySVvDG2zjq1MsEuwXbycCIn4qhJYMw=; b=cJ9L5KzBtNuSIF4Vxx1154yjiZ2oD72pvK5Nt0ok/gsuGYNDM6MrVx7+3aWT4Sg0Og PN5af+bpmATZdQuH7miIocsOxgj6kCtN2qV06/zyYnIeUWEayKPWX37HGcGQ/dVSFn5H kItm6FFhwG+7d8bDtStlmgI546q7iqLa4/MXhV8d+7ObHFuGj0MR6hu/ovlNZErrEbUG G1Yc8+jUbojrzARlagndGTEtbFMG64CN1HGC3FkbWVlmSGvkj+G0m4Rnt530Cbqjz85V thpyWlJJUKXmvML42v+1Wyzdi6H1nPfwTKqQnYTsjbPocqSyoGU4aM/4wt6dK+yudm0C axsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728472913; x=1729077713; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0G5+DGHRH9uKXySVvDG2zjq1MsEuwXbycCIn4qhJYMw=; b=g8FDYZpEhuzYHnhyocK9oBt8yh/B1+wcD2R9I2iDUx+yDD+VSp74MVaAmsLTfCoVWl O6PuMtpZENb4VlRHTPPcQwqSsT9MoYeZaHsU51uv3OSwnSa/Lj9Y37iP0kfVMuLiGpSg Nb4aI8JkGCouiIeAxktlKSYGJpuLRaK4DKW5h1kGwMyMha5oINGlVQyLRyQK1mQgiTxM o7iCgsiG5HDpMpprvd8/XuenD278hEaLZy7SGMVM9t359J/DOD8Xl59xiw/rolFGJ5YS q6iOxjhaH6aSdFq9n/JfZ+9+Hr+y8JPJXISC7YYL8aldzqbhLbhL5VOPXdPa/UpjC57i XJYw== X-Forwarded-Encrypted: i=1; AJvYcCXFkHAXcuvQQpqTX2chGJe1C+MHR+8fOOQTEefI4QrJMJAFvb15WWv7HZIgzM4sMMMXAikRfiXU5ZJUGT0Eqx1F@lists.infradead.org X-Gm-Message-State: AOJu0YwoR+aOUjeImNBBllszHQ2+1u9r6D9+JeIl636ht+pzTgnbG1fX +cUUbMjE2evz2IYlhe7kRkcT8p1rfmeFNhDI5r8WHGapc6nSZ1oK/sJdSnw0oPY= X-Google-Smtp-Source: AGHT+IGDUkReqvpDILvzLlsGK2Z3Cg76lYE/cf1NIlvq1mdgxLrmdCkneJKzCCHIFSebONF2UDAWJQ== X-Received: by 2002:a05:600c:1ca7:b0:42c:de2f:da27 with SMTP id 5b1f17b1804b1-430ccf0859fmr13666665e9.2.1728472912789; Wed, 09 Oct 2024 04:21:52 -0700 (PDT) Received: from gpeter-l.lan ([145.224.65.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4310c3dcdcbsm12331445e9.0.2024.10.09.04.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 04:21:52 -0700 (PDT) From: Peter Griffin To: alim.akhtar@samsung.com, James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, avri.altman@wdc.com, bvanassche@acm.org, krzk@kernel.org Cc: tudor.ambarus@linaro.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Griffin Subject: [PATCH 2/7] scsi: ufs: exynos: add check inside exynos_ufs_config_smu() Date: Wed, 9 Oct 2024 12:21:36 +0100 Message-ID: <20241009112141.1771087-3-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog In-Reply-To: <20241009112141.1771087-1-peter.griffin@linaro.org> References: <20241009112141.1771087-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_042155_053329_9083406E X-CRM114-Status: GOOD ( 13.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Move the EXYNOS_UFS_OPT_UFSPR_SECURE check inside exynos_ufs_config_smu(). This way all call sites will benefit from the check. This fixes a bug currently in the exynos_ufs_resume() path on gs101 which will cause a serror. Fixes: d11e0a318df8 ("scsi: ufs: exynos: Add support for Tensor gs101 SoC") Signed-off-by: Peter Griffin --- drivers/ufs/host/ufs-exynos.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index e25de4b86ac0..939d08bce545 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -724,6 +724,9 @@ static void exynos_ufs_config_smu(struct exynos_ufs *ufs) { u32 reg, val; + if (ufs->opts & EXYNOS_UFS_OPT_UFSPR_SECURE) + return; + exynos_ufs_disable_auto_ctrl_hcc_save(ufs, &val); /* make encryption disabled by default */ @@ -1457,8 +1460,8 @@ static int exynos_ufs_init(struct ufs_hba *hba) if (ret) goto out; exynos_ufs_specify_phy_time_attr(ufs); - if (!(ufs->opts & EXYNOS_UFS_OPT_UFSPR_SECURE)) - exynos_ufs_config_smu(ufs); + + exynos_ufs_config_smu(ufs); hba->host->dma_alignment = DATA_UNIT_SIZE - 1; return 0; From patchwork Wed Oct 9 11:21:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13828233 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1A04ACEDD8D for ; Wed, 9 Oct 2024 11:58:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=LGYLAi4JF+h9/4Hxj8IqsekpEDYHXMIX8LJHajmfJfQ=; b=1aTqekXCVr4Y45W3GvT0qdfVwF zCDuiXhA6lOySOE226/XYq1oaQ0RouqGxgOysPQ8vws0OyzBjrR0fSBH6yHtStmkIMLs8xoxWOSKx YVky+rmCTZ9gD/NoqpYfmhl2i3LcJ+q2x5Fe/zU8OoQcfhCWsXeaGs/2WrFy6LmAiU+sY6JpxwH9U X4q034yDFEiiasBYtBx2MoT34TZxuFxt1XrtntmyZAcgooEsbjLal6IvURJd89luf6u9raB+WYNqq nosuZpUDvWeJEpW9PQIhWGbqgP+3xd9ROpRItRglAa4jnlgbJFxsfR52SUXUKkL0bKCB8q3WUQHpX ms/cBVyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syVK9-000000097Vc-1Q9d; Wed, 09 Oct 2024 11:57:49 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syUlQ-000000092UM-2YSq for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 11:21:58 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-37ccdc0d7f6so4208926f8f.0 for ; Wed, 09 Oct 2024 04:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728472914; x=1729077714; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LGYLAi4JF+h9/4Hxj8IqsekpEDYHXMIX8LJHajmfJfQ=; b=Nh9XNTxotpwDsOJdZL1fcv9qn60RGYHBvVnQHc9R/bSjQirYPXyVC5H7RmVgritdK2 tOvRxDDsid99g6yHgZUroP1DnJ0ZxHxFu+BdVaxMa3sP4jWHDi0ml+gFHqZk5dJe8IBz aiCyq8cJSV5GUeZZjo3XiJmwcURQD8PEgWYyfSkbMwYTKe6LOffY+Wb9ldZhrMOLgwBB I8ArWWQPoazfNQpUx/4m0iuLIpM7T9CZXokcGLQl2YxEZHoGQoH8eAzz7TDCfiMIlLwd fYV+B5CZ2GfJG8ISeupqQYrd/y8lxfaX+EzLCVOvFKMjYtfCcqxV/AUl2AjUNOoML9BS 6vVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728472914; x=1729077714; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LGYLAi4JF+h9/4Hxj8IqsekpEDYHXMIX8LJHajmfJfQ=; b=L5SSaYOjPAJE/M9sSZnY88RzuqJunLF9f8t5BxKdMG+xh3RwKjoxTA2UaBLuXmhLF/ LIQ6/5tuizEgl7IJozIbJvzVnhwHA8eJFezIvZsGx+xP+kPhy5W3UM71rdmXVkjKDb9n p/zkY/UcyqESMnSPK3+wPi143BpCbOOyEqN8MnE8/OCjhVGxVz4M0hjI1dGMbQXclTim c7vf5JXJvyj11NE8eOuuFmLCFlX6PA3nPHjwnN3Y8vUsAx5id7a5blxemgZg/HmqduOq cpxiyTr1QE8WoCHkFIWF2lyNERBe4Ui2z81pOidaZ51cbCTrl5qKohEbbDrKyjwnOn+f cMWw== X-Forwarded-Encrypted: i=1; AJvYcCXIsxmEAKKUGHsJK8gWRubPj0igvIYtqSBc7AEicZn5YKtWVLVYiolJhRfXp8a7VGPN++YtVJCSLCG3NPed6ukE@lists.infradead.org X-Gm-Message-State: AOJu0YypX2orWoOozjMLNeyW/FgJ1rxJHiVygil+Y3fqIZB1Tt1I3cgO 9CHaZvTCiz9Q7Zsp5WEqTsO2URYQldyWVs0i4FXDbeoIk9lZ66otTNgaDeKiLw0= X-Google-Smtp-Source: AGHT+IGdWtb+G4uTKWkGy+SLP7YhXIty2nIIk9lA4K60gde3ICkfsbfdSfZOvGEFpFCgPGCfowuJqw== X-Received: by 2002:a5d:5e0b:0:b0:37d:3e8b:846f with SMTP id ffacd0b85a97d-37d3e8b84c9mr844904f8f.24.1728472914307; Wed, 09 Oct 2024 04:21:54 -0700 (PDT) Received: from gpeter-l.lan ([145.224.65.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4310c3dcdcbsm12331445e9.0.2024.10.09.04.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 04:21:53 -0700 (PDT) From: Peter Griffin To: alim.akhtar@samsung.com, James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, avri.altman@wdc.com, bvanassche@acm.org, krzk@kernel.org Cc: tudor.ambarus@linaro.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Griffin Subject: [PATCH 3/7] scsi: ufs: exynos: gs101: remove EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL Date: Wed, 9 Oct 2024 12:21:37 +0100 Message-ID: <20241009112141.1771087-4-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog In-Reply-To: <20241009112141.1771087-1-peter.griffin@linaro.org> References: <20241009112141.1771087-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_042156_672371_E2D0809D X-CRM114-Status: GOOD ( 10.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This flag is not required for gs101 SoC. Signed-off-by: Peter Griffin --- drivers/ufs/host/ufs-exynos.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 939d08bce545..d685d3e93ea1 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -2142,8 +2142,7 @@ static const struct exynos_ufs_drv_data gs101_ufs_drvs = { UFSHCD_QUIRK_BROKEN_OCS_FATAL_ERROR | UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL | UFSHCD_QUIRK_SKIP_DEF_UNIPRO_TIMEOUT_SETTING, - .opts = EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL | - EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR | + .opts = EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR | EXYNOS_UFS_OPT_UFSPR_SECURE | EXYNOS_UFS_OPT_TIMER_TICK_SELECT, .drv_init = exynosauto_ufs_drv_init, From patchwork Wed Oct 9 11:21:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13828231 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96454CEDD88 for ; Wed, 9 Oct 2024 11:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pX3tu4r0T8hfLp3m76HchWclu4+8PXIAtD51r7i7hmo=; b=KvudBRh74Dus2U3jPHVlheN2we HxSMwDB7hsXiqxX6iMbZ+5f1Zfe4SDacO2GSw0Yl88fBMtZETaseXQKjCNSoCMqyd5ZEYfOOP4Fet 0v/4ZMRUSSgbCf9smdoK3tZY9xM7rIO4quE9HiGhhZzw4PcM2JzphlGJM9/BreOMCGdG79J/JXPqE wwVYxBJB4pk6CXDc7rV3O/zroG2roFHE0aRYrfLPFz/Q4LB/dyGg2mxgzlVtn5+FHt0ty4Evjcrsa jhBHvB8H9DPXvExOH6g1vHGagKtxKxzWRR3E2kEQayeWXb81F24YElq1CTcsuWB+9nU9BP+Pf4DUv Mp2oWf8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syVK9-000000097Vi-3nKs; Wed, 09 Oct 2024 11:57:49 +0000 Received: from mail-wm1-f47.google.com ([209.85.128.47]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syUlS-000000092W0-2JVp for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 11:22:00 +0000 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-43111cff9d3so4344215e9.1 for ; Wed, 09 Oct 2024 04:21:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728472916; x=1729077716; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pX3tu4r0T8hfLp3m76HchWclu4+8PXIAtD51r7i7hmo=; b=OZu7pHIMC0H9eKF7IDL5X9ftfMJolgM6k7AcdKQ093/N8+r+fJVohRl/hCXOpNZ+HA 1X3Bh+X/QZdeFMync2t4OLYk4uQ5iqv50U+aCbguMyEJyULLcsrDJmEorLqRZy5SmWHy h1eohcW7rXI7Z816aBwhtPhHAxrHaKlEcee59VLAnS9vFeD+FaAplLW4g+hg6wcTwGZT T0XxI/BYwCvtzII8ZlXdCD6NvbYfnTutxuG1L52wiV5Y+8hLTpbeZTQ1RDh0wuHH95gf WEAdjOO+gxoHRdMOAjKgXKZt4FENbhF4aLBUPOc52Yu3BiCR+WDpvs9pITpjCt7WrHe1 P8uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728472916; x=1729077716; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pX3tu4r0T8hfLp3m76HchWclu4+8PXIAtD51r7i7hmo=; b=mJrxdr+euZe0dQ1ToGtv9qhszKMLlz8Cz6FrFgHovu+I6eHgRJyZopLbUEyp8dctPO sx/4cDUdRgVv8O7tAr49BdtHK9usEx/oZB/B2N/wxYN1kZHQuuuHylaZHnQe4fVB13rq 8D5VhCvZsOtHE7brOeee/bep94Y42Q+8lhsgABalKEpUnDnOWFb/uDThC2OhEwRDoSmX dZHTLkU41KCnpwN8l/yYXyP+9IBj8bi+LgUp/d+kAiZ313lX21PPGyywnIAZw2N/ISgH Vnzs+eHQGxuL3at1cxCtF0hi6huJ2/JBca39ztTAA9YmUMyEY8q87Lb4khbQxcTCbGhv Ho4w== X-Forwarded-Encrypted: i=1; AJvYcCUysQvuZZDOAE+VssfPgffvByzpgUH7kNxRvcOh8qzN/G8TEiO6U0jx86izZhw5YuQi62li8mTNRAMsjIAD2GY8@lists.infradead.org X-Gm-Message-State: AOJu0Yw4ujUKpWIFxQAVwkw1wJplVpKlh87ARA3P9OZJnZgvVKGblIgM V+nUApWLkIOUN+sTvHHQTSdbAuXd2tBmZ19osgkSQ4WFWX+G5AmiWWVBepPoUas= X-Google-Smtp-Source: AGHT+IFlZ/wsuxYNG5Un8P/i6V6t9CA6cih0ZKz2NoHn5swbiS3uEf9ML/RKj5myS1RUufBKpr7pTA== X-Received: by 2002:a05:600c:3b12:b0:42b:afe3:e9f4 with SMTP id 5b1f17b1804b1-430ccf08948mr14280075e9.3.1728472916015; Wed, 09 Oct 2024 04:21:56 -0700 (PDT) Received: from gpeter-l.lan ([145.224.65.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4310c3dcdcbsm12331445e9.0.2024.10.09.04.21.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 04:21:55 -0700 (PDT) From: Peter Griffin To: alim.akhtar@samsung.com, James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, avri.altman@wdc.com, bvanassche@acm.org, krzk@kernel.org Cc: tudor.ambarus@linaro.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Griffin Subject: [PATCH 4/7] scsi: ufs: exynos: Add EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR check Date: Wed, 9 Oct 2024 12:21:38 +0100 Message-ID: <20241009112141.1771087-5-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog In-Reply-To: <20241009112141.1771087-1-peter.griffin@linaro.org> References: <20241009112141.1771087-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_042159_017278_EB5D95F5 X-CRM114-Status: GOOD ( 11.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The values calculated in exynos_ufs_specify_phy_time_attr() are only used in exynos_ufs_config_phy_time_attr() and exynos_ufs_config_phy_cap_attr() if EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR flag is not set. Add a check for this flag to exynos_ufs_specify_phy_time_attr() and return for platforms that don't set it. Signed-off-by: Peter Griffin --- drivers/ufs/host/ufs-exynos.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index d685d3e93ea1..a1a2fdcb8a40 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -546,6 +546,9 @@ static void exynos_ufs_specify_phy_time_attr(struct exynos_ufs *ufs) struct exynos_ufs_uic_attr *attr = ufs->drv_data->uic_attr; struct ufs_phy_time_cfg *t_cfg = &ufs->t_cfg; + if (ufs->opts & EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR) + return; + t_cfg->tx_linereset_p = exynos_ufs_calc_time_cntr(ufs, attr->tx_dif_p_nsec); t_cfg->tx_linereset_n = From patchwork Wed Oct 9 11:21:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13828242 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96C3BCEDD87 for ; Wed, 9 Oct 2024 11:58:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9yc2bquJWnC0TuLEtllIK7qV555Ljs382cn6kxswI5k=; b=1NnDT32Kf9NKwrvLZkKRE7qswi X8sSyWKUrzTrZ1lL3FDu0whsloPcCA54ib1DM4kei44A7lb/RedgpUiXNF0ozD3vIyu4nuT2Dbd8m MKlmAyHWshk3dTqnVcz4V+sQHqh3Ci2qZNRfp8tgJdkTfRy2QxmfcKQ3xplsJEbQnnDsbQxVkvSZz H+nPdttmtM2JjDHNgrz8oOPqsHGpDN2WEcTx5HrcS5+E5X2Xc31SqKtsy89hyg+R/MYxAdr98SsUR Z7ttt6VpClL//JxkfQKtDsEKgE7OpE9a3dyjLJAan2jijKIKvSFaovZ8AbIttZUf6lSAw0UzG0tby g16EBEjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syVKA-000000097Vm-1xqp; Wed, 09 Oct 2024 11:57:50 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syUlU-000000092Wg-3pJR for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 11:22:02 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42cbbb1727eso67910275e9.2 for ; Wed, 09 Oct 2024 04:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728472917; x=1729077717; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9yc2bquJWnC0TuLEtllIK7qV555Ljs382cn6kxswI5k=; b=WF/Mikxkx0eVgFfIFFDzZAuJl47U3PveEcYpzPIdpM+o9+y3IR3xBGFUr32jX5+Nwz fbw6ebAl5tq13oZv6KEkTs6Ad3ZgS7cOrBZWDPZ97Zyl/Bw7J8eyR10YTN0cdUBTFmJy Zeodbd//RHhgjdfRnnrCzDql+SFiOPY0AkSP10P6ANx5bWwCtcgUMTfwRntC0hU7ASnA 1/E+Ny2uCzLDH0wx51MHtBakKIqV98n9Qtt2kklskmRKESQnbMhtcTN54vOc6/ZtuhX9 D/QPeYVljhCtacGaggbPPLNDIbIw7GjSLe3og5zXqtYQkPwO98eEF+hZef3G4zZnnbv1 QcCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728472917; x=1729077717; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9yc2bquJWnC0TuLEtllIK7qV555Ljs382cn6kxswI5k=; b=jOXFOUmDd9eQiN3hHl/zlRb+ipJsLNuir17GP9wFhXNNNKRU3ZD6TK+lieJTqW3yEy C0YyN8Z0PRARAqy7OyjN7sjUsDEo9VcN2ydHlre0FeTCC+UlonwM5hZBz5PaNU5qf5UM WGn3v7wgtH3yfzpc0RvIT4q4QOusjUsBthpYl/q+TGFVnYnRsgHYs8HTl6QM/8LSgIpV sI8xib3oGZz8GSeEa8C0V3f8qIWIHOkvvHVkHiJ0/ScmgBPRha6os14kLtnH1RRohaeN CO2403/YgBQ1i4qVvKW6mKD6HDIc2A1Qn/4OjSeQ4zsKN7+lmmfuya/SjzcFJ4NRsbe2 7IaQ== X-Forwarded-Encrypted: i=1; AJvYcCXlC1ps6zCi0qnl3Q64GuiLiaVSmxQWQha06bIXLTzZpdk3WAVeuZgA5X4ly23J5n2MxlP7zaEje077RKmvTmA6@lists.infradead.org X-Gm-Message-State: AOJu0YyqYXnJ01AGodhiRq5eT/bitogURtxVFACuXeKvtMZt46CMxbu6 JAKD0AG1+VCd6pM/TKQJfkmyTO3foqMOcCHNQ4+rKmwSdLEERq+F2N6xws4Av+c= X-Google-Smtp-Source: AGHT+IGVIzAhsUABVyJOyEwZGVXwYpzikVWau3b/o+ECvGcy7vkekMhISm+whoMp+we4FD4krW7kMg== X-Received: by 2002:a05:600c:45d1:b0:42c:a905:9384 with SMTP id 5b1f17b1804b1-430ccf4affemr14524345e9.20.1728472917542; Wed, 09 Oct 2024 04:21:57 -0700 (PDT) Received: from gpeter-l.lan ([145.224.65.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4310c3dcdcbsm12331445e9.0.2024.10.09.04.21.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 04:21:57 -0700 (PDT) From: Peter Griffin To: alim.akhtar@samsung.com, James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, avri.altman@wdc.com, bvanassche@acm.org, krzk@kernel.org Cc: tudor.ambarus@linaro.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Griffin Subject: [PATCH 5/7] scsi: ufs: exynos: gs101: remove unused phy attribute fields Date: Wed, 9 Oct 2024 12:21:39 +0100 Message-ID: <20241009112141.1771087-6-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog In-Reply-To: <20241009112141.1771087-1-peter.griffin@linaro.org> References: <20241009112141.1771087-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_042200_972612_E20ED274 X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that exynos_ufs_specify_phy_time_attr() checks the appropriate EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR flag. Remove the unused fields in gs101_uic_attr. Signed-off-by: Peter Griffin --- drivers/ufs/host/ufs-exynos.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index a1a2fdcb8a40..9d668d13fe94 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -2068,26 +2068,6 @@ static const struct exynos_ufs_drv_data exynos_ufs_drvs = { static struct exynos_ufs_uic_attr gs101_uic_attr = { .tx_trailingclks = 0xff, - .tx_dif_p_nsec = 3000000, /* unit: ns */ - .tx_dif_n_nsec = 1000000, /* unit: ns */ - .tx_high_z_cnt_nsec = 20000, /* unit: ns */ - .tx_base_unit_nsec = 100000, /* unit: ns */ - .tx_gran_unit_nsec = 4000, /* unit: ns */ - .tx_sleep_cnt = 1000, /* unit: ns */ - .tx_min_activatetime = 0xa, - .rx_filler_enable = 0x2, - .rx_dif_p_nsec = 1000000, /* unit: ns */ - .rx_hibern8_wait_nsec = 4000000, /* unit: ns */ - .rx_base_unit_nsec = 100000, /* unit: ns */ - .rx_gran_unit_nsec = 4000, /* unit: ns */ - .rx_sleep_cnt = 1280, /* unit: ns */ - .rx_stall_cnt = 320, /* unit: ns */ - .rx_hs_g1_sync_len_cap = SYNC_LEN_COARSE(0xf), - .rx_hs_g2_sync_len_cap = SYNC_LEN_COARSE(0xf), - .rx_hs_g3_sync_len_cap = SYNC_LEN_COARSE(0xf), - .rx_hs_g1_prep_sync_len_cap = PREP_LEN(0xf), - .rx_hs_g2_prep_sync_len_cap = PREP_LEN(0xf), - .rx_hs_g3_prep_sync_len_cap = PREP_LEN(0xf), .pa_dbg_opt_suite1_val = 0x90913C1C, .pa_dbg_opt_suite1_off = PA_GS101_DBG_OPTION_SUITE1, .pa_dbg_opt_suite2_val = 0xE01C115F, From patchwork Wed Oct 9 11:21:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13828232 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63C30CEDD8C for ; Wed, 9 Oct 2024 11:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=2DpEnA3YplEcQFI6shVCtQMIfbctSRU8+HvPgo32UcY=; b=eaZY7q2I9p/isMJtNmpuzKveLq nsDNfgEmlkNrF+4v5m6AU76B706VixxBsozZTI+ahcdeZiTOzl5Fqee6YVNd7uUqt1126NkVuevus Z98RpUm8QM//+X9mJs+aHtQj6zq7sEEyZbWh4yPFfZcqI/wjA5OswyAl6LRAMiKohfw0Uqs6+VW5f fxHo3STWHIC4brG8w3lXRco7XcKm2tQOyJRKmYVQViRuvTXK+0UHYxpOD58BKq5VdXokIQdF5HcjI EUr1OVAuO2eN0PoH94O4luloUTCmCvwKbl83+px3HHKYTo6lFhjeXStf9L4i1lzJRFYhLzSSAuKev pz1HZfUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syVKB-000000097Vu-0DRb; Wed, 09 Oct 2024 11:57:51 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syUlY-000000092YP-3vuf for linux-arm-kernel@bombadil.infradead.org; Wed, 09 Oct 2024 11:22:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=2DpEnA3YplEcQFI6shVCtQMIfbctSRU8+HvPgo32UcY=; b=VssNtna7x7KTQZ4wVtmrwmYZSi 7E2bgKsOZRHsxE+OBs0YPa2oa8Duib61iHJs1e5x3W8ZIQdAq6QYxYAZp0gRO4d+QJXkS0cv+8NuP H0u2BzxBrPN9X+kZL20bvNVh0weNPngUwBVpH0D/bONfp/uXvMcGrLHXk+FyYKy56P4c4jdZCKeFV sAsDdtdBM0Cr3H6cdO/apWvuOFvCuPYhImO39KLKSfiU8BE8eX2wAS5rkpzGElhJbW7P9Q8wLoGZ9 2Mm22NiEw1uZ81YvDc3nXczQyuDaoif10OLZIGBvn09pPCghfGrHTc83iOI+0i74PZt6IhpRvT3Qc ph2nWoyQ==; Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syUlW-00000004vQt-0L3B for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 11:22:03 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42e82f7f36aso59542045e9.0 for ; Wed, 09 Oct 2024 04:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728472919; x=1729077719; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2DpEnA3YplEcQFI6shVCtQMIfbctSRU8+HvPgo32UcY=; b=JoLMxQgbRsYygzCrAHB/G23KbWW89HYte7mWi5ri0aVWczIPhHy50FFJUP8QDPTTAq 8Ms1Y9AsI/oToTlQiPPVGAychxn5cl2QrE9V46iZVmgZ5pn8rVkserLPPdnPF7rDo1sm EVhHmpQsuGtZSh80ZIrKLzDqAw+CyBsQ+Whnaan0uvIH666oDwG0BoaGh/MjF/LvA/R4 HUr7H3AS/yznkw6rz8sGnuztoP6tANAFkhiJy93X33h+s79xVZvsVdkVUCKsOL40yBXz 6Ur5SzLbdevTdtngWCoipeQxqmb7aAZ8Je6+j8CParESykofK8tGkF6rSOWF/e6WDtuV 3ZUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728472919; x=1729077719; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2DpEnA3YplEcQFI6shVCtQMIfbctSRU8+HvPgo32UcY=; b=BnN0RRui6mBzZdfMk09XTj/egMvzjjHRNs9YS0TNYVfHZWo6806aFafwXVQZGJL4av DnHirEJQyk4kPPcRJu8PqqTd+NA2pz56GinJ7jcUCEBie7txqMqXZ0k7Lq801s1Ef6NA tDR55xTdfisgWWtnKfgW/rRVTtsZY0OSRMCaHPSfRfhyTiDEryZetC4qevr0e906Ptjd 3xnyKT3+rg4Biixqf1tBcu6R8UJWAiQGiS8CBBmPwwNcC7SxeVi5o4WqZRVOD2DkYXn4 fiTdbICe8+Q/4k4HiSjb2Uqku0UU/4cIR3H+kB3fvhdqXy2Qhy+Db/jGGhgESZCQS+hF J8bw== X-Forwarded-Encrypted: i=1; AJvYcCVHy2DN9Wej8osDzDDnBuHcB+UYC+BJbxmz1RQ8Zw3Kf8SoZeR3hLUpRFj2gz64wnBm2np68BGOf/6zW3WN0B7s@lists.infradead.org X-Gm-Message-State: AOJu0YwFHypXHvenz8u65hdUQRib6uvx+NlHe/LlhlhMajiuX+VJRv1c M4ItAqT9Hjb2AZh5iUKaSCk2ulPgcCnZPMSMEq9ety79JkKMKy+w5aD85xB0tHI= X-Google-Smtp-Source: AGHT+IGuNlqf0UjHLa+gCSHuJwmN6aEEWrwupvo8fc+pj3U1PFfl1qX4v/XDeaScMudS3KJA7vTNzg== X-Received: by 2002:a05:600c:4f48:b0:42c:bae0:f065 with SMTP id 5b1f17b1804b1-430ccf041a5mr15501335e9.5.1728472919068; Wed, 09 Oct 2024 04:21:59 -0700 (PDT) Received: from gpeter-l.lan ([145.224.65.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4310c3dcdcbsm12331445e9.0.2024.10.09.04.21.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 04:21:58 -0700 (PDT) From: Peter Griffin To: alim.akhtar@samsung.com, James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, avri.altman@wdc.com, bvanassche@acm.org, krzk@kernel.org Cc: tudor.ambarus@linaro.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Griffin Subject: [PATCH 6/7] scsi: ufs: exynos: remove tx_dif_p_nsec from exynosauto_ufs_drv_init() Date: Wed, 9 Oct 2024 12:21:40 +0100 Message-ID: <20241009112141.1771087-7-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog In-Reply-To: <20241009112141.1771087-1-peter.griffin@linaro.org> References: <20241009112141.1771087-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_122202_234770_96344615 X-CRM114-Status: GOOD ( 11.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Firstly exynosauto sets EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR so setting tx_dif_p_nsec has no effect. Secondly this assignment can't get executed as samsung,sysreg dt property is provided in for this platform. Meaning the execution flow will return on regmap_update_bits call above. Signed-off-by: Peter Griffin --- drivers/ufs/host/ufs-exynos.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 9d668d13fe94..d4e786afbbbc 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -205,8 +205,6 @@ static int exynos7_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) static int exynosauto_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) { - struct exynos_ufs_uic_attr *attr = ufs->drv_data->uic_attr; - /* IO Coherency setting */ if (ufs->sysreg) { return regmap_update_bits(ufs->sysreg, @@ -214,8 +212,6 @@ static int exynosauto_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) UFS_SHARABLE, UFS_SHARABLE); } - attr->tx_dif_p_nsec = 3200000; - return 0; } From patchwork Wed Oct 9 11:21:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13828245 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6367DCEDD87 for ; Wed, 9 Oct 2024 11:58:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=W1Fwj3/79g+NY6+faRKtNgwsGaf+fSmMjnCj8KQUGTo=; b=eOmwsJW2I9WpA7fjxnkO5l1l2l xJevBXn4IHg4ZvFgjCzeAMvz4odUsePnJKOJlD4+kBiGv1FB+gEswivOlRShsQyxAF8EityWevrTA bB+k6zdkGBSsL50Ors5IK3q65JaqBRbMP7vN7A4ByBTJJtNr6SLUWcQ0wJkgHviQ2NbpJqaKS5B7S UMePOYb+dmwjpQ3WFfZeelpnFiqjnJJhQELFYJ0OudOH7x1ke1S0EauwL+4d3PoQFNKquID7PgO2O W/odytlypwM/v61G2F77SbSU4YemepbtmLcIh3rBDUisS1QZemX0JIIzfpKyXFmYNAvTY/ApY1b+t UzstWbBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syVKB-000000097Vy-2etw; Wed, 09 Oct 2024 11:57:51 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syUla-000000092Yb-02Rn for linux-arm-kernel@bombadil.infradead.org; Wed, 09 Oct 2024 11:22:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=W1Fwj3/79g+NY6+faRKtNgwsGaf+fSmMjnCj8KQUGTo=; b=R88708Srn1eiUAkdpl37QgTrKD h8dt2rfrQy2jvsVTDkMSOoUlr/fP9A4zb1oyRM+zJ+mU0wdYyjMLlI+2p0vaPas1V4+cdKJbGZn0g XvDkI51vbtKQCCGou2oWK0AcZryKd7uMXhnM3Ru62aLgv6CKMAq7kVw+/ehrxMERscCyOYwN0yPH0 L6A+KdIrmkPTeV+p4WOB4jsEZsMm0bb+oOmbPKXE620E0mdrfwU9uQuxWd5Ryik95ze49a4IFv3Fm RhdikKW1A6x13FQ6OrmNox04GcIEVZw5bimhtciAIVLQgTLLpSC3Dl1rVruVnMnpJVkuPoeOESa4Y knkwQCKA==; Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syUlX-00000004vQz-0eva for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 11:22:04 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-42f6bec84b5so69070195e9.1 for ; Wed, 09 Oct 2024 04:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728472921; x=1729077721; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W1Fwj3/79g+NY6+faRKtNgwsGaf+fSmMjnCj8KQUGTo=; b=G53h9vfGXoMvlNAVcwipngeeOXO7AZaXgp7fLZlyX15TYzi5OX95116G4yOtPE34cJ l1JYDJ4Y/zqhsx51NVzHUN9jLv9PUoK07P4ToxwCcfRS33J9BxTD50GdRnQK8Bn07yVm f5//T2IUD6FIPSoWC6TduLK3DRZBllLaCJQ+fopPzIBGKlMOB+0jnHEW5J0DHC+4DGlm aVo2aDYIzHPILo2/1WFzVVGWXjS+X32Kx5zo0pRBdDpUljbIPh7WfoMPfDIVaKuHXLac sR0iQtTuHkQPeWlrN2TdPMHig2eyDdsA804FQ7D3iBqrh8OsUoBM4mNqk4X3ouE03bhX QhVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728472921; x=1729077721; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W1Fwj3/79g+NY6+faRKtNgwsGaf+fSmMjnCj8KQUGTo=; b=CZd6TuwDKOTWaNRDD95Q5xGU99vmld9MBbeffVp634AlRGE3hKyeGHAAJh8s9Ne1o6 s509vQtBi6j8KfD3ciUxcqcjwzsslx9KVGD5tHdnzw8BPdU6FLC8Xh5iB8N4HeSAtKPe wd4/NS/Hc6meAE/GDCAeESDJry/TelGsAXMe9fKr33a42MK+7forVtqAuA6cSD472Uhl ZiycTukA5q+LjrkvWs2vDoEwkKMvZf4/SBe4HjQsS/wTGWgKk+ZXJNkd3Tb7kVMojVpE hqokQexjLWu/l293YcehF40w+dcKC46170SUN9PRzoSxwnP900LA8t/WdAf3wQWnIEHd eQMQ== X-Forwarded-Encrypted: i=1; AJvYcCUfIjTttU6GvYdUoyFIPenuzIR2mU8krJVCSRshagp1OUzBQoc3QyfymTyefnqp6sbQa3C+PlLUvCnOBoJgTBhf@lists.infradead.org X-Gm-Message-State: AOJu0YxByUAOCihRmb+/ciAAkLNy4d6O1TEyOiYBOs0tclQOKu8g0TA3 vj67YWydE75WyOEWUDCXBMNqiw+MBjFeoh0cW226Ce6f05RYJ1eEpBRi7qwqEiT6x5JA6hi08UB x X-Google-Smtp-Source: AGHT+IGhYNO9ZBnMSQoh0ZgHAq4d+L9zcAuCJO5c+hulGqbv+vwl+vbBiaHCglEGvUH+mq9MA+vOBw== X-Received: by 2002:a05:600c:4ec7:b0:42c:d74b:eb26 with SMTP id 5b1f17b1804b1-430ccf48471mr16078145e9.21.1728472920765; Wed, 09 Oct 2024 04:22:00 -0700 (PDT) Received: from gpeter-l.lan ([145.224.65.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4310c3dcdcbsm12331445e9.0.2024.10.09.04.21.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 04:22:00 -0700 (PDT) From: Peter Griffin To: alim.akhtar@samsung.com, James.Bottomley@HansenPartnership.com, martin.petersen@oracle.com, avri.altman@wdc.com, bvanassche@acm.org, krzk@kernel.org Cc: tudor.ambarus@linaro.org, andre.draszik@linaro.org, kernel-team@android.com, willmcvicker@google.com, linux-scsi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Griffin Subject: [PATCH 7/7] scsi: ufs: exynos: add gs101_ufs_drv_init() hook and enable WriteBooster Date: Wed, 9 Oct 2024 12:21:41 +0100 Message-ID: <20241009112141.1771087-8-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.rc0.187.ge670bccf7e-goog In-Reply-To: <20241009112141.1771087-1-peter.griffin@linaro.org> References: <20241009112141.1771087-1-peter.griffin@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_122203_237874_216C08C0 X-CRM114-Status: GOOD ( 15.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Factor out the common code into a new exynos_ufs_shareability() function and provide a dedicated gs101_drv_init() hook. This allows us to enable WriteBooster capability (UFSHCD_CAP_WB_EN) in a way that doesn't effect other SoCs supported in this driver. WriteBooster improves write speeds by enabling a pseudo SLC cache. Using the `fio seqwrite` test we can achieve speeds of 945MB/s with this feature enabled (until the cache is exhausted) before dropping back to ~260MB/s (which are the speeds we see without the WriteBooster feature enabled). Assuming the UFSHCD_CAP_WB_EN capability is set by the host then WriteBooster can also be enabled and disabled via sysfs so it is possible for the system to only enable it when extra write performance is required. Signed-off-by: Peter Griffin --- drivers/ufs/host/ufs-exynos.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index d4e786afbbbc..b0ccff7ca3fb 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -203,7 +203,7 @@ static int exynos7_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) return 0; } -static int exynosauto_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) +static int exynos_ufs_shareability(struct device *dev, struct exynos_ufs *ufs) { /* IO Coherency setting */ if (ufs->sysreg) { @@ -215,6 +215,21 @@ static int exynosauto_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) return 0; } +static int gs101_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) +{ + struct ufs_hba *hba = ufs->hba; + + /* Enable WriteBooster */ + hba->caps |= UFSHCD_CAP_WB_EN; + + return exynos_ufs_shareability(dev, ufs); +} + +static int exynosauto_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) +{ + return exynos_ufs_shareability(dev, ufs); +} + static int exynosauto_ufs_post_hce_enable(struct exynos_ufs *ufs) { struct ufs_hba *hba = ufs->hba; @@ -2124,7 +2139,7 @@ static const struct exynos_ufs_drv_data gs101_ufs_drvs = { .opts = EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR | EXYNOS_UFS_OPT_UFSPR_SECURE | EXYNOS_UFS_OPT_TIMER_TICK_SELECT, - .drv_init = exynosauto_ufs_drv_init, + .drv_init = gs101_ufs_drv_init, .pre_link = gs101_ufs_pre_link, .post_link = gs101_ufs_post_link, .pre_pwr_change = gs101_ufs_pre_pwr_change,