Skip to content

Commit bacb96c

Browse files
ptr324martinkpetersen
authored andcommitted
scsi: ufs: host: mediatek: Fix UniPro setting for MT6989
Set the UniPro attribute 0xD09E[4] bit to enable the 1144 functions specifically for the MT6989 platform. This adjustment ensures proper functionality and compatibility with the MT6989 hardware. Signed-off-by: Peter Wang <peter.wang@mediatek.com> Link: https://lore.kernel.org/r/20250811131423.3444014-9-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent f1617ec commit bacb96c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

drivers/ufs/host/ufs-mediatek.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,7 @@ static int ufs_mtk_pre_link(struct ufs_hba *hba)
14751475
{
14761476
int ret;
14771477
u32 tmp;
1478+
struct ufs_mtk_host *host = ufshcd_get_variant(hba);
14781479

14791480
ufs_mtk_get_controller_version(hba);
14801481

@@ -1500,6 +1501,16 @@ static int ufs_mtk_pre_link(struct ufs_hba *hba)
15001501

15011502
ret = ufshcd_dme_set(hba, UIC_ARG_MIB(VS_SAVEPOWERCONTROL), tmp);
15021503

1504+
/* Enable the 1144 functions setting */
1505+
if (host->ip_ver == IP_VER_MT6989) {
1506+
ret = ufshcd_dme_get(hba, UIC_ARG_MIB(VS_DEBUGOMC), &tmp);
1507+
if (ret)
1508+
return ret;
1509+
1510+
tmp |= 0x10;
1511+
ret = ufshcd_dme_set(hba, UIC_ARG_MIB(VS_DEBUGOMC), tmp);
1512+
}
1513+
15031514
return ret;
15041515
}
15051516
static void ufs_mtk_post_link(struct ufs_hba *hba)

0 commit comments

Comments
 (0)