[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250804113643.75140-1-bharat.uppal@samsung.com>
Date: Mon, 4 Aug 2025 17:06:43 +0530
From: Bharat Uppal <bharat.uppal@...sung.com>
To: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
James.Bottomley@...senPartnership.com, martin.petersen@...cle.com,
alim.akhtar@...sung.com, avri.altman@....com, bvanassche@....org,
linux-samsung-soc@...r.kernel.org
Cc: pankaj.dubey@...sung.com, aswani.reddy@...sung.com, Bharat Uppal
<bharat.uppal@...sung.com>, Nimesh Sati <nimesh.sati@...sung.com>
Subject: [PATCH] scsi: ufs: exynos: fsd: Gate ref_clk and put UFS device in
reset on suspend
On FSD platform, gating the reference clock (ref_clk) and putting the
UFS device in reset by asserting the reset signal during UFS suspend,
improves the power savings and ensures the PHY is fully turned off.
These operations are added as FSD specific suspend hook to avoid
unintended side effects on other SoCs supported by this driver.
Signed-off-by: Nimesh Sati <nimesh.sati@...sung.com>
Signed-off-by: Bharat Uppal <bharat.uppal@...sung.com>
---
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 3e545af536e5..b19a9f0d25f6 100644
--- a/drivers/ufs/host/ufs-exynos.c
+++ b/drivers/ufs/host/ufs-exynos.c
@@ -1896,6 +1896,13 @@ static int fsd_ufs_pre_pwr_change(struct exynos_ufs *ufs,
return 0;
}
+static int fsd_ufs_suspend(struct exynos_ufs *ufs)
+{
+ exynos_ufs_gate_clks(ufs);
+ hci_writel(ufs, 0 << 0, HCI_GPIO_OUT);
+ return 0;
+}
+
static inline u32 get_mclk_period_unipro_18(struct exynos_ufs *ufs)
{
return (16 * 1000 * 1000000UL / ufs->mclk_rate);
@@ -2162,6 +2169,7 @@ static const struct exynos_ufs_drv_data fsd_ufs_drvs = {
.pre_link = fsd_ufs_pre_link,
.post_link = fsd_ufs_post_link,
.pre_pwr_change = fsd_ufs_pre_pwr_change,
+ .suspend = fsd_ufs_suspend,
};
static const struct exynos_ufs_drv_data gs101_ufs_drvs = {
--
2.49.0
Powered by blists - more mailing lists