Skip to content

Commit 6d55af0

Browse files
Bharat Uppalmartinkpetersen
authored andcommitted
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. Co-developed-by: Nimesh Sati <nimesh.sati@samsung.com> Signed-off-by: Nimesh Sati <nimesh.sati@samsung.com> Signed-off-by: Bharat Uppal <bharat.uppal@samsung.com> Link: https://lore.kernel.org/r/20250821053923.69411-1-bharat.uppal@samsung.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent d6477ee commit 6d55af0

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

drivers/ufs/host/ufs-exynos.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,6 +1896,13 @@ static int fsd_ufs_pre_pwr_change(struct exynos_ufs *ufs,
18961896
return 0;
18971897
}
18981898

1899+
static int fsd_ufs_suspend(struct exynos_ufs *ufs)
1900+
{
1901+
exynos_ufs_gate_clks(ufs);
1902+
hci_writel(ufs, 0, HCI_GPIO_OUT);
1903+
return 0;
1904+
}
1905+
18991906
static inline u32 get_mclk_period_unipro_18(struct exynos_ufs *ufs)
19001907
{
19011908
return (16 * 1000 * 1000000UL / ufs->mclk_rate);
@@ -2162,6 +2169,7 @@ static const struct exynos_ufs_drv_data fsd_ufs_drvs = {
21622169
.pre_link = fsd_ufs_pre_link,
21632170
.post_link = fsd_ufs_post_link,
21642171
.pre_pwr_change = fsd_ufs_pre_pwr_change,
2172+
.suspend = fsd_ufs_suspend,
21652173
};
21662174

21672175
static const struct exynos_ufs_drv_data gs101_ufs_drvs = {

0 commit comments

Comments
 (0)