[PATCH v3 14/24] scsi: ufs: mediatek: Remove mediatek,ufs-broken-rtc property

Nicolas Frattaroli
2025-10-23T19:55:21Z

This flag property was never described in the binding, and its
capability wrapper seems pointless.

If one of the MediaTek SoCs needs the ufshcd quirk applied, then this
can be done per-compatible, without needing to give the device tree
author the option to forget to set it.

Remove it and the associated capability flag wrapping code.

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
drivers/ufs/host/ufs-mediatek.c | 5 -----
drivers/ufs/host/ufs-mediatek.h | 2 --
2 files changed, 7 deletions(-)

diff --git a/drivers/ufs/host/ufs-mediatek.c b/drivers/ufs/host/ufs-mediatek.c
index 427e6bc3a476..44676ba4c392 100644
--- a/drivers/ufs/host/ufs-mediatek.c
+++ b/drivers/ufs/host/ufs-mediatek.c
@@ -655,9 +655,6 @@ static void ufs_mtk_init_host_caps(struct ufs_hba *hba)
if (of_property_read_bool(np, "mediatek,ufs-rtff-mtcmos"))
host->caps |= UFS_MTK_CAP_RTFF_MTCMOS;

- if (of_property_read_bool(np, "mediatek,ufs-broken-rtc"))
- host->caps |= UFS_MTK_CAP_MCQ_BROKEN_RTC;
-
dev_info(hba->dev, "caps: 0x%x", host->caps);
}

@@ -1172,8 +1169,6 @@ static int ufs_mtk_init(struct ufs_hba *hba)
hba->quirks |= UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRL;

hba->quirks |= UFSHCD_QUIRK_MCQ_BROKEN_INTR;
- if (host->caps & UFS_MTK_CAP_MCQ_BROKEN_RTC)
- hba->quirks |= UFSHCD_QUIRK_MCQ_BROKEN_RTC;

hba->vps->wb_flush_threshold = UFS_WB_BUF_REMAIN_PERCENT(80);

diff --git a/drivers/ufs/host/ufs-mediatek.h b/drivers/ufs/host/ufs-mediatek.h
index 4e6a34f4ac39..9c377745f7a0 100644
--- a/drivers/ufs/host/ufs-mediatek.h
+++ b/drivers/ufs/host/ufs-mediatek.h
@@ -138,8 +138,6 @@ enum ufs_mtk_host_caps {
UFS_MTK_CAP_DISABLE_MCQ = 1 << 8,
/* Control MTCMOS with RTFF */
UFS_MTK_CAP_RTFF_MTCMOS = 1 << 9,
-
- UFS_MTK_CAP_MCQ_BROKEN_RTC = 1 << 10,
};

struct ufs_mtk_crypt_cfg {

--
2.51.1.dirty