Thread (42 messages) 42 messages, 4 authors, 2021-09-28

RE: [PATCH v3 11/17] scsi: ufs: ufs-exynos: add EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR option

From: "Alim Akhtar" <alim.akhtar@samsung.com>
Date: 2021-09-23 04:41:31
Also in: linux-samsung-soc

-----Original Message-----
From: Chanho Park [mailto:chanho61.park@samsung.com]
Sent: Friday, September 17, 2021 12:25 PM
To: Alim Akhtar <alim.akhtar@samsung.com>; Avri Altman
[off-list ref]; James E . J . Bottomley [off-list ref]; Martin
K . Petersen [off-list ref]; Krzysztof Kozlowski
[off-list ref]
Cc: Bean Huo <redacted>; Bart Van Assche
[off-list ref]; Adrian Hunter [off-list ref]; Christoph
Hellwig [off-list ref]; Can Guo [off-list ref]; Jaegeuk Kim
[off-list ref]; Gyunghoon Kwon [off-list ref];
linux-samsung-soc@vger.kernel.org; linux-scsi@vger.kernel.org; Chanho Park
[off-list ref]; Kiwoong Kim [off-list ref]
Subject: [PATCH v3 11/17] scsi: ufs: ufs-exynos: add
EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR option

To skip exynos_ufs_config_phy_*_attr settings for exynos-ufs variant, this patch
provides EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR as an opts flag.
Please add a bit more information on why this has to be skipped for this HCI.

Thanks
quoted hunk ↗ jump to hunk
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Kiwoong Kim <redacted>
Cc: Krzysztof Kozlowski <redacted>
Signed-off-by: Chanho Park <redacted>
---
drivers/scsi/ufs/ufs-exynos.c | 6 ++++--  drivers/scsi/ufs/ufs-exynos.h | 1 +
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ufs/ufs-exynos.c b/drivers/scsi/ufs/ufs-exynos.c index
a3160d9bd234..73833c186ca9 100644
--- a/drivers/scsi/ufs/ufs-exynos.c
+++ b/drivers/scsi/ufs/ufs-exynos.c
@@ -831,8 +831,10 @@ static int exynos_ufs_pre_link(struct ufs_hba *hba)
	/* m-phy */
	exynos_ufs_phy_init(ufs);
-	exynos_ufs_config_phy_time_attr(ufs);
-	exynos_ufs_config_phy_cap_attr(ufs);
+	if (!(ufs->opts & EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR)) {
+		exynos_ufs_config_phy_time_attr(ufs);
+		exynos_ufs_config_phy_cap_attr(ufs);
+	}

	exynos_ufs_setup_clocks(hba, true, POST_CHANGE);
diff --git a/drivers/scsi/ufs/ufs-exynos.h b/drivers/scsi/ufs/ufs-exynos.h index
bc4b8b0324bd..a0899aaa902e 100644
--- a/drivers/scsi/ufs/ufs-exynos.h
+++ b/drivers/scsi/ufs/ufs-exynos.h
@@ -200,6 +200,7 @@ struct exynos_ufs {
#define EXYNOS_UFS_OPT_BROKEN_AUTO_CLK_CTRL	BIT(2)
#define EXYNOS_UFS_OPT_BROKEN_RX_SEL_IDX	BIT(3)
#define EXYNOS_UFS_OPT_USE_SW_HIBERN8_TIMER	BIT(4)
+#define EXYNOS_UFS_OPT_SKIP_CONFIG_PHY_ATTR	BIT(5)
};

#define for_each_ufs_rx_lane(ufs, i) \
--
2.33.0
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help