diff mbox series

[1/3] mmc: sdhci-esdhc-imx: disable card detect wake for S32G based platforms

Message ID 20240708121018.246476-2-ciprianmarian.costea@oss.nxp.com
State New
Headers show
Series address S32G2/S32G3 SoC based boards particularities | expand

Commit Message

Ciprian Marian Costea July 8, 2024, 12:10 p.m. UTC
In case of S32G based platforms, GPIO CD used for card detect
wake mechanism is not available.

For this scenario the newly introduced flag
'ESDHC_FLAG_SKIP_CD_WAKE' is used.

Signed-off-by: Ciprian Costea <ciprianmarian.costea@oss.nxp.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Adrian Hunter July 10, 2024, 12:34 p.m. UTC | #1
On 8/07/24 15:10, Ciprian Costea wrote:
> In case of S32G based platforms, GPIO CD used for card detect
> wake mechanism is not available.
> 
> For this scenario the newly introduced flag
> 'ESDHC_FLAG_SKIP_CD_WAKE' is used.
> 
> Signed-off-by: Ciprian Costea <ciprianmarian.costea@oss.nxp.com>

Should have:

 - put the patch set version number (v2) in the subject e.g.
   [PATCH v2 1/3] mmc: sdhci-esdhc-imx: disable card detect wake for S32G based platforms

 - added Haibo Chen's Reviewed-by tag

Anyway:

Acked-by: Adrian Hunter <adrian.hunter@intel.com>


> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 40a6e2f8145a..21d984a77be8 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -201,6 +201,9 @@
>  /* ERR004536 is not applicable for the IP  */
>  #define ESDHC_FLAG_SKIP_ERR004536	BIT(17)
>  
> +/* The IP does not have GPIO CD wake capabilities */
> +#define ESDHC_FLAG_SKIP_CD_WAKE		BIT(18)
> +
>  enum wp_types {
>  	ESDHC_WP_NONE,		/* no WP, neither controller nor gpio */
>  	ESDHC_WP_CONTROLLER,	/* mmc controller internal WP */
> @@ -298,7 +301,7 @@ static struct esdhc_soc_data usdhc_s32g2_data = {
>  	.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
>  			| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
>  			| ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES
> -			| ESDHC_FLAG_SKIP_ERR004536,
> +			| ESDHC_FLAG_SKIP_ERR004536 | ESDHC_FLAG_SKIP_CD_WAKE,
>  };
>  
>  static struct esdhc_soc_data usdhc_imx7ulp_data = {
> @@ -1726,7 +1729,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
>  		host->mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;
>  
>  		/* GPIO CD can be set as a wakeup source */
> -		host->mmc->caps |= MMC_CAP_CD_WAKE;
> +		if (!(imx_data->socdata->flags & ESDHC_FLAG_SKIP_CD_WAKE))
> +			host->mmc->caps |= MMC_CAP_CD_WAKE;
>  
>  		if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200))
>  			host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
Ciprian Marian Costea July 11, 2024, 2:25 p.m. UTC | #2
On 7/10/2024 3:34 PM, Adrian Hunter wrote:
> On 8/07/24 15:10, Ciprian Costea wrote:
>> In case of S32G based platforms, GPIO CD used for card detect
>> wake mechanism is not available.
>>
>> For this scenario the newly introduced flag
>> 'ESDHC_FLAG_SKIP_CD_WAKE' is used.
>>
>> Signed-off-by: Ciprian Costea <ciprianmarian.costea@oss.nxp.com>
> 
> Should have:
> 
>   - put the patch set version number (v2) in the subject e.g.
>     [PATCH v2 1/3] mmc: sdhci-esdhc-imx: disable card detect wake for S32G based platforms
> 
>   - added Haibo Chen's Reviewed-by tag
> 
> Anyway:
> 
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>
>

Hello Adrian,

Sorry for bothering you with this question, but should I send a new 
patchset adding the new version or what is the process after this step ? 
For example, should I send this patchset again with V3 adding all the 
ACKs & Reviewed-by tags to each commit from the patchset ?

Best Regards,
Ciprian

> 
>> ---
>>   drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++--
>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
>> index 40a6e2f8145a..21d984a77be8 100644
>> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
>> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
>> @@ -201,6 +201,9 @@
>>   /* ERR004536 is not applicable for the IP  */
>>   #define ESDHC_FLAG_SKIP_ERR004536	BIT(17)
>>   
>> +/* The IP does not have GPIO CD wake capabilities */
>> +#define ESDHC_FLAG_SKIP_CD_WAKE		BIT(18)
>> +
>>   enum wp_types {
>>   	ESDHC_WP_NONE,		/* no WP, neither controller nor gpio */
>>   	ESDHC_WP_CONTROLLER,	/* mmc controller internal WP */
>> @@ -298,7 +301,7 @@ static struct esdhc_soc_data usdhc_s32g2_data = {
>>   	.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
>>   			| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
>>   			| ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES
>> -			| ESDHC_FLAG_SKIP_ERR004536,
>> +			| ESDHC_FLAG_SKIP_ERR004536 | ESDHC_FLAG_SKIP_CD_WAKE,
>>   };
>>   
>>   static struct esdhc_soc_data usdhc_imx7ulp_data = {
>> @@ -1726,7 +1729,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
>>   		host->mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;
>>   
>>   		/* GPIO CD can be set as a wakeup source */
>> -		host->mmc->caps |= MMC_CAP_CD_WAKE;
>> +		if (!(imx_data->socdata->flags & ESDHC_FLAG_SKIP_CD_WAKE))
>> +			host->mmc->caps |= MMC_CAP_CD_WAKE;
>>   
>>   		if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200))
>>   			host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
>
Ulf Hansson July 11, 2024, 3:55 p.m. UTC | #3
On Thu, 11 Jul 2024 at 16:26, Ciprian Marian Costea
<ciprianmarian.costea@oss.nxp.com> wrote:
>
> On 7/10/2024 3:34 PM, Adrian Hunter wrote:
> > On 8/07/24 15:10, Ciprian Costea wrote:
> >> In case of S32G based platforms, GPIO CD used for card detect
> >> wake mechanism is not available.
> >>
> >> For this scenario the newly introduced flag
> >> 'ESDHC_FLAG_SKIP_CD_WAKE' is used.
> >>
> >> Signed-off-by: Ciprian Costea <ciprianmarian.costea@oss.nxp.com>
> >
> > Should have:
> >
> >   - put the patch set version number (v2) in the subject e.g.
> >     [PATCH v2 1/3] mmc: sdhci-esdhc-imx: disable card detect wake for S32G based platforms
> >
> >   - added Haibo Chen's Reviewed-by tag
> >
> > Anyway:
> >
> > Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> >
>
> Hello Adrian,
>
> Sorry for bothering you with this question, but should I send a new
> patchset adding the new version or what is the process after this step ?
> For example, should I send this patchset again with V3 adding all the
> ACKs & Reviewed-by tags to each commit from the patchset ?

No need to send a new version this time, I can add Haibo's tag when
applying. Although I prefer an ack from him for patch3 before I merge
this.

Kind regards
Uffe

>
> Best Regards,
> Ciprian
>
> >
> >> ---
> >>   drivers/mmc/host/sdhci-esdhc-imx.c | 8 ++++++--
> >>   1 file changed, 6 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> >> index 40a6e2f8145a..21d984a77be8 100644
> >> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> >> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> >> @@ -201,6 +201,9 @@
> >>   /* ERR004536 is not applicable for the IP  */
> >>   #define ESDHC_FLAG_SKIP_ERR004536  BIT(17)
> >>
> >> +/* The IP does not have GPIO CD wake capabilities */
> >> +#define ESDHC_FLAG_SKIP_CD_WAKE             BIT(18)
> >> +
> >>   enum wp_types {
> >>      ESDHC_WP_NONE,          /* no WP, neither controller nor gpio */
> >>      ESDHC_WP_CONTROLLER,    /* mmc controller internal WP */
> >> @@ -298,7 +301,7 @@ static struct esdhc_soc_data usdhc_s32g2_data = {
> >>      .flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
> >>                      | ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
> >>                      | ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES
> >> -                    | ESDHC_FLAG_SKIP_ERR004536,
> >> +                    | ESDHC_FLAG_SKIP_ERR004536 | ESDHC_FLAG_SKIP_CD_WAKE,
> >>   };
> >>
> >>   static struct esdhc_soc_data usdhc_imx7ulp_data = {
> >> @@ -1726,7 +1729,8 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
> >>              host->mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;
> >>
> >>              /* GPIO CD can be set as a wakeup source */
> >> -            host->mmc->caps |= MMC_CAP_CD_WAKE;
> >> +            if (!(imx_data->socdata->flags & ESDHC_FLAG_SKIP_CD_WAKE))
> >> +                    host->mmc->caps |= MMC_CAP_CD_WAKE;
> >>
> >>              if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200))
> >>                      host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
> >
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 40a6e2f8145a..21d984a77be8 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -201,6 +201,9 @@ 
 /* ERR004536 is not applicable for the IP  */
 #define ESDHC_FLAG_SKIP_ERR004536	BIT(17)
 
+/* The IP does not have GPIO CD wake capabilities */
+#define ESDHC_FLAG_SKIP_CD_WAKE		BIT(18)
+
 enum wp_types {
 	ESDHC_WP_NONE,		/* no WP, neither controller nor gpio */
 	ESDHC_WP_CONTROLLER,	/* mmc controller internal WP */
@@ -298,7 +301,7 @@  static struct esdhc_soc_data usdhc_s32g2_data = {
 	.flags = ESDHC_FLAG_USDHC | ESDHC_FLAG_MAN_TUNING
 			| ESDHC_FLAG_HAVE_CAP1 | ESDHC_FLAG_HS200
 			| ESDHC_FLAG_HS400 | ESDHC_FLAG_HS400_ES
-			| ESDHC_FLAG_SKIP_ERR004536,
+			| ESDHC_FLAG_SKIP_ERR004536 | ESDHC_FLAG_SKIP_CD_WAKE,
 };
 
 static struct esdhc_soc_data usdhc_imx7ulp_data = {
@@ -1726,7 +1729,8 @@  static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
 		host->mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;
 
 		/* GPIO CD can be set as a wakeup source */
-		host->mmc->caps |= MMC_CAP_CD_WAKE;
+		if (!(imx_data->socdata->flags & ESDHC_FLAG_SKIP_CD_WAKE))
+			host->mmc->caps |= MMC_CAP_CD_WAKE;
 
 		if (!(imx_data->socdata->flags & ESDHC_FLAG_HS200))
 			host->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;