lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <DU0PR04MB9496A41A7573FD1E3027C1B090DA2@DU0PR04MB9496.eurprd04.prod.outlook.com>
Date: Mon, 8 Jul 2024 02:26:26 +0000
From: Bough Chen <haibo.chen@....com>
To: "Ciprian Marian Costea (OSS)" <ciprianmarian.costea@....nxp.com>, Adrian
 Hunter <adrian.hunter@...el.com>, Ulf Hansson <ulf.hansson@...aro.org>, Shawn
 Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix
 Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
	"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, dl-S32 <S32@....com>
Subject: RE: [PATCH 1/4] mmc: sdhci-esdhc-imx: disable card detect wake for
 S32G based platforms

> -----Original Message-----
> From: Ciprian Marian Costea (OSS) <ciprianmarian.costea@....nxp.com>
> Sent: 2024年7月5日 21:47
> To: Bough Chen <haibo.chen@....com>; Adrian Hunter
> <adrian.hunter@...el.com>; Ulf Hansson <ulf.hansson@...aro.org>; Shawn Guo
> <shawnguo@...nel.org>; Sascha Hauer <s.hauer@...gutronix.de>;
> Pengutronix Kernel Team <kernel@...gutronix.de>; Fabio Estevam
> <festevam@...il.com>
> Cc: linux-kernel@...r.kernel.org; linux-mmc@...r.kernel.org;
> imx@...ts.linux.dev; linux-arm-kernel@...ts.infradead.org; dl-S32
> <S32@....com>; Ciprian Marian Costea (OSS)
> <ciprianmarian.costea@....nxp.com>
> Subject: [PATCH 1/4] mmc: sdhci-esdhc-imx: disable card detect wake for S32G
> based platforms
> 
> 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.

From my side,
Reviewed-by: Haibo Chen <haibo.chen@....com>

But better to wait the comments from Adrian and Ulf.

Best Regards
Haibo Chen
> 
> Signed-off-by: Ciprian Costea <ciprianmarian.costea@....nxp.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;
> --
> 2.45.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ