Skip to content

Commit 36adb55

Browse files
petegriffinmartinkpetersen
authored andcommitted
scsi: ufs: exynos: Set ACG to be controlled by UFS_ACG_DISABLE
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 protect us in case the bootloader behaviour ever changes. Signed-off-by: Peter Griffin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Tudor Ambarus <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent ef8bfb0 commit 36adb55

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/ufs/host/ufs-exynos.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@
7676
#define CLK_CTRL_EN_MASK (REFCLK_CTRL_EN |\
7777
UNIPRO_PCLK_CTRL_EN |\
7878
UNIPRO_MCLK_CTRL_EN)
79+
80+
#define HCI_IOP_ACG_DISABLE 0x100
81+
#define HCI_IOP_ACG_DISABLE_EN BIT(0)
82+
7983
/* Device fatal error */
8084
#define DFES_ERR_EN BIT(31)
8185
#define DFES_DEF_L2_ERRS (UIC_DATA_LINK_LAYER_ERROR_RX_BUF_OF |\
@@ -215,10 +219,15 @@ static int exynos_ufs_shareability(struct exynos_ufs *ufs)
215219
static int gs101_ufs_drv_init(struct exynos_ufs *ufs)
216220
{
217221
struct ufs_hba *hba = ufs->hba;
222+
u32 reg;
218223

219224
/* Enable WriteBooster */
220225
hba->caps |= UFSHCD_CAP_WB_EN;
221226

227+
/* set ACG to be controlled by UFS_ACG_DISABLE */
228+
reg = hci_readl(ufs, HCI_IOP_ACG_DISABLE);
229+
hci_writel(ufs, reg & (~HCI_IOP_ACG_DISABLE_EN), HCI_IOP_ACG_DISABLE);
230+
222231
return exynos_ufs_shareability(ufs);
223232
}
224233

0 commit comments

Comments
 (0)