From patchwork Fri Oct 25 13:14:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13850700 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 51564D0C609 for ; Fri, 25 Oct 2024 13:27:25 +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=mphjevL2wKBjhbt7qb95YXVF8X2HJNmvgdrJOySayeQ=; b=Qg8dql4K/XdPwAnUVl5BjGZMVV qJZhDnVOQZomn32MUDASc8R6O6n0PCbKojT3+YtxC6HgP9czetkUBADtj+scJbQWNZ/JeHIZAsI+a CTwnQOIVDe4BJBUcDpItc+dVOcTG4wBu356d5z/7V4Qmb4wy0jiH5Zg2VEDN4WLpjsIIMg+Odwa2+ dAmypJ3OeBF1W8Gu7kSveKBRb5NPGvRUE9ftzE/QjjIzg+MMozt4eRdFK5NQL8Gtp/zizPB3Pmg7g rskbBSpPJQmHpxVvsREm60ozPJuujIfvE4T/q1K7Xq3ZYiJnBTLy7jU+eSnp1tt93skFaVZCel1o3 3Xx0iaTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4KLT-00000003okf-1Rw4; Fri, 25 Oct 2024 13:27:15 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9T-00000003mhk-1L1K for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:12 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-431695fa98bso19834145e9.3 for ; Fri, 25 Oct 2024 06:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862089; x=1730466889; 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=mphjevL2wKBjhbt7qb95YXVF8X2HJNmvgdrJOySayeQ=; b=JsJBJPQTRfQiPXB7BvEGOHkYsIBb87HZpeoq7Jm4Ow0VoPBuLun8YpfzF1OY23QEVh PzBAOXwGeZ6Ha18sacmwyxQWQ0xZdsFfQjZf7KvlVbN7pT3ZEOSpNddSPDzPflvSE2h5 2RiTVNTZ/uBmdEN4WArNOLn2CZvfAGbr0pTMBboSDFcHOwUTI/YLk3Dx3s0hhAR8HRVU MLxASldwmlfYI5OAAaUg1sw4gC7vj4Yv/yFwH4FAyzRgbuxFf8SwHEdTtz0eBz9pnBbx k789KQW/6cx6TEMPxFnMuTbTQsXGLtapXhaxD/4Mt7NMy4aDs/CU8/oLJV5yhf2RfdWG gSGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862089; x=1730466889; 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=mphjevL2wKBjhbt7qb95YXVF8X2HJNmvgdrJOySayeQ=; b=Qu+urR8bupublMgKDEoDhe7pO+8bZsibVZSDHiAmMI+nV13BmM89WnSTWKfhM/cDtQ RX8qwfcUO8odEIovi0NZ+S/DTotq3QjNTfSaG0XBJ+KjHNt5ok5r8wJuSA3lGVQ8lr15 tc6lGtBvSQZFQmGpxE+krCgTSDXYDqDa16JqYQC/BwaDPhgMcqAfrh0hKLzs4rWBYJRb la4lFcfCswMgqBmU8s3P3yRTPnvWUjZpNE1SblzCdO9S9akeFOAzOlBa2D6nSHuK+REn eVuNN3ZEp2WErKwvz5+tNPhpjsVgnbwCYIBJ8gaIKAuwwVBtdKainSmAYzHF/Zxk4ITI QtGw== X-Forwarded-Encrypted: i=1; AJvYcCU9c4MMCR+pUCsrIhHWlMRew1U+h8CVLKvmo14YMh7uwAMXD766FUjqSDGIPKYFPhEXDG0aATSsOs/ATwOlB40B@lists.infradead.org X-Gm-Message-State: AOJu0YwKjnyLrFlOrNh54Ob/Glp5pZKRvoqh0lBGzapEAdrWLefLPmWd ilxBmijhveZOePXtscvflCVm5N9AcsyFWefKh5u6Vh6y3Ph2ipUPGx/e5U42EjQ= X-Google-Smtp-Source: AGHT+IEoUmmF2a29+b6OYTb4dbCjEKsfEZfPzHCBO3Ytnq8YsVvh+s+5uHtHvSiBw8IREAZ9aiGHMw== X-Received: by 2002:a05:600c:468f:b0:42c:a6da:a149 with SMTP id 5b1f17b1804b1-4318c73a46amr48990985e9.25.1729862089150; Fri, 25 Oct 2024 06:14:49 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:14:48 -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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 01/11] scsi: ufs: exynos: Allow UFS Gear 4 Date: Fri, 25 Oct 2024 14:14:32 +0100 Message-ID: <20241025131442.112862-2-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_061451_556633_0C60C2A3 X-CRM114-Status: GOOD ( 11.70 ) 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 Reviewed-by: Tudor Ambarus --- 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 Fri Oct 25 13:14:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13850701 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 A8D8DD0C5FA for ; Fri, 25 Oct 2024 13:29:00 +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=9ndmeeqYmXUmeG3ahgXNOhxMW6zZzHIs2RxYCsW225E=; b=Ty2ISc/ITQx7QsGsKjGfp+sNyc qEDODE/DR8wIBFoUsGA5Cvox/LOLWogOBk+vhLhZ6GY0uuSqGecO3LttCITpRlwzh0LWwHN0pOTf4 95QD9jk0pTVG+ChY+F6IX2fnBeaujkEu8f6J1SB+qBs1/xolXnFwPhh3v7SYZ07iRygfrvfKyRCF2 nw3obW7O3qcU2KHL4BvGhAiC1TFkXZUas91uHJKG8sv/Rg+CBR73XutmXGKO3r2YnpaHMrvm5C6xw j70c48FiydM/2TjPrnYT6ffON8U4GA8th6jQevlUkh6fIepQrydEoJXEMqToiNfuI75rUQ6zEFVLz /flGfVGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4KMz-00000003oxu-2aNd; Fri, 25 Oct 2024 13:28:49 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9V-00000003miq-3VjL for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:12 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-539e8607c2aso2359111e87.3 for ; Fri, 25 Oct 2024 06:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862091; x=1730466891; 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=9ndmeeqYmXUmeG3ahgXNOhxMW6zZzHIs2RxYCsW225E=; b=n+BxK/GFVc2KWPtjTEnTlmVHkdMUeVKKb56KYGEWQBuCpozv79jHiDchr2KTKrqYwG VeCcHUL+e3WgyQq46edsKJi8RGD7MGz7FW7eVdqFaFusCVcaQJv/WVx7sIe1cNkAt0T0 vM3vcHGxswDCJWXjoj8Uj3uoA/va9M0j3H97UEb/5SdrWZbtkR1fV5x8IE9KVHuPJC71 dW751+gKfJ+xuFhfwQ8oggMczFPGxcm/VQk61bQKIYbg6GJNo4YEAoLVAzNoKUWk1/1M 7WuwvveMHTpL7Jm4wqsFheqcgbHBLWRZiyGwwRBCqRu6XbbniKRGy68XdOODPK5tM+ej k/uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862091; x=1730466891; 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=9ndmeeqYmXUmeG3ahgXNOhxMW6zZzHIs2RxYCsW225E=; b=NDhn0tYglf1JkD3nFbVICL8UNFhlC7ANoIzTjKhvNneXjx8l0ApBRp1qVhVpeS1ieY po2QNigEjD0gSg68vOt5+5lwuw8bgAspqFnDEgmFp1sF3bsIDtON20TaaQ6Fc/U5qUxx Sx5zaj5FTLD49F8LCmW1dvya3kNsiGU1o3wwtLIvGS9xdAVLbgeLypm3UOIwXRMb3RLM bi5b3iidJ2hrYVOENAbC8eLTmK9ic/6g4L0+aXnd+AIZlBJTpG50dwQxqJTUqtk5wYqn XByWmzwBf7Z6AnhPdG0p5Mtdmr8xRj78zF6gcq1DWbZQSiYyYMJq4QQYRqEzpesuAt90 defQ== X-Forwarded-Encrypted: i=1; AJvYcCWDvwMvH1kqp8GMggoitIBj3E/WcZEZn/MijVfJ63k9jjDmoYO8PXM76I1gSvWQhFlgUw5O/MoAm0fXKKjJGDV8@lists.infradead.org X-Gm-Message-State: AOJu0YxZ4DXCs7grcHHMbbQvt+u0GvEreEwW2/fXdfcgx2e6RLw/3ZLv NWWy7zfbrnPaiMZJhf9MQrAX66vh2MyhwSAo2TekFtasrncsV3Qb8bu7Vfqi9VY= X-Google-Smtp-Source: AGHT+IGqC8HKU9NrjiBFGdut1et0Yr+WYmeKxlnHqZ/w+vIyRSTfXiYFfbHCJ6h5jr2qgVPoi7F9Wg== X-Received: by 2002:a05:6512:6c3:b0:539:e279:b3da with SMTP id 2adb3069b0e04-53b23df5806mr3664939e87.18.1729862091324; Fri, 25 Oct 2024 06:14:51 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:14:50 -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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 02/11] scsi: ufs: exynos: add check inside exynos_ufs_config_smu() Date: Fri, 25 Oct 2024 14:14:33 +0100 Message-ID: <20241025131442.112862-3-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_061453_895053_51DD231F X-CRM114-Status: GOOD ( 12.76 ) 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 Reviewed-by: Tudor Ambarus --- 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 Fri Oct 25 13:14:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13850703 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 B1140D0C608 for ; Fri, 25 Oct 2024 13:32: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=yQgS5nIosT9WP+28fCSlQ/AHJVYYLIctL5rlsevVeIM=; b=ejsznp6muWBxN7UyE6KWkkat7z pUO8uYpB0l/EIqf94VnLDQ65wUoPW1rVEofA+uZljw7qerU4bRdzOhg7JoHYGuet3XkcXcSdhn79A xkPmPiHejPZ+VbCVXb0CJAjjWGUIiHrBR+gFjSmBniNk/4/AFFkpEVh3JZk1GwwtsKJtRyPQvcSPN 2LUndoJaNstqAFkrzFdcd47EAPYXBZ9myoq03J4C6Q39TjTihwDMh+eDxm0S0CU+btBQTDZsaKC/q hwFkjGK6rZ20DNHUNnj4m5Hz88r9GGZko393T6BaPA4wZ2Dj1/rai3lZGAek/4RH+ASXx/R32IPAD F8mYEDzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4KQ5-00000003pNg-3TFQ; Fri, 25 Oct 2024 13:32:01 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9W-00000003mix-3PSt for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:14 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4314c4cb752so20214565e9.2 for ; Fri, 25 Oct 2024 06:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862093; x=1730466893; 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=yQgS5nIosT9WP+28fCSlQ/AHJVYYLIctL5rlsevVeIM=; b=ulrL9JaLLmiCAHJmIS2waVvqfgUcy6ivEYHIbGpP/LJlCxYazAQGQ1COeGinhAEPi9 lj/lC8fBbmpgYpUdNXXZRCRUcgcM7MqntXsGN1b3lNHUzynytMB/9XpQKHz/qIYADOM1 TqAgR8WKWnWg1K7FYzoeL99lZ2tUsAjvmqBCHl7wdvKGa2WVvJnCmhIWbnPIy9GqmKl4 ZRw3D72TVa1ciJVgSNXOd8JrZLyjjew+Z+vanpJQImCtajCn6t7bVUOOloyvIqwyrMGi F00E8iaPbTFTehL952jr7pXt2n/nKY6wZv0zH3IrxzBH8UC0k1mb9mGenSp6NvxZkHBA UlNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862093; x=1730466893; 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=yQgS5nIosT9WP+28fCSlQ/AHJVYYLIctL5rlsevVeIM=; b=DipY5Bh76n8lGnLV2ugvoCcLtQkS2Pt1F6N0VF2VZaMVSUs4i0fup2ia/qBrTt92hT 9m0s/CmMJL7u/Cea5ycqxFfi2cQfghTG0RxmZgjSh3NiPDXKhTBvoNwG7t0I+DnyDXs4 tWiU2puj8nkcAAfRUXXLgy7P9opnbgyS6EpU6g6sPBUMklfSJbhX34aFWbWXCFX+naTu 9jKVZqSyHRcEBDfdZUyDW7epg8dgKmTQpDJqd4/dIhtc9XrFar/mucef+wmv0hOy4WO2 VgivKzJRnpN04LE/65tIHgsRIWSD5r8cj/rprvhMYxhMJLfpxfVt+OfftGKXMvRH2xWz beTw== X-Forwarded-Encrypted: i=1; AJvYcCUldVS4PyqPxbEzWEDWNo/hsjxFX5Yx/BGEtUu6yi9DbMZb+UQXLiMHvA/E8zMltsN8Wm5s9XAQo+w3W2Oac2oO@lists.infradead.org X-Gm-Message-State: AOJu0Yz7BUwTLpnhv1xYJeznMD6Wi81ObsoOznhVK6XOqQ7VNUeby6Lt G13z7hOGpYDerhVr46KHZt/UE5kgHI12xoz2KKhyNC68dEjSsSDF/t4EwI2cNUA= X-Google-Smtp-Source: AGHT+IFu6kZDvdli2L18ry096b5sZipxK9OsOWeDSxbyTNiVEAO1GAWmUbs/6CZi5Y3noCEY1ICL6w== X-Received: by 2002:a05:600c:3543:b0:431:6153:a246 with SMTP id 5b1f17b1804b1-4318414a3d9mr88410625e9.13.1729862092697; Fri, 25 Oct 2024 06:14:52 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:14: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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 03/11] scsi: ufs: exynos: gs101: remove EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL Date: Fri, 25 Oct 2024 14:14:34 +0100 Message-ID: <20241025131442.112862-4-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_061454_871025_8EAE5BE1 X-CRM114-Status: GOOD ( 10.84 ) 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 Reviewed-by: Tudor Ambarus --- 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 Fri Oct 25 13:14: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: 13850739 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 E2FFED0C608 for ; Fri, 25 Oct 2024 13:33:51 +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=cdoImO6OFfTM2Lw/aicaT3K93cFHqPSr98CjhrJS+DM=; b=SjmTh9kkyaZrVlpeWJcbjCOTe/ 9EOVdNFtmgaLwcpIvXDMj8XwoQ331HPKIRX7EcQ22XGQlR/rxoU6IzQqdXqkJ4CdoTft6tTtxRz23 1kwEa9teA9Rj4D9sYCQsEjJMr7ZJv1xdHhuSGgknxrzoEn53XkzoNEh6CGs1OEOTpBb8Hqz2pioOs vkGxDZ6LNOl2HvuyREn4h7/x9AyYH3Omu/Zj9V6/eSzmvPNKw115lNMdwuzA7APtebHK3L1pW0btX baXxsa+Nm64wguBrF+JMkN4VfYVKieMZ0T2wBImAaBjC5ohGmpxqqpSCsLvQR6cwYKNSbLowI05pf GCvimbqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4KRg-00000003pmM-39I0; Fri, 25 Oct 2024 13:33:40 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9X-00000003mjJ-3QdF for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:21 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-539fbe22ac0so2390755e87.2 for ; Fri, 25 Oct 2024 06:14:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862094; x=1730466894; 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=cdoImO6OFfTM2Lw/aicaT3K93cFHqPSr98CjhrJS+DM=; b=XRf80yYDmGADNjB9Eou7LVUKIXNzyU/UTCUR1CvswE5l5q03GoItbWx1nBaTiRnH9u YJlQZfbKbyg9Et7B3C+W/bKouTHErvr2P1GAu1f1iI3Dlt6KaOmSRWT2v4ZQqCdbLFxq huArdtIqnx1slT+xY0sJ8mTsC71iAMkfYjdRw/9yMEOKrWcoAETvvqJR56tyQMgi8VVX suvbMVMRmR1ZKJq+sj1EIrAUDKOMm51NeqseIAGVPQB3QJ9wKLrFU666dvqGYBiIKWq3 xKLC085EPzWU5y69wFG93jJw2hLNRfDv+p6FQ/cdKVB0oSFAu92frNqg8pZpnPY4SDDZ K8LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862094; x=1730466894; 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=cdoImO6OFfTM2Lw/aicaT3K93cFHqPSr98CjhrJS+DM=; b=JOKQ7kTJBhv+Q5o9Z79vHfFDG7nfYg3Gkg0l7ATSPDcIll+nf4/VDac9LkOvkw080y MOlXSnda0CawR0b8Xlb6WYSsv+q4NDzJ/YjT7LEfUsIgWpOLKq2uSWxZYYIrx4X3+kIQ CFocyxhyOOhlBF6l3PrnVzaAjSSSH7qpDuYOK21S/Jwc/QwAM2DqddhMv/rrBUeJfmKe mDWl6CPtTs0lNP1W7ixVvqQ5yQp+QFBYkvF9o4poGDi2NJetkAMFcRdIxtTqu1d2SFJr DGdmyTRS8pPDyxFMGIXiEM36LbQD65RH+WyUVLPr++JS8Q3TkxvhvxD2+ZwBP1IyHDvc s0lQ== X-Forwarded-Encrypted: i=1; AJvYcCXPPj2tmQRruhPifhVt/tOLXlAcLD/Cw+mhkp1BwyF/AahHLKykcvVOioWRO1r4puZku8A20Yat7fYdeam4zCj5@lists.infradead.org X-Gm-Message-State: AOJu0Yy0fbV/1QlOVMBs1X4e8ecVfs0pnOTmPBROrlean+g0BHSYyecY UrMnd5lYYJar6/v6Zx3F6/3FxzC+7chY8mmIhTzWWxQrhH8/UbhJLG/TyDG2J4o= X-Google-Smtp-Source: AGHT+IHBrQGT9pmxc4oL2n1+HSGkoaeL5c5Y5zzjK0zgLQAj/a//GEezqB7iJbnehPJAIoa5TXY2sg== X-Received: by 2002:a05:6512:1585:b0:52f:d69e:bb38 with SMTP id 2adb3069b0e04-53b23dcd34fmr3409903e87.2.1729862094046; Fri, 25 Oct 2024 06:14:54 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.14.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:14: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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 04/11] scsi: ufs: exynos: Add EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR check Date: Fri, 25 Oct 2024 14:14:35 +0100 Message-ID: <20241025131442.112862-5-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_061455_875748_775CAC8C X-CRM114-Status: GOOD ( 11.08 ) 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 Fri Oct 25 13:14: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: 13850740 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 1AC1AD0C60D for ; Fri, 25 Oct 2024 13:35:31 +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=M4p/a/n3EAi1phVyfP45uoVE5rF3xsXeLLa3VUUHv34=; b=DlWxSS2nNLLfH5LaPm/I7e0YN3 cTAO5AvVdu/Ko1NrUNuYoid3B0bhcKiX0ySJZPY5C+NFfucIbW+tsAnod3SmG+A7yOCXD6yQPG1Pz OPfNDjkIYUaYtKHLTuh+rAiL4rFS+C9heS+nk3eJFb2Xx76Z2Fv+MtwrbS8vnpIq7xSbIY8R1waYi 0UZGILvXlgW4dj12fNkVV/OeR2EdarSl/jObrVGLHXCsshR6gBlvNcno3koMr18OzDBjLuWXa5E/e yoQdMulKFNDXE6rcLgcWSGmK327SyGEZJKHBBgM7XJTJ38dg4HqtHgcIxXPcsZRYU4yqkwnU2/H8X lTqsQ1jg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4KTF-00000003q0U-36Jt; Fri, 25 Oct 2024 13:35:17 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9Z-00000003mjr-0k4a for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:22 +0000 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-539ee1acb86so2263555e87.0 for ; Fri, 25 Oct 2024 06:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862095; x=1730466895; 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=M4p/a/n3EAi1phVyfP45uoVE5rF3xsXeLLa3VUUHv34=; b=QOrKLSmlBkseiJwCc5rSfGXBRM7Gtw/4iIsMw3L6kqN4NT/wVXRwNl9IOHMhD0S8lN hIRMBuK5lc6vc+lbDiYhbZE3Yckzex89IV56BMwaJz/rrx31kn48HsbZHob1Wzsiv7Ah caMDBtVy2VUk4o/SEFq9kARRJz7gknb590jRv2iHe2bEZP9ZbDMm/kecPvdX8ABkbnwG UKLAhNzysVgXZIVQjNjBsvodqEq0ZR365Akbg4waXIjMCuVBhVYGzG45/0fCVIYsExkv HIqY4Ybv+wn9MFo67T9FGoRn/8l21RtKFVmEVlt9k7o+rmRBllzAf/J3l54cNlP/zwOS 4HEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862095; x=1730466895; 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=M4p/a/n3EAi1phVyfP45uoVE5rF3xsXeLLa3VUUHv34=; b=bdqBgxKXqSz32yBYurL/CBURsnopQESdtJryant1LwlzU44qWXIXjszt7MTU5vRYUN /Vogp4zsASmb1cEFbcMn4swOK/9U7CcpcFvHtPDP/jtKeGzfsiFlbFO6sS/r+Dwoo0sv 5O0gCxXMz2Jb57i1QBVzaOO0zQgzmzyfo4suZlS5F9caiStJN5/GlLojnQS3rxBylERb 5+BXli7e33X0XfVoCZA6xjFgO3ZZt/97tn7OaZY60jAeDAh5tvtyH4uDFuk6wgdVc2zy AYMXc+iQmUPv5+Mu9RXjalXwEKT8qV/jh/qxcyB6LO3Y9+B0xw1M9Wg+J4QFnqrA8VWY ClVA== X-Forwarded-Encrypted: i=1; AJvYcCXbNc8UojK5MxqZgeOlLQvqqCjNKSA4XVqlsVIx+7cXpGV/2ANHn2wDew//fXJBotRyhDFpM4MijDh8PbFMNEz/@lists.infradead.org X-Gm-Message-State: AOJu0YythL/9OodsXlkJNBb0BqRmrlCjw2mxYj1t7yojY57UxE0y1bsq fXSDBNyj9IXGRnI2ICzQ/SslziH532HA7YvxFgbJK75YHWZLY3YWyo60RJbGTVA= X-Google-Smtp-Source: AGHT+IF1nqwM65nZ/hmqcna4gL0pzIQdq9UtAly6V9yqCaP7b5l/UQUT68oG19uDiQ23I6pznxiPSw== X-Received: by 2002:a05:6512:234e:b0:535:6cde:5c4d with SMTP id 2adb3069b0e04-53b1a2f1eebmr5293668e87.3.1729862095389; Fri, 25 Oct 2024 06:14:55 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.14.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:14: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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 05/11] scsi: ufs: exynos: gs101: remove unused phy attribute fields Date: Fri, 25 Oct 2024 14:14:36 +0100 Message-ID: <20241025131442.112862-6-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_061457_237082_E61697BD X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. 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 Reviewed-by: Tudor Ambarus --- 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 Fri Oct 25 13:14: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: 13850741 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 52C3DD0C60D for ; Fri, 25 Oct 2024 13:37:02 +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=cNn15pq7FtlSd8hCdE286On7l4GZ1JdLdzQd70l8fTI=; b=Aw4dLQKyTB7YL8c32aeONuhG+t buWhdfwOR6yYKkX1cHmrXGKKhok1Y7AGf+sUU+Qwi9ddiG3Ri+P7+X9qVqZVMxWq0lQSObmdrth3g uy7szxSSTx3iJnKY6z7VcUwnouigmB3GWaYRBG8w9UMC8x9K4ewRtzpG68qy3j2P6ZZEOCRrlcqv3 bRPbDNVZby/miRHZBgL5+NHsVS4aKife7HF+LyFWLCQnLEzyCY6I4bISAzAJZEdVx5FRAlp/oSvJX pXfpEk4HB4pLkC5thzcHafvndNSPsjblY/3CtyLHKz7RbC15e3I+DELEz9eXwbnPjOl8HYWaaX7Me OdffN6/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4KUm-00000003q9Q-3yo5; Fri, 25 Oct 2024 13:36:52 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9b-00000003mkH-01X6 for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:25 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43155abaf0bso20688345e9.0 for ; Fri, 25 Oct 2024 06:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862097; x=1730466897; 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=cNn15pq7FtlSd8hCdE286On7l4GZ1JdLdzQd70l8fTI=; b=G/FwnueGUcPOcS5iP0bPN0SoFhb2WOGhRVGqnvsVPGwuMQ8exhoKh+bT4CFFgeMnf8 xBA7hpvGGUrutCWlSFHgkTojO2t/kHyUlaezrrSvTE6mVJQLa1jplff0BoloPy0k7tdI Xo/DGWW46BRQ7JL2P717qGoeHPV28gab9f8HxuDetiHg6Eig1K1fv7qPAf8ODh4ngtKj ZbeuXdw/8616DwGNA/AYniOg19yzpVN46iKq7414ba1xSvDD6Eoy3ZdHCWCovj71Qchh 47v1fijEsM9qC4khlnDrwFUr6jcyZORF7Yt9Zt+vCXz9k2RYyF/CN5C6pg8s7or46TBg pr0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862097; x=1730466897; 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=cNn15pq7FtlSd8hCdE286On7l4GZ1JdLdzQd70l8fTI=; b=aJoCCc4nz3/RRNL5Fi/y3fhCXtYK3BQ+ROiEC6qwAPf+GjYrOHlEis9jfcNwJi1Ikq pMXagxCr/Zn5hSquiU5U9uLnmGa/LGP/rpR8kndeO6dKw58cfBWI3vwevzykex7HM4e2 tITC0MH9Gav2lFKGdo+cmYidwljsJn6stfreFWNhPoS3yXXyxG2R4XKDPWAYSP1HdyuN SODolKTfSWeUvxh0fxpqtPrAVxEVK9nEMHONk1iUsjvukBgQe63q/2lIOOhE9po8wxIM Z0YqRcHlYFvEebnzmgf540N7l0j2//zwdMaDhEfLsHsRWePsjNhXI97+p/6/sYMgfxxl kg4g== X-Forwarded-Encrypted: i=1; AJvYcCWVnnzSy8K0r6Rn4BvcCBz8jFlqfaESn6XH8i+UXkz7SAuOkh6jWTaOn4TC18lkXd+Bbam3B1T5P+ggg0C9522a@lists.infradead.org X-Gm-Message-State: AOJu0Yx0O3vuI90YWgntav2thSYajj4vLQ9uKboz1pt5G5JKBBwvpjqm aULm2FK7rLjnpk/zSXlcdJfDvcwkgfX110VLDfLdeCktOs2r3xae6PnsoNh28uY= X-Google-Smtp-Source: AGHT+IGmYuHoaUOEGVL/28LOiMK/A9Q47ttebm2jL0yHOWlag+R8pd+KgV3xQfuxq1xntOnAKAHD4w== X-Received: by 2002:a05:600c:46c4:b0:42a:a6d2:3270 with SMTP id 5b1f17b1804b1-43184224094mr87230815e9.21.1729862096953; Fri, 25 Oct 2024 06:14:56 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.14.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:14:56 -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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 06/11] scsi: ufs: exynos: remove tx_dif_p_nsec from exynosauto_ufs_drv_init() Date: Fri, 25 Oct 2024 14:14:37 +0100 Message-ID: <20241025131442.112862-7-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_061459_068497_6E6E68B5 X-CRM114-Status: GOOD ( 11.57 ) 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 Reviewed-by: Tudor Ambarus --- 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 Fri Oct 25 13:14: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: 13850742 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 00E5AD0C60D for ; Fri, 25 Oct 2024 13:38: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=8mSP0Idfdl9Bddnm7Irkt+YNMMsQJrdvTnch1RJ4UlY=; b=q88dKqA2FcKgdve5zvKSL5YU9f H9rfK0ny3lB1M/cNlzVfxooMoW5SaHL4VOhz1tQpzEhdzBqhFp45hgLEYAiAVkWK2RwI2+kqye1Ys YQ/lf2aGON2xrcuSoPB37irGss+GdoQ6gtKfG23rDIPrZptcQF+tvd/2pcpOdNDHoZ9R+mW6Ui0yq nH0Hc9wMj9X3g14zhCSPMOK4m0XKZeGShtY08HhwOF/6+O4H6tp3doDb/aJi8VjuQ1/i92TQkXMq5 MHkwrcxa5QPKyiUAzQHKiXLpnk2teCw9QQo+15aZKN7L/he2nNkDYCAnnSL4i6NHJK5F0es2XQbfS T454Z+Xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4KWJ-00000003qLC-3DzV; Fri, 25 Oct 2024 13:38:27 +0000 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9c-00000003mkx-2udP for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:33 +0000 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-539e8607c2aso2359271e87.3 for ; Fri, 25 Oct 2024 06:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862098; x=1730466898; 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=8mSP0Idfdl9Bddnm7Irkt+YNMMsQJrdvTnch1RJ4UlY=; b=kt/vKlRcU3IlPabyscKRmThZ/kxWJhjPBndymP2HXoqcXrkooK+Gzy/iZtPHW8aBA2 MpcXeV46e2E+92KpxnEAq+yOmYSjJBDCu+J6NeIpkB/oExIS5GKjT+ZLJ3/fEw+hkp56 pXIhkTqLRWhM2WeY/B3QEJpUm1bbz0wsxV7pI1c/ffF12MXzWW7FlTZY9wUNt/2GDL1S UqI0l+QwOldVMyiofJdPvagETnpJSAE+lCjOd2m35/Oqqq6aAU5hdqc6l971rHJ2fHdp NObSJuFnIkJceUDGmW/Vcx0xq6bBQx6oxjqyrtgTCuleCMIxnD92fQV0PTLBTHMQsaTv nDvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862098; x=1730466898; 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=8mSP0Idfdl9Bddnm7Irkt+YNMMsQJrdvTnch1RJ4UlY=; b=YKBThB0eISdlt2wacUxwTzqhCzkcpL4Mhh4+UvTDvmmt3LqS7dRZpOZHHOPfs8HbH/ 35leNifpV8YLn0pmCi82LyPM8JvOUgaHbwOGNsi6K4ml7OPtkGBXiUU6IK/S08wpRHDb ky9NA7Ti6546y6hgMgdlszHl6wfRgEJdxpMj+MEmYGwoegla6O8A3MojIPEee1+YU3e1 O6MmtOHdqFwxhOOQloGJ94h/i5ADqr8dFkFbARwoTjXWj5kBaqUR4sCgXFtDOTUv83JR iZMCZFl1iQvRdA0Bj6cex27la0icWaKBEHNUJbChSeDifOWBs8bUJd6t/7JDQa+HsJKd 5Qmw== X-Forwarded-Encrypted: i=1; AJvYcCURuyB3rU4wV8x+6rlQDib2H/3Nw5MIBwV2uYxOg62rLhT/IIQFZaIflQ2tjleu9JpTWSs+aYynMrzNgy5KsJyV@lists.infradead.org X-Gm-Message-State: AOJu0YxowQZ6pDYiOq323J3c3eygpS7ZCewDBJRWwjOrrg5Ahzf//3XK qnym6mpphFDebao5uFWJq7R2KuUdoUgx528jCM6XWOo2P/HEgAV3d6d/oJPUqDE= X-Google-Smtp-Source: AGHT+IFIjxCtFqGk3E1YIZeIbZDApteEen8rQ8qLd9MWNW7M5VeqNXGVeyRg3HBljC/8CXJKDn+GyA== X-Received: by 2002:ac2:4c55:0:b0:539:fc75:99ae with SMTP id 2adb3069b0e04-53b23e1df9emr3392181e87.31.1729862098342; Fri, 25 Oct 2024 06:14:58 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.14.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:14: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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 07/11] scsi: ufs: exynos: add gs101_ufs_drv_init() hook and enable WriteBooster Date: Fri, 25 Oct 2024 14:14:38 +0100 Message-ID: <20241025131442.112862-8-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_061500_758758_DB5E9851 X-CRM114-Status: GOOD ( 14.83 ) 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 Reviewed-by: Tudor Ambarus --- 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..40b2563fe011 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 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(ufs); +} + +static int exynosauto_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) +{ + return exynos_ufs_shareability(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, From patchwork Fri Oct 25 13:14: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: 13850820 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 89FE8D0C619 for ; Fri, 25 Oct 2024 14:31:30 +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=/Db/7vYWfVTvRELCJjsaav3g2wtQjNY/cZ7wO3qNfos=; b=b2rIskx6MUsq9IYkdlcXTd2JIb 6B1hq9n9RFdlkkqnAvZuiaSvzDEWszWf3yIvsUzz6EtDZdgL826FwA4mb7unNrCdFxCQbRakKkAMb aBHmmiRzUw9f074vmvSta2iM5tYJdHMvUsXcz7jEU5tiYROdZ6IjtkcIHePqj0AD8us091v97kBjx XaDRiOG4Y6/kEHn5vOnxgD/pxg2IBsc6v+41I5aimXFLpJcHZElfX4+pqW97OFbpR9WEt5HqOKPR9 nWtqCDl035oUkC8TL0c/gQw7nQ3/60kT8cWC7VqXaIWd17kJTYpA0t9I5upwWnW0dHx8qc+PxXELe 0Ij9l5bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4LLV-000000041Vc-2ERP; Fri, 25 Oct 2024 14:31:21 +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 1t4K9i-00000003mnk-2Zxf for linux-arm-kernel@bombadil.infradead.org; Fri, 25 Oct 2024 13:15: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=/Db/7vYWfVTvRELCJjsaav3g2wtQjNY/cZ7wO3qNfos=; b=awngOrHlQ6WYYgoDNL3A1DAEXO bOrB4cvtiee+lMFKu0H+rHZ7QPrKtPL/oL9JJNS2XM1k3ZSeYu3RQc/X1f84BQdQYWv3Ra81rIQ1a M/3cTpi47S78Y9izKFfsxm09q2LjgG9Zrieq1zjUp4NSTZIKta8KnCrsJ4y7y6EP0CsufQVaAT/5a 7F7RTVBjp7kwO2HJ3YIT9HPk1IHPRKRierKsJ8ZdIPJEkxKGBVQQsdDh7QiYdA4DKhmFQXQBrJh9H FkchUZozxyRAkyuch0e/AziPZlDICX556mkKFnvDHa5C5I/A+RT2JYxJ+vVLcUU1vEUatT9fdlrSe wR2doVaQ==; Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9f-00000008v45-0JrB for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:05 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4316cce103dso26309045e9.3 for ; Fri, 25 Oct 2024 06:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862100; x=1730466900; 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=/Db/7vYWfVTvRELCJjsaav3g2wtQjNY/cZ7wO3qNfos=; b=EWkyK0aE8OgQPxKHWjIPlZmqrlo8yaoYo2tweDUzJLqy3+RU4nEajJs0xBjuAslZj8 dQB4UjWVLjy53pazgwI7J6EmOPqXQmaEl6Fu96h5QUETgE6104s01ZyQuZdDQezjHtyQ KIWyroLy3geEVWIoPXK4Sl1OOep9GkDHX17P//2DO2oT9H+ILOduAQdb/7fR1IYQGcFA pKuttxrf1BMT9V1oelm4NzjK+hCJB6Bft+qOk67knQtP35lDTaHeB7XBfFp5efFgy0Ay zBEiZom65q4sx6Z3Al6RoXxHfhFSZL2i+sYzKtxADAqPwK/KM6CTIYjn4+QZg4R1RH2A /k2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862100; x=1730466900; 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=/Db/7vYWfVTvRELCJjsaav3g2wtQjNY/cZ7wO3qNfos=; b=VoLrVpdu1m6LK6ZKdsYjmvGigz9s0Hy3eieC7B71/g8TZMhf4llzJotYYbQTPGMzaq TTmZVEz+cFMZlsmbxL5TNLkFnrMCzp7Pa6dhWz01ybgadbUdaTLjkh/5Fb9hy2UFoQuE PKIK9jpr27DWcFHRC0Fw9VfvyTdPIWnzXH9/3dAj0pyzJvT+PgW0vFOUg56htxjpRR/v d2znJRhQtGEBNyVUsYttoX+o59AUNDC9rneDllva064rkjRjy59pgNNOAVNuJlhqtSb/ mZKsGf7329x9jPkkuO1FrIZYBSyRwUOhyOH4lBnyMyZ4v8rT59JvBJZAXoZaaMJqcdxY iZOA== X-Forwarded-Encrypted: i=1; AJvYcCXRaduMDwv6N27+grE2AD+GfvU5NYSfDTgB7nGWGUIzP9qkx7tl8nekv+w5DwbGQw71z+6ZjcXPLYUyhuINbrCL@lists.infradead.org X-Gm-Message-State: AOJu0Yy0DgVIDI4rSRNBx5wxp5OO0+cSnb/QxZzQLoT1K4VycN6YxHvu KtwAKgcCG98KgMT1ee3RgP7IfwmBCG2G9R1viTsQup1MsrTOlF3DEH078BaJkBY= X-Google-Smtp-Source: AGHT+IGy7gCwHmZzWRjYuJdLjKUklIvRll7qzxjTVKsdjpMsJu9lcX39EllePZe+fyuRleAhBbilyQ== X-Received: by 2002:a5d:4441:0:b0:37c:d1ea:f1ce with SMTP id ffacd0b85a97d-37efcf15f1fmr7504792f8f.25.1729862099741; Fri, 25 Oct 2024 06:14:59 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:14:59 -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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 08/11] scsi: ufs: exynos: enable write line unique transactions on gs101 Date: Fri, 25 Oct 2024 14:14:39 +0100 Message-ID: <20241025131442.112862-9-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_141503_251588_1D290DF9 X-CRM114-Status: GOOD ( 11.35 ) 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 Previously just AXIDMA_RWDATA_BURST_LEN[3:0] field was set to 8. To enable WLU transaction additionally we need to set Write Line Unique enable [31], Write Line Unique Burst Length [30:27] and AXIDMA_RWDATA_BURST_LEN[3:0]. To support WLU transaction, both burth length fields need to be 0x3. Signed-off-by: Peter Griffin Reviewed-by: Tudor Ambarus --- drivers/ufs/host/ufs-exynos.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 40b2563fe011..b0cbb147c7a1 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -48,6 +48,8 @@ #define HCI_UNIPRO_APB_CLK_CTRL 0x68 #define UNIPRO_APB_CLK(v, x) (((v) & ~0xF) | ((x) & 0xF)) #define HCI_AXIDMA_RWDATA_BURST_LEN 0x6C +#define WLU_EN BIT(31) +#define WLU_BURST_LEN(x) ((x) << 27 | ((x) & 0xF)) #define HCI_GPIO_OUT 0x70 #define HCI_ERR_EN_PA_LAYER 0x78 #define HCI_ERR_EN_DL_LAYER 0x7C @@ -1925,6 +1927,12 @@ static int gs101_ufs_post_link(struct exynos_ufs *ufs) { struct ufs_hba *hba = ufs->hba; + /* + * Enable Write Line Unique. This field has to be 0x3 + * to support Write Line Unique transaction on gs101. + */ + hci_writel(ufs, WLU_EN | WLU_BURST_LEN(3), HCI_AXIDMA_RWDATA_BURST_LEN); + exynos_ufs_enable_dbg_mode(hba); ufshcd_dme_set(hba, UIC_ARG_MIB(PA_SAVECONFIGTIME), 0x3e8); exynos_ufs_disable_dbg_mode(hba); From patchwork Fri Oct 25 13:14: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: 13850743 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 134DFD0C60D for ; Fri, 25 Oct 2024 13:40:14 +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=hwJALAAeKO6DZ5STVB6W3oZmi4qjYoxF/2Uc+rthKgs=; b=SZEa9ZuiYfcr0coXF3S1x/znqb aGrw9cfiXiKvOWEVfRnR+HWhqhF4ImXKbhRhCJ8ZzQ4IXtTz/eGNmVVuV27bqzgwkQQEOgmf5Ij9X TnjUPVwezUm5A3Wz/RnxUy7v5FOsMNo5sGRkXlyofwYkNAvIDDv8Ba7UR4H/9hjLs1UpVIeFrJa+y TjCzeJzHvuWQNS3Y6KQoNb6LjQfPjMuEHPsUskaNTBEOGfdtkMtTJpYoA26S92O1uTuBY3ohjQBXV nGp292dwoYrajf2a7vjttiTdWTngiIatojug7LCtUoK5PlYwjFiUp9W8CqD65h73ofY2/0WYLDe/q cjzfcJZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4KXr-00000003qcH-44A5; Fri, 25 Oct 2024 13:40:03 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9e-00000003mm8-3uma for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:34 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4315e62afe0so20833945e9.1 for ; Fri, 25 Oct 2024 06:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862101; x=1730466901; 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=hwJALAAeKO6DZ5STVB6W3oZmi4qjYoxF/2Uc+rthKgs=; b=Ey6MVCxPvJp54nl/0X7IonjJTicTKTncSuMWvsIGVoO6fQvoap627q1lUY3eTAPBG4 wP1UuuhSCff7++q86TghZEj0jaUghTH6SNugndrdPOp5yIWxVBXUOA/OwGihgHRT7yd/ XQDR0mJPGlBw5kdyIvhmcbki4O1G3xXWeT+xqFaJanHFuFBmoGyceJljJuL93HgBFxx5 RG1LL7ECU1UmYJLBa+e3srqv+aammOJyKdD85+AZBKAKZRDBnuBZKo6tXJU8QBHhC8SI QZjinm5DEf0I7BIyDHouxSQNVczTkDk+2C0wZMi6Z/HkRBa3OlDDoB+4DBQ3/89sartI 6Wkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862101; x=1730466901; 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=hwJALAAeKO6DZ5STVB6W3oZmi4qjYoxF/2Uc+rthKgs=; b=IZeyZjO75K/1/FQ3lczqqhF00/XdWvFx3HdU8IeTC720fIgMp83SOMqb8mRabagzoa zFLOeaofq0TtPCGLRp9+vNfmBPhBf497duv2vRlSzbs0VHvT+8Tg/4QJfCdqxc01u3wc 1AICo0WAiHZskElf/9FfHUNwQsMMD6ky2LDDmtOl4ypHBKu1OYtM29QlsOMMHrM9mYQk Ul26wXfzJVxxu2pRNvNSj0joDeFwNF1cOus2RK9RprAdP4xIcD8x1DjurUphAC1PuHFZ bhLop3IzHQ2dAulUQBWcBnNjgdOYLKEd1lzeN3VTDB1zOr+Qz4LBXeVIyivGcRYchg9R JhRg== X-Forwarded-Encrypted: i=1; AJvYcCWvrVlMB6//ACEhDPwfYblnIXfpZY0d0X8wofkwJf5fTjDjJI3S/sQtUVB7siyqFNMEsGWz3xu0nF99Ah2pB2OG@lists.infradead.org X-Gm-Message-State: AOJu0YwfhYbCyxDE83Z11TyP9sLg64oDMMRCaK+Cm/E2EPZdongrs8bw by0RFBhX97lhLmVEOPXnhlxilYYqGyHXHn9ReQi5lW3hPMTMJDE8y0INYgyBDKY= X-Google-Smtp-Source: AGHT+IG93PjcVz+7+9Ks5a4tZOcJmfpGpRSJSrp4oHNgenqx8uAoLySbtv12lhSPEbntHZWJ76vNhQ== X-Received: by 2002:a05:600c:1d8f:b0:431:5bae:c600 with SMTP id 5b1f17b1804b1-4318c780d48mr50376755e9.34.1729862101341; Fri, 25 Oct 2024 06:15:01 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.14.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:15: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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 09/11] scsi: ufs: exynos: set ACG to be controlled by UFS_ACG_DISABLE Date: Fri, 25 Oct 2024 14:14:40 +0100 Message-ID: <20241025131442.112862-10-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_061502_999240_5B417ED1 X-CRM114-Status: GOOD ( 12.47 ) 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 HCI_IOP_ACG_DISABLE is an undocumented register in the TRM but the downstream driver sets this register so we follow suit here. The register is already 0 presumed to be set by the bootloader as the comment downstream implies the reset state is 1. So whilst this is a nop currently, it should help with suspend/resume. Signed-off-by: Peter Griffin Reviewed-by: Tudor Ambarus --- drivers/ufs/host/ufs-exynos.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index b0cbb147c7a1..fa4e61f152c4 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -76,6 +76,10 @@ #define CLK_CTRL_EN_MASK (REFCLK_CTRL_EN |\ UNIPRO_PCLK_CTRL_EN |\ UNIPRO_MCLK_CTRL_EN) + +#define HCI_IOP_ACG_DISABLE 0x100 +#define HCI_IOP_ACG_DISABLE_EN BIT(0) + /* Device fatal error */ #define DFES_ERR_EN BIT(31) #define DFES_DEF_L2_ERRS (UIC_DATA_LINK_LAYER_ERROR_RX_BUF_OF |\ @@ -220,10 +224,15 @@ static int exynos_ufs_shareability(struct exynos_ufs *ufs) static int gs101_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) { struct ufs_hba *hba = ufs->hba; + u32 reg; /* Enable WriteBooster */ hba->caps |= UFSHCD_CAP_WB_EN; + /* set ACG to be controlled by UFS_ACG_DISABLE */ + reg = hci_readl(ufs, HCI_IOP_ACG_DISABLE); + hci_writel(ufs, reg & (~HCI_IOP_ACG_DISABLE_EN), HCI_IOP_ACG_DISABLE); + return exynos_ufs_shareability(ufs); } From patchwork Fri Oct 25 13:14: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: 13850698 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 E52F5D0C608 for ; Fri, 25 Oct 2024 13:24: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=Ivh7+EYUuihJcPnZHjnVXOeazDxQAc1FZwbuTGARMJo=; b=k27xq5WmInrUfbYbxCyKwCd3Kj 8t4GDUE1GiElQVlebqR0qRAkLs5i4aFlMs1CTxbeZ6UyNKdl6MPFvkxpn8prviVKmLV1CKu9w6B0h iMULFwZbccjuaOo40lvEipntqx6jMhWZchxxJ+pM1EFR+5kebZzFWXFcKjPwR60gLpIvaHg/66A5D I/vHRajI8/6tODYBeawmyZ2C3lRaCuy1ilcsD+0GG0VCY9Q0ICY1me7xue+qI4vgc7wR3CmLoudQb S+33NiUlJ5RpQqTmcEenvDfyO9J2bPlhARUKF2egc1vB/ySGl2kLvM6OIgLy9AbSMuNiyRXkrXLJi 5AmTDk1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4KIM-00000003oE0-2OIJ; Fri, 25 Oct 2024 13:24:02 +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 1t4K9l-00000003mo3-34YQ for linux-arm-kernel@bombadil.infradead.org; Fri, 25 Oct 2024 13:15:09 +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=Ivh7+EYUuihJcPnZHjnVXOeazDxQAc1FZwbuTGARMJo=; b=b0QZk7cG+sYxFGtafPz/TztkZX d9iRyweJLOSHV6E5Wobjcau+Sz908FtzUbg9dc26Iu4oSUIhQwD0JG2GKgKgpn7OLbr97lmF5y5wt rIB/dobL7O81rb4otR6EvVVeeCZ8TOClVane8u4MukSnZOCz43ZTPfTw1dmiQ9+LHbquP1PI0Yvrx ft0ivju6algMUFsnwo+rNssBemT/VtC6T0MDhQUF0JqDhJUJbASdXObbZv8zqSbJaYd2z3rm8BUrU vc4Swc02zYaYxRF38i+l6sGj3qNTD14OTuJYGTH0eYhut1iD3fqJ1wjTktQZVdYlZEWUruKAKooO0 NbQf4O4Q==; Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9h-00000008v4r-1Chi for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:07 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-4315f24a6bbso19942605e9.1 for ; Fri, 25 Oct 2024 06:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862103; x=1730466903; 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=Ivh7+EYUuihJcPnZHjnVXOeazDxQAc1FZwbuTGARMJo=; b=VHOMVGVbrVsMgrqYmI49v4Dhc8MePUM31IdJgULqtiPNGFomQ2AMMe5+OLPb6j1jUJ N+1cPPyRbnQ188YEX1DPsEllxrP0dMc+88yd0JiRotYIHIu68GsLksmf689CeqBTP3Sz +tGCtSSMmGCDV015l5NniBBHHhd9ii2twl7wS+bwmW0mRl4X4UjUhPYsqZs/87nNyU8O jbdFO5EYipM3kHRtCC6zOSs8f3sOVXgSgTOXWNG5vs3Fonh5aeV6zBw29XUWgZNPRMCG X+OuSMUS30X20vz0McyZWkjc0G4Pzp2QZvgZFzYsrK74FOxBwMPAyUqAIGmeVjlqZnuM BzoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862103; x=1730466903; 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=Ivh7+EYUuihJcPnZHjnVXOeazDxQAc1FZwbuTGARMJo=; b=l5hArxU+XjC9Y4Q+0kliw6tnM0GlMSW6Y51NgJLm942BMTp0Wz4OkrfDlcdvkbDj99 Ylv98ezn9JA0DSpVD18/0XrLVWOrtGetCSBw/Mwp+Hu0zyLKxP/UtS8DMkZO7n7P6W4C NVwTyYz+2Y+4lOL/ZAc8c2ruABI8FSqZ0UJ+EXHsn2V5OH64SRrBZBEQPbrBiib+1MTq A6tAt6Nr1v7FnVnz4WKRB4W9JCyBNgsIyx8uu7ZHtP64+ow1l/Zp/j4dE9Ivxwjv1rke SGJj/bTYeJ0ODpJmNDmTvLQwaCJ8CHLSF0/2hX9floGbVm+7CE9a14tP8f8lmWOZwWB5 /iOQ== X-Forwarded-Encrypted: i=1; AJvYcCVODiMo+TQkjA/BDPkmHjprJdXameMzwifm41+WOFkRw1lZFPbYss5o9voh+3eptMp4nqysiuI2YilwNvZNU+Fs@lists.infradead.org X-Gm-Message-State: AOJu0YzLg9RFNxlDdSnzD9+ofHAo37BdyGn8fTvDqYkKXJXzW8u4W9c0 6qQky+hcJKEwYU16vi3qhzzMvzCu1P1T1N2D+v4DlWTRpoEnWSNAYPKks0EQXUI= X-Google-Smtp-Source: AGHT+IFHaCs0Brlywx2EDejiKT/SRxUFjAkp/495iouOQYJDyac2EtGgBL2CMBR/7/lJY4x2bivyMQ== X-Received: by 2002:a05:600c:4f88:b0:428:ec2a:8c94 with SMTP id 5b1f17b1804b1-4318c6ea2f0mr54335655e9.10.1729862102813; Fri, 25 Oct 2024 06:15:02 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.15.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:15:02 -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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 10/11] scsi: ufs: exynos: fix hibern8 notify callbacks Date: Fri, 25 Oct 2024 14:14:41 +0100 Message-ID: <20241025131442.112862-11-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_141505_454025_93E2FEDD X-CRM114-Status: GOOD ( 14.58 ) 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 v1 of the patch which introduced the ufshcd_vops_hibern8_notify() callback used a bool instead of an enum. In v2 this was updated to an enum based on the review feedback in [1]. ufs-exynos hibernate calls have always been broken upstream as it follows the v1 bool implementation. [1] https://patchwork.kernel.org/project/linux-scsi/patch/001f01d23994$719997c0$54ccc740$@samsung.com/ Signed-off-by: Peter Griffin Reviewed-by: Tudor Ambarus --- --- drivers/ufs/host/ufs-exynos.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index fa4e61f152c4..3bbb71f7bae7 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -1529,12 +1529,12 @@ static void exynos_ufs_dev_hw_reset(struct ufs_hba *hba) hci_writel(ufs, 1 << 0, HCI_GPIO_OUT); } -static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, u8 enter) +static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd) { struct exynos_ufs *ufs = ufshcd_get_variant(hba); struct exynos_ufs_uic_attr *attr = ufs->drv_data->uic_attr; - if (!enter) { + if (cmd == UIC_CMD_DME_HIBER_EXIT) { if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL) exynos_ufs_disable_auto_ctrl_hcc(ufs); exynos_ufs_ungate_clks(ufs); @@ -1562,11 +1562,11 @@ static void exynos_ufs_pre_hibern8(struct ufs_hba *hba, u8 enter) } } -static void exynos_ufs_post_hibern8(struct ufs_hba *hba, u8 enter) +static void exynos_ufs_post_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd) { struct exynos_ufs *ufs = ufshcd_get_variant(hba); - if (!enter) { + if (cmd == UIC_CMD_DME_HIBER_EXIT) { u32 cur_mode = 0; u32 pwrmode; @@ -1585,7 +1585,7 @@ static void exynos_ufs_post_hibern8(struct ufs_hba *hba, u8 enter) if (!(ufs->opts & EXYNOS_UFS_OPT_SKIP_CONNECTION_ESTAB)) exynos_ufs_establish_connt(ufs); - } else { + } else if (cmd == UIC_CMD_DME_HIBER_ENTER) { ufs->entry_hibern8_t = ktime_get(); exynos_ufs_gate_clks(ufs); if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL) @@ -1672,15 +1672,15 @@ static int exynos_ufs_pwr_change_notify(struct ufs_hba *hba, } static void exynos_ufs_hibern8_notify(struct ufs_hba *hba, - enum uic_cmd_dme enter, + enum uic_cmd_dme cmd, enum ufs_notify_change_status notify) { switch ((u8)notify) { case PRE_CHANGE: - exynos_ufs_pre_hibern8(hba, enter); + exynos_ufs_pre_hibern8(hba, cmd); break; case POST_CHANGE: - exynos_ufs_post_hibern8(hba, enter); + exynos_ufs_post_hibern8(hba, cmd); break; } } From patchwork Fri Oct 25 13:14:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 13850699 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 B955DD0C609 for ; Fri, 25 Oct 2024 13:25:50 +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=0aTUxFFuuS7q4apCNsR9KGVB+f/W8Symh/UfMC9/XY8=; b=v0uukkCVYWcpgiwoNxOhhFNP/x p7/hy/QUtayYpwTRGo2GdFiPPRsLqUIR3n6DOUkEru7p0jlBwxreHumk4bd9Bzm5+l91cGviKjMqM yMc5Rhh2reVAFnNL8YWhksF/KHJ7nign6/u5sOJbSfhbUm7GU75NTIzKoL/nlzw0MGNnQeRfYt0+x xNGvFJerUBPj/dv/xMqqVK7GL9fWyIoy4lkRtNMXC8UorJK/ZCLmokpqF75XPLmjwfjQ4cfctb+8G XpHHpt2Xn9f6Qyv204dFCop4fwOZJC7jwyfPclN7mepX+kwq2ObiaRhEFkH/oXriyZ6WQ1EFGIEMy eoTdHcVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4KJu-00000003oYt-3CeZ; Fri, 25 Oct 2024 13:25:38 +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 1t4K9m-00000003moF-3e7S for linux-arm-kernel@bombadil.infradead.org; Fri, 25 Oct 2024 13:15:11 +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=0aTUxFFuuS7q4apCNsR9KGVB+f/W8Symh/UfMC9/XY8=; b=gskBDtFztJnSOiLYyhzZUzkzo4 n4BHFHANTZaTz5St4kU6rmybn2/4qxQNpP/d2yX8pmKGpafq/WgwSBIfLcRzARNWuBzpPxPUj12mJ PftgsvbIEsBS8x1mIrtw1TI2DCpnr+97WC9a5Izd1eUj0dEAjJ66xPflS/b3/dLmTsEZPCF+2ZmBi SC+KCU3yR0WllbRGH8ryc9X/ddcg+gEpJfIQXNCndkq+/E1fWEdw/4OHPuDwQ3Uw/LQS3pDu6rKJk YpeVM+dzFVHYkDNI/4NQ6JxI28k7zNqhhWlSsixEM9v+6exw7KumF1JNHgyuPA5QF54ofm13wODg3 YdtEuDTw==; Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4K9i-00000008v59-3PVj for linux-arm-kernel@lists.infradead.org; Fri, 25 Oct 2024 13:15:09 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-42f6bec84b5so20842885e9.1 for ; Fri, 25 Oct 2024 06:15:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729862104; x=1730466904; 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=0aTUxFFuuS7q4apCNsR9KGVB+f/W8Symh/UfMC9/XY8=; b=RHBMQ+q6u0YNDpwUotiVaFOEKA1apj+yQWzmEwUwJkD5jWntu5EvzoNOJbgKsYDktQ K7tF4ANqSWcJpC99K/znhwodTUEHDBf6/L+FQbvcivJDHITNELACtkMCTPP2MTksmkz7 WeivnYpXeTfjN76e1gEZ7jag+Zp5kff6SRrQe5yxiLFU43s6g2kS1ZIs2y0RFMOXUWQe XVrG9rstq0IWfmy+36vk2PyvrVNyfdo0zrw3XHED5mJGF3Ucrlfu1uB3N66ZxYmjtn87 itBgp5eyvII0X2YVMphbGw9F78fOnlaWp30+htTDlR9Kx4s5tgkxwqdEnAZMViEC/+aX rBwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729862104; x=1730466904; 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=0aTUxFFuuS7q4apCNsR9KGVB+f/W8Symh/UfMC9/XY8=; b=nVv0vjtOMwXuWelDO/JLntNEAUiZK8iW9efHnMYVvHDESXZhH6bNWZM6VUeoMq5kuL yMTVE4pwUMI8dsDZkV4Ye2J/laKVvTMY5iWfzuHSu7RVWUuhpovZJ+ZkHAIL0ZdzxmFQ HLlS+LyN6xWocBjUPDF+hEha9pWq3hm4086WlNblTEbQZ+5kkSe5T0C8tdac52KjqYsq mO97aPD6Ct6yr5GjirRYlpPC2hNISzwZdRUSHPNhTFi9khtq+cuwhC9nntfkthELd5J2 NLcfuvt0Z1KRjppmW/K3M2/yL26G31lDvwaiq4Vw4uCxERSJzeJxTPbyf/V8boXiTLgW Gdwg== X-Forwarded-Encrypted: i=1; AJvYcCWCDOVjObUxgWpHhL/gBOEHaOJJhY6m8EYHT/5T8BvnsKLHdtbz6Fv/IfsuuPyamN0f1zAHIz1VF1QBG/dU96lS@lists.infradead.org X-Gm-Message-State: AOJu0YzFB/jmhx0n05H7CpkkAPQ2QDYKWZr37Z2ccdv7jVn027v+CLwW fRxfiF4bt01mQGXAjpA1cZ1/+/j3GyWRuTSc4+RGomtzb4AcNw1bvbQxC5zM8ZY= X-Google-Smtp-Source: AGHT+IFn4umTFqPxopB2GAJY2aOrR7RfiFspVJ8SdEfcnoO13PLJi0jzfHRWD2Ee5O6gR0xA2R/rxA== X-Received: by 2002:a05:600c:3b2a:b0:42c:af2a:dcf4 with SMTP id 5b1f17b1804b1-4318c754f00mr39202585e9.27.1729862104292; Fri, 25 Oct 2024 06:15:04 -0700 (PDT) Received: from gpeter-l.lan ([145.224.67.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4318b58b6bdsm47616685e9.45.2024.10.25.06.15.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 06:15:03 -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, ebiggers@kernel.org, Peter Griffin Subject: [PATCH v2 11/11] scsi: ufs: exynos: gs101: enable clock gating with hibern8 Date: Fri, 25 Oct 2024 14:14:42 +0100 Message-ID: <20241025131442.112862-12-peter.griffin@linaro.org> X-Mailer: git-send-email 2.47.0.163.g1226f6d8fa-goog In-Reply-To: <20241025131442.112862-1-peter.griffin@linaro.org> References: <20241025131442.112862-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-20241025_141508_159508_B585C40D X-CRM114-Status: GOOD ( 15.12 ) 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 Enable clock gating and hibern8 capabilities for gs101. This leads to a significantly cooler phone when running the upstream kernel. The exynos_ufs_post_hibern8() hook is also updated to remove the UIC_CMD_DME_HIBER_EXIT code path as this causes a hang on gs101. The code path is removed rather than re-factored as no other SoC in ufs-exynos driver sets UFSHCD_CAP_HIBERN8_WITH_CLK_GATING capability. Additionally until the previous commit the hibern8 callbacks were broken anyway as they expected a bool. Signed-off-by: Peter Griffin Reviewed-by: Tudor Ambarus --- drivers/ufs/host/ufs-exynos.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/ufs/host/ufs-exynos.c b/drivers/ufs/host/ufs-exynos.c index 3bbb71f7bae7..7c8195f27bb6 100644 --- a/drivers/ufs/host/ufs-exynos.c +++ b/drivers/ufs/host/ufs-exynos.c @@ -229,6 +229,9 @@ static int gs101_ufs_drv_init(struct device *dev, struct exynos_ufs *ufs) /* Enable WriteBooster */ hba->caps |= UFSHCD_CAP_WB_EN; + /* Enable clock gating and hibern8 */ + hba->caps |= UFSHCD_CAP_CLK_GATING | UFSHCD_CAP_HIBERN8_WITH_CLK_GATING; + /* set ACG to be controlled by UFS_ACG_DISABLE */ reg = hci_readl(ufs, HCI_IOP_ACG_DISABLE); hci_writel(ufs, reg & (~HCI_IOP_ACG_DISABLE_EN), HCI_IOP_ACG_DISABLE); @@ -1566,26 +1569,7 @@ static void exynos_ufs_post_hibern8(struct ufs_hba *hba, enum uic_cmd_dme cmd) { struct exynos_ufs *ufs = ufshcd_get_variant(hba); - if (cmd == UIC_CMD_DME_HIBER_EXIT) { - u32 cur_mode = 0; - u32 pwrmode; - - if (ufshcd_is_hs_mode(&ufs->dev_req_params)) - pwrmode = FAST_MODE; - else - pwrmode = SLOW_MODE; - - ufshcd_dme_get(hba, UIC_ARG_MIB(PA_PWRMODE), &cur_mode); - if (cur_mode != (pwrmode << 4 | pwrmode)) { - dev_warn(hba->dev, "%s: power mode change\n", __func__); - hba->pwr_info.pwr_rx = (cur_mode >> 4) & 0xf; - hba->pwr_info.pwr_tx = cur_mode & 0xf; - ufshcd_config_pwr_mode(hba, &hba->max_pwr_info.info); - } - - if (!(ufs->opts & EXYNOS_UFS_OPT_SKIP_CONNECTION_ESTAB)) - exynos_ufs_establish_connt(ufs); - } else if (cmd == UIC_CMD_DME_HIBER_ENTER) { + if (cmd == UIC_CMD_DME_HIBER_ENTER) { ufs->entry_hibern8_t = ktime_get(); exynos_ufs_gate_clks(ufs); if (ufs->opts & EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL)