mbox series

[V2,0/2] mmc: sdhci-msm: Rectify DLL programming sequence for SDCC

Message ID 20241218091057.15625-1-quic_sachgupt@quicinc.com
Headers show
Series mmc: sdhci-msm: Rectify DLL programming sequence for SDCC | expand

Message

Sachin Gupta Dec. 18, 2024, 9:10 a.m. UTC
With the current DLL sequence stability issues are seen in
HS400 and HS200 mode for data transfers.

Rectify the DLL programming sequence as per latest hardware
programming guide and also incorporate support for HS200 and
HS400 DLL settings using the device tree.

Changes from v1:
1. Addressed Tengfei Fan comment, added missing semicolocon
 in sdhci_msm_host structure.

Sachin Gupta (2):
  mmc: sdhci-msm: Add core_major, minor to msm_host structure
  mmc: sdhci-msm: Rectify DLL programming sequence for SDCC

 drivers/mmc/host/sdhci-msm.c | 378 +++++++++++++++++++++++++++++++++--
 1 file changed, 359 insertions(+), 19 deletions(-)

Comments

Dmitry Baryshkov Dec. 19, 2024, 3:09 a.m. UTC | #1
On Wed, Dec 18, 2024 at 02:40:56PM +0530, Sachin Gupta wrote:
> Add the core_major and core_minor variables from local
> scope to the msm_host structure. This change improves
> the organization of the code and allows these variables
> to be accessed more easily throughout the msm_host context.

It doesn't improve anything, it is necessary for the followup patch.

> 
> core_major will have information related to sdcc controller
> major version number.
> core_minor will have information related to sdcc controller
> minor version number.
> 
> Signed-off-by: Sachin Gupta <quic_sachgupt@quicinc.com>
> ---
>  drivers/mmc/host/sdhci-msm.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index e00208535bd1..2a5e588779fc 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -273,6 +273,8 @@ struct sdhci_msm_host {
>  	bool tuning_done;
>  	bool calibration_done;
>  	u8 saved_tuning_phase;
> +	u8 core_major;
> +	u16 core_minor;
>  	bool use_cdclp533;
>  	u32 curr_pwr_state;
>  	u32 curr_io_level;
> @@ -2557,6 +2559,10 @@ static int sdhci_msm_probe(struct platform_device *pdev)
>  	core_major = (core_version & CORE_VERSION_MAJOR_MASK) >>
>  		      CORE_VERSION_MAJOR_SHIFT;
>  	core_minor = core_version & CORE_VERSION_MINOR_MASK;
> +
> +	msm_host->core_major = core_major;
> +	msm_host->core_minor = core_minor;
> +
>  	dev_dbg(&pdev->dev, "MCI Version: 0x%08x, major: 0x%04x, minor: 0x%02x\n",
>  		core_version, core_major, core_minor);
>  
> -- 
> 2.17.1
>
Sachin Gupta Dec. 26, 2024, 5:44 a.m. UTC | #2
On 12/19/2024 8:39 AM, Dmitry Baryshkov wrote:
> On Wed, Dec 18, 2024 at 02:40:56PM +0530, Sachin Gupta wrote:
>> Add the core_major and core_minor variables from local
>> scope to the msm_host structure. This change improves
>> the organization of the code and allows these variables
>> to be accessed more easily throughout the msm_host context.
> 
> It doesn't improve anything, it is necessary for the followup patch.

Thanks for review. I will update the commit message to reflect the 
current patch information.

> 
>>
>> core_major will have information related to sdcc controller
>> major version number.
>> core_minor will have information related to sdcc controller
>> minor version number.
>>
>> Signed-off-by: Sachin Gupta <quic_sachgupt@quicinc.com>
>> ---
>>   drivers/mmc/host/sdhci-msm.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
>> index e00208535bd1..2a5e588779fc 100644
>> --- a/drivers/mmc/host/sdhci-msm.c
>> +++ b/drivers/mmc/host/sdhci-msm.c
>> @@ -273,6 +273,8 @@ struct sdhci_msm_host {
>>   	bool tuning_done;
>>   	bool calibration_done;
>>   	u8 saved_tuning_phase;
>> +	u8 core_major;
>> +	u16 core_minor;
>>   	bool use_cdclp533;
>>   	u32 curr_pwr_state;
>>   	u32 curr_io_level;
>> @@ -2557,6 +2559,10 @@ static int sdhci_msm_probe(struct platform_device *pdev)
>>   	core_major = (core_version & CORE_VERSION_MAJOR_MASK) >>
>>   		      CORE_VERSION_MAJOR_SHIFT;
>>   	core_minor = core_version & CORE_VERSION_MINOR_MASK;
>> +
>> +	msm_host->core_major = core_major;
>> +	msm_host->core_minor = core_minor;
>> +
>>   	dev_dbg(&pdev->dev, "MCI Version: 0x%08x, major: 0x%04x, minor: 0x%02x\n",
>>   		core_version, core_major, core_minor);
>>   
>> -- 
>> 2.17.1
>>
>