Linux-mmc Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Revert "mmc: sdhci: Fix incorrect switch to HS mode"
@ 2019-11-28 11:04 Faiz Abbas
  2019-11-28 11:33 ` Adrian Hunter
  2019-12-10  9:51 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Faiz Abbas @ 2019-11-28 11:04 UTC (permalink / raw)
  To: linux-kernel, linux-mmc; +Cc: ulf.hansson, adrian.hunter, alcooperx, faiz_abbas

This reverts commit c894e33ddc1910e14d6f2a2016f60ab613fd8b37.

This commit aims to treat SD High speed and SDR25 as the same while
setting UHS Timings in HOST_CONTROL2 which leads to failures with some
SD cards in AM65x. Revert this commit.

The issue this commit was trying to fix can be implemented in a platform
specific callback instead of common sdhci code.

Cc: <stable@vger.kernel.org>
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
 drivers/mmc/host/sdhci.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 3140fe2e5dba..296d955ede59 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1882,9 +1882,7 @@ void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing)
 		ctrl_2 |= SDHCI_CTRL_UHS_SDR104;
 	else if (timing == MMC_TIMING_UHS_SDR12)
 		ctrl_2 |= SDHCI_CTRL_UHS_SDR12;
-	else if (timing == MMC_TIMING_SD_HS ||
-		 timing == MMC_TIMING_MMC_HS ||
-		 timing == MMC_TIMING_UHS_SDR25)
+	else if (timing == MMC_TIMING_UHS_SDR25)
 		ctrl_2 |= SDHCI_CTRL_UHS_SDR25;
 	else if (timing == MMC_TIMING_UHS_SDR50)
 		ctrl_2 |= SDHCI_CTRL_UHS_SDR50;
-- 
2.19.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Revert "mmc: sdhci: Fix incorrect switch to HS mode"
  2019-11-28 11:04 [PATCH] Revert "mmc: sdhci: Fix incorrect switch to HS mode" Faiz Abbas
@ 2019-11-28 11:33 ` Adrian Hunter
  2019-12-10  9:51 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Adrian Hunter @ 2019-11-28 11:33 UTC (permalink / raw)
  To: Faiz Abbas, linux-kernel, linux-mmc; +Cc: ulf.hansson, alcooperx

On 28/11/19 1:04 PM, Faiz Abbas wrote:
> This reverts commit c894e33ddc1910e14d6f2a2016f60ab613fd8b37.
> 
> This commit aims to treat SD High speed and SDR25 as the same while
> setting UHS Timings in HOST_CONTROL2 which leads to failures with some
> SD cards in AM65x. Revert this commit.
> 
> The issue this commit was trying to fix can be implemented in a platform
> specific callback instead of common sdhci code.
> 
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>

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

> ---
>  drivers/mmc/host/sdhci.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 3140fe2e5dba..296d955ede59 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1882,9 +1882,7 @@ void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing)
>  		ctrl_2 |= SDHCI_CTRL_UHS_SDR104;
>  	else if (timing == MMC_TIMING_UHS_SDR12)
>  		ctrl_2 |= SDHCI_CTRL_UHS_SDR12;
> -	else if (timing == MMC_TIMING_SD_HS ||
> -		 timing == MMC_TIMING_MMC_HS ||
> -		 timing == MMC_TIMING_UHS_SDR25)
> +	else if (timing == MMC_TIMING_UHS_SDR25)
>  		ctrl_2 |= SDHCI_CTRL_UHS_SDR25;
>  	else if (timing == MMC_TIMING_UHS_SDR50)
>  		ctrl_2 |= SDHCI_CTRL_UHS_SDR50;
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Revert "mmc: sdhci: Fix incorrect switch to HS mode"
  2019-11-28 11:04 [PATCH] Revert "mmc: sdhci: Fix incorrect switch to HS mode" Faiz Abbas
  2019-11-28 11:33 ` Adrian Hunter
@ 2019-12-10  9:51 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2019-12-10  9:51 UTC (permalink / raw)
  To: Faiz Abbas; +Cc: Linux Kernel Mailing List, linux-mmc, Adrian Hunter, Al Cooper

On Thu, 28 Nov 2019 at 12:03, Faiz Abbas <faiz_abbas@ti.com> wrote:
>
> This reverts commit c894e33ddc1910e14d6f2a2016f60ab613fd8b37.
>
> This commit aims to treat SD High speed and SDR25 as the same while
> setting UHS Timings in HOST_CONTROL2 which leads to failures with some
> SD cards in AM65x. Revert this commit.
>
> The issue this commit was trying to fix can be implemented in a platform
> specific callback instead of common sdhci code.
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>

Applied for fixes, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 3140fe2e5dba..296d955ede59 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1882,9 +1882,7 @@ void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing)
>                 ctrl_2 |= SDHCI_CTRL_UHS_SDR104;
>         else if (timing == MMC_TIMING_UHS_SDR12)
>                 ctrl_2 |= SDHCI_CTRL_UHS_SDR12;
> -       else if (timing == MMC_TIMING_SD_HS ||
> -                timing == MMC_TIMING_MMC_HS ||
> -                timing == MMC_TIMING_UHS_SDR25)
> +       else if (timing == MMC_TIMING_UHS_SDR25)
>                 ctrl_2 |= SDHCI_CTRL_UHS_SDR25;
>         else if (timing == MMC_TIMING_UHS_SDR50)
>                 ctrl_2 |= SDHCI_CTRL_UHS_SDR50;
> --
> 2.19.2
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-28 11:04 [PATCH] Revert "mmc: sdhci: Fix incorrect switch to HS mode" Faiz Abbas
2019-11-28 11:33 ` Adrian Hunter
2019-12-10  9:51 ` Ulf Hansson

Linux-mmc Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mmc/0 linux-mmc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mmc linux-mmc/ https://lore.kernel.org/linux-mmc \
		linux-mmc@vger.kernel.org
	public-inbox-index linux-mmc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-mmc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git