linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: tegra: Disable UHS-I modes for tegra124
@ 2016-04-13 14:35 Jon Hunter
       [not found] ` <1460558156-10407-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  2016-04-14  9:48 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Jon Hunter @ 2016-04-13 14:35 UTC (permalink / raw)
  To: Adrian Hunter, Ulf Hansson, Stephen Warren, Thierry Reding,
	Alexandre Courbot
  Cc: linux-mmc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Lucas Stach, Jon Hunter

Tegra124 has been randomly hanging during system suspend when entering
the Tegra LP1 low power state. The hang is caused by the tegra SDHCI
driver and linked to the UHS-I tuning sequence. Disabling the UHS-I
modes for Tegra124 prevents any hangs from occurring when entering
system suspend.

Unfortunately, the tuning sequence described in the public Tegra
documentation is incomplete and on inspection of the current tuning
sequence that has been implemented is also incomplete and may cause
problems. In the short-term it is safer to disable UHS-I modes for now
and fix later because it would be too large of a change to simply patch
now. Therefore, disable UHS-I modes for Tegra124.

Signed-off-by: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---

I previously brought up this issue in this thread [0], but there has
been no resolution and so I think that for v4.6 we need to disable this
for now. I also pointered out that there is a complete implementation
available in the v3.18 kernel used by chromeos products [1]. We do plan
to get better support for UHS-I modes for Tegra it is just a matter of
bandwidth at the moment :-(

[0] http://marc.info/?l=linux-tegra&m=145926947408663&w=2
[1] https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.10/drivers/mmc/host/sdhci-tegra.c

 drivers/mmc/host/sdhci-tegra.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index f8c4762bb48d..bcc0de47fe7e 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -382,14 +382,6 @@ static const struct sdhci_tegra_soc_data soc_data_tegra114 = {
 	.pdata = &sdhci_tegra114_pdata,
 };
 
-static const struct sdhci_tegra_soc_data soc_data_tegra124 = {
-	.pdata = &sdhci_tegra114_pdata,
-	.nvquirks = NVQUIRK_ENABLE_SDR50 |
-		    NVQUIRK_ENABLE_DDR50 |
-		    NVQUIRK_ENABLE_SDR104 |
-		    NVQUIRK_HAS_PADCALIB,
-};
-
 static const struct sdhci_pltfm_data sdhci_tegra210_pdata = {
 	.quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
 		  SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
@@ -407,7 +399,7 @@ static const struct sdhci_tegra_soc_data soc_data_tegra210 = {
 
 static const struct of_device_id sdhci_tegra_dt_match[] = {
 	{ .compatible = "nvidia,tegra210-sdhci", .data = &soc_data_tegra210 },
-	{ .compatible = "nvidia,tegra124-sdhci", .data = &soc_data_tegra124 },
+	{ .compatible = "nvidia,tegra124-sdhci", .data = &soc_data_tegra114 },
 	{ .compatible = "nvidia,tegra114-sdhci", .data = &soc_data_tegra114 },
 	{ .compatible = "nvidia,tegra30-sdhci", .data = &soc_data_tegra30 },
 	{ .compatible = "nvidia,tegra20-sdhci", .data = &soc_data_tegra20 },
-- 
2.1.4

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

* Re: [PATCH] mmc: tegra: Disable UHS-I modes for tegra124
       [not found] ` <1460558156-10407-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2016-04-13 15:24   ` Thierry Reding
  0 siblings, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2016-04-13 15:24 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Adrian Hunter, Ulf Hansson, Stephen Warren, Alexandre Courbot,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Lucas Stach

[-- Attachment #1: Type: text/plain, Size: 1789 bytes --]

On Wed, Apr 13, 2016 at 03:35:56PM +0100, Jon Hunter wrote:
> Tegra124 has been randomly hanging during system suspend when entering
> the Tegra LP1 low power state. The hang is caused by the tegra SDHCI
> driver and linked to the UHS-I tuning sequence. Disabling the UHS-I
> modes for Tegra124 prevents any hangs from occurring when entering
> system suspend.
> 
> Unfortunately, the tuning sequence described in the public Tegra
> documentation is incomplete and on inspection of the current tuning
> sequence that has been implemented is also incomplete and may cause
> problems. In the short-term it is safer to disable UHS-I modes for now
> and fix later because it would be too large of a change to simply patch
> now. Therefore, disable UHS-I modes for Tegra124.
> 
> Signed-off-by: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> 
> I previously brought up this issue in this thread [0], but there has
> been no resolution and so I think that for v4.6 we need to disable this
> for now. I also pointered out that there is a complete implementation
> available in the v3.18 kernel used by chromeos products [1]. We do plan
> to get better support for UHS-I modes for Tegra it is just a matter of
> bandwidth at the moment :-(
> 
> [0] http://marc.info/?l=linux-tegra&m=145926947408663&w=2
> [1] https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.10/drivers/mmc/host/sdhci-tegra.c
> 
>  drivers/mmc/host/sdhci-tegra.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)

Other than a couple of cases of inconsistent capitalization (tegra vs.
Tegra, the latter being correct, of course), this looks fine to me:

Acked-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] mmc: tegra: Disable UHS-I modes for tegra124
  2016-04-13 14:35 [PATCH] mmc: tegra: Disable UHS-I modes for tegra124 Jon Hunter
       [not found] ` <1460558156-10407-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
@ 2016-04-14  9:48 ` Ulf Hansson
  1 sibling, 0 replies; 3+ messages in thread
From: Ulf Hansson @ 2016-04-14  9:48 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Adrian Hunter, Stephen Warren, Thierry Reding, Alexandre Courbot,
	linux-mmc, linux-tegra@vger.kernel.org, Lucas Stach

On 13 April 2016 at 16:35, Jon Hunter <jonathanh@nvidia.com> wrote:
> Tegra124 has been randomly hanging during system suspend when entering
> the Tegra LP1 low power state. The hang is caused by the tegra SDHCI
> driver and linked to the UHS-I tuning sequence. Disabling the UHS-I
> modes for Tegra124 prevents any hangs from occurring when entering
> system suspend.
>
> Unfortunately, the tuning sequence described in the public Tegra
> documentation is incomplete and on inspection of the current tuning
> sequence that has been implemented is also incomplete and may cause
> problems. In the short-term it is safer to disable UHS-I modes for now
> and fix later because it would be too large of a change to simply patch
> now. Therefore, disable UHS-I modes for Tegra124.
>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>

Thanks, applied for fixes (with minor updates to the change log
according to suggestions from Stephen)!

Kind regards
Uffe

> ---
>
> I previously brought up this issue in this thread [0], but there has
> been no resolution and so I think that for v4.6 we need to disable this
> for now. I also pointered out that there is a complete implementation
> available in the v3.18 kernel used by chromeos products [1]. We do plan
> to get better support for UHS-I modes for Tegra it is just a matter of
> bandwidth at the moment :-(
>
> [0] http://marc.info/?l=linux-tegra&m=145926947408663&w=2
> [1] https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.10/drivers/mmc/host/sdhci-tegra.c
>
>  drivers/mmc/host/sdhci-tegra.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index f8c4762bb48d..bcc0de47fe7e 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -382,14 +382,6 @@ static const struct sdhci_tegra_soc_data soc_data_tegra114 = {
>         .pdata = &sdhci_tegra114_pdata,
>  };
>
> -static const struct sdhci_tegra_soc_data soc_data_tegra124 = {
> -       .pdata = &sdhci_tegra114_pdata,
> -       .nvquirks = NVQUIRK_ENABLE_SDR50 |
> -                   NVQUIRK_ENABLE_DDR50 |
> -                   NVQUIRK_ENABLE_SDR104 |
> -                   NVQUIRK_HAS_PADCALIB,
> -};
> -
>  static const struct sdhci_pltfm_data sdhci_tegra210_pdata = {
>         .quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
>                   SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
> @@ -407,7 +399,7 @@ static const struct sdhci_tegra_soc_data soc_data_tegra210 = {
>
>  static const struct of_device_id sdhci_tegra_dt_match[] = {
>         { .compatible = "nvidia,tegra210-sdhci", .data = &soc_data_tegra210 },
> -       { .compatible = "nvidia,tegra124-sdhci", .data = &soc_data_tegra124 },
> +       { .compatible = "nvidia,tegra124-sdhci", .data = &soc_data_tegra114 },
>         { .compatible = "nvidia,tegra114-sdhci", .data = &soc_data_tegra114 },
>         { .compatible = "nvidia,tegra30-sdhci", .data = &soc_data_tegra30 },
>         { .compatible = "nvidia,tegra20-sdhci", .data = &soc_data_tegra20 },
> --
> 2.1.4
>

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

end of thread, other threads:[~2016-04-14  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-13 14:35 [PATCH] mmc: tegra: Disable UHS-I modes for tegra124 Jon Hunter
     [not found] ` <1460558156-10407-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-04-13 15:24   ` Thierry Reding
2016-04-14  9:48 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).