diff mbox series

[RFC,v3.1,03/27] mmc: core: UHS-II support, skip set_chip_select()

Message ID 20201106022726.19831-4-takahiro.akashi@linaro.org
State New
Headers show
Series Add support UHS-II for GL9755 | expand

Commit Message

AKASHI Takahiro Nov. 6, 2020, 2:27 a.m. UTC
mmc_set_chip_select() should be called only in UHS-II mode,
and not for UHS-II mode.

Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>

---
 drivers/mmc/core/core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.28.0

Comments

Bough Chen Nov. 10, 2020, 7:15 a.m. UTC | #1
> -----Original Message-----

> From: AKASHI Takahiro [mailto:takahiro.akashi@linaro.org]

> Sent: 2020年11月6日 10:27

> To: ulf.hansson@linaro.org; adrian.hunter@intel.com

> Cc: linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org;

> ben.chuang@genesyslogic.com.tw; greg.tu@genesyslogic.com.tw; AKASHI

> Takahiro <takahiro.akashi@linaro.org>

> Subject: [RFC PATCH v3.1 03/27] mmc: core: UHS-II support, skip

> set_chip_select()

> 

> mmc_set_chip_select() should be called only in UHS-II mode, and not for UHS-II

> mode.


Typo, only in UHS-I mode.

Regards
Haibo Chen
> 

> Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>

> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>

> ---

>  drivers/mmc/core/core.c | 6 ++++--

>  1 file changed, 4 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index

> 5541ed956c4d..4e12bd98fc08 100644

> --- a/drivers/mmc/core/core.c

> +++ b/drivers/mmc/core/core.c

> @@ -898,8 +898,10 @@ static inline void mmc_set_ios(struct mmc_host

> *host)

>   */

>  void mmc_set_chip_select(struct mmc_host *host, int mode)  {

> -	host->ios.chip_select = mode;

> -	mmc_set_ios(host);

> +	if (!(host->flags & MMC_UHS2_INITIALIZED)) {

> +		host->ios.chip_select = mode;

> +		mmc_set_ios(host);

> +	}

>  }

> 

>  /*

> --

> 2.28.0
diff mbox series

Patch

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 5541ed956c4d..4e12bd98fc08 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -898,8 +898,10 @@  static inline void mmc_set_ios(struct mmc_host *host)
  */
 void mmc_set_chip_select(struct mmc_host *host, int mode)
 {
-	host->ios.chip_select = mode;
-	mmc_set_ios(host);
+	if (!(host->flags & MMC_UHS2_INITIALIZED)) {
+		host->ios.chip_select = mode;
+		mmc_set_ios(host);
+	}
 }
 
 /*