[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200214160149.11681-328-sashal@kernel.org>
Date: Fri, 14 Feb 2020 10:59:38 -0500
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Stanley Chu <stanley.chu@...iatek.com>,
Alim Akhtar <alim.akhtar@...sung.com>,
Asutosh Das <asutoshd@...eaurora.org>,
Avri Altman <avri.altman@....com>,
Bart Van Assche <bvanassche@....org>,
Bean Huo <beanhuo@...ron.com>, Can Guo <cang@...eaurora.org>,
Matthias Brugger <matthias.bgg@...il.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
Sasha Levin <sashal@...nel.org>, linux-scsi@...r.kernel.org,
linux-mediatek@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH AUTOSEL 5.4 328/459] scsi: ufs-mediatek: add apply_dev_quirks variant operation
From: Stanley Chu <stanley.chu@...iatek.com>
[ Upstream commit ea92c32bd336efba89c5b09cf609e6e26e963796 ]
Add vendor-specific variant callback "apply_dev_quirks" to MediaTek UFS
driver.
Cc: Alim Akhtar <alim.akhtar@...sung.com>
Cc: Asutosh Das <asutoshd@...eaurora.org>
Cc: Avri Altman <avri.altman@....com>
Cc: Bart Van Assche <bvanassche@....org>
Cc: Bean Huo <beanhuo@...ron.com>
Cc: Can Guo <cang@...eaurora.org>
Cc: Matthias Brugger <matthias.bgg@...il.com>
Link: https://lore.kernel.org/r/1578726707-6596-3-git-send-email-stanley.chu@mediatek.com
Reviewed-by: Avri Altman <avri.altman@....com>
Reviewed-by: Bean Huo <beanhuo@...ron.com>
Signed-off-by: Stanley Chu <stanley.chu@...iatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@...cle.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/scsi/ufs/ufs-mediatek.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index 0f6ff33ce52ee..d4a8be5ffd528 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -13,6 +13,7 @@
#include "ufshcd.h"
#include "ufshcd-pltfrm.h"
+#include "ufs_quirks.h"
#include "unipro.h"
#include "ufs-mediatek.h"
@@ -286,6 +287,15 @@ static int ufs_mtk_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
return 0;
}
+static int ufs_mtk_apply_dev_quirks(struct ufs_hba *hba,
+ struct ufs_dev_desc *card)
+{
+ if (card->wmanufacturerid == UFS_VENDOR_SAMSUNG)
+ ufshcd_dme_set(hba, UIC_ARG_MIB(PA_TACTIVATE), 6);
+
+ return 0;
+}
+
/**
* struct ufs_hba_mtk_vops - UFS MTK specific variant operations
*
@@ -298,6 +308,7 @@ static struct ufs_hba_variant_ops ufs_hba_mtk_vops = {
.setup_clocks = ufs_mtk_setup_clocks,
.link_startup_notify = ufs_mtk_link_startup_notify,
.pwr_change_notify = ufs_mtk_pwr_change_notify,
+ .apply_dev_quirks = ufs_mtk_apply_dev_quirks,
.suspend = ufs_mtk_suspend,
.resume = ufs_mtk_resume,
};
--
2.20.1
Powered by blists - more mailing lists