Re: [PATCH 2/2] ufs: mediatek: Implement get_hba_nortt callback for RTT capability

From: Peter Wang (王信友)

Date: Wed Jun 10 2026 - 01:36:03 EST


On Tue, 2026-06-09 at 18:38 +0800, ed.tsai@xxxxxxxxxxxx wrote:
> From: Ed Tsai <ed.tsai@xxxxxxxxxxxx>
>
> Implement the get_hba_nortt callback to handle platform-specific RTT
> capability differences:
>
> - For legacy platforms and IP versions before MT6995 B0, the RTT
>   capability from host controller register is problematic, so limit
>   it to 2 (MTK_MAX_NUM_RTT_LEGACY).
>
> - For MT6995 B0 and later platforms, the issue is fixed and the
>   value from host controller capability register can be used
> directly.
>
> This replaces the previous max_num_rtt field in ufs_hba_variant_ops
> with dynamic platform-specific logic.
>
> Signed-off-by: Ed Tsai <ed.tsai@xxxxxxxxxxxx>
> ---

Reviewed-by: Peter Wang <peter.wang@xxxxxxxxxxxx>