Re: [PATCH] ufs: qcom: Add quirks for Samsung UFS devices
From: MANISH PANDEY
Date: Wed Mar 26 2025 - 05:54:25 EST
On 3/25/2025 5:12 PM, Bart Van Assche wrote:
On 3/25/25 4:38 AM, Manish Pandey wrote:
Introduce quirks for Samsung UFS devices to override PA hibern8 time,
PA TX HSG1 sync length, and TX_HS_EQUALIZER for the Qualcomm UFS Host
controller. These adjustments are essential to maintain the proper
functionality of Samsung UFS devices for Qualcomm UFS Host controller.
Which of these quirks are required for all host controllers and which of
these quirks are only required for Qualcomm host controllers?
PA_TX_HSG1_SYNC_LENGTH and PA_TX_DEEMPHASIS_TUNING are specific to the
Qualcomm host controller.
The QUIRK_PA_HIBER8TIME may also be necessary for other SoC vendors host
controllers. For instance, the ufs-exynos.c file implements a similar
approach in the fsd_ufs_post_link() function:
ufshcd_dme_set(hba, UIC_ARG_MIB(0x15A7), max_rx_hibern8_time_cap + 1);
https://lore.kernel.org/lkml/001101d874c1$3d850eb0$b88f2c10$@samsung.com/
Should we consider moving the QUIRK_PA_HIBER8TIME quirk to the ufshcd
driver? Please advise.
+ equalizer_val = (gear == 5) ? DEEMPHASIS_3_5_dB : NO_DEEMPHASIS;
> I think that the parenthesis can be removed from the above statement
without reducing readability of the code.
Thanks,
Bart.
equalizer_val = gear == 5 ? DEEMPHASIS_3_5_dB : NO_DEEMPHASIS;
equalizer_val = (gear == 5) ? DEEMPHASIS_3_5_dB : NO_DEEMPHASIS;
i have used parenthesis for better readability and to make the
conditional expression more explicit.
Thanks
Manish