1. 27 Sep, 2019 1 commit
  2. 11 Sep, 2019 2 commits
  3. 06 Aug, 2019 1 commit
    • Baolin Wang's avatar
      mmc: sdhci-sprd: Fix the incorrect soft reset operation when runtime resuming · c6303c5d
      Baolin Wang authored
      
      
      The SD host controller specification defines 3 types software reset:
      software reset for data line, software reset for command line and software
      reset for all. Software reset for all means this reset affects the entire
      Host controller except for the card detection circuit.
      
      In sdhci_runtime_resume_host() we always do a software "reset for all",
      which causes the Spreadtrum variant controller to work abnormally after
      resuming. To fix the problem, let's do a software reset for the data and
      the command part, rather than "for all".
      
      However, as sdhci_runtime_resume() is a common sdhci function and we don't
      want to change the behaviour for other variants, let's introduce a new
      in-parameter for it. This enables the caller to decide if a "reset for all"
      shall be done or not.
      Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
      Fixes: fb8bd90f
      
       ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      c6303c5d
  4. 10 Jul, 2019 1 commit
  5. 10 Jun, 2019 1 commit
  6. 30 May, 2019 1 commit
  7. 06 May, 2019 1 commit
  8. 15 Apr, 2019 1 commit
  9. 25 Feb, 2019 1 commit
  10. 17 Dec, 2018 2 commits
  11. 19 Nov, 2018 2 commits
    • Adrian Hunter's avatar
      mmc: sdhci-pci: Workaround GLK firmware failing to restore the tuning value · 5305ec6a
      Adrian Hunter authored
      
      
      GLK firmware can indicate that the tuning value will be restored after
      runtime suspend, but not actually do that. Add a workaround that detects
      such cases, and lets the driver do re-tuning instead.
      Reported-by: default avatarAnisse Astier <anisse@astier.eu>
      Tested-by: default avatarAnisse Astier <anisse@astier.eu>
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      5305ec6a
    • Rajat Jain's avatar
      mmc: sdhci-pci: Try "cd" for card-detect lookup before using NULL · cdcefe6b
      Rajat Jain authored
      Problem:
      
      The card detect IRQ does not work with modern BIOS (that want
      to use _DSD to provide the card detect GPIO to the driver).
      
      Details:
      
      The mmc core provides the mmc_gpiod_request_cd() API to let host drivers
      request the gpio descriptor for the "card detect" pin.
      This pin is specified in the ACPI for the SDHC device:
      
       * Either as a resource using _CRS. This is a method used by legacy BIOS.
         (The driver needs to tell which resource index).
      
       * Or as a named property ("cd-gpios"/"cd-gpio") in _DSD (which internally
         points to an entry in _CRS). This way, the driver can lookup using a
         string. This is what modern BIOS prefer to use.
      
      This API finally results in a call to the following code:
      
      struct gpio_desc *acpi_find_gpio(..., const char *con_id,...)
      {
      ...
         /* Lookup gpio (using "<con_id>-gpio") in the _DSD */
      ...
         if (!acpi_can_fallback_to_crs(adev, con_id))
                return ERR_PTR(-ENOENT);
      ...
         /* Falling back to _CRS is allowed, Lookup gpio in the _CRS */
      ...
      }
      
      Note that this means that if the ACPI has _DSD properties, the kernel
      will never use _CRS for the lookup (Because acpi_can_fallback_to_crs()
      will always be false for any device hat has _DSD entries).
      
      The SDHCI driver is thus currently broken on a modern BIOS, even if
      BIOS provides both _CRS (for index based lookup) and _DSD entries (for
      string based lookup). Ironically, none of these will be used for the
      lookup currently because:
      
      * Since the con_id is NULL, acpi_find_gpio() does not find a matching
        entry in DSDT. (The _DSDT entry has the property name = "cd-gpios")
      
      * Because ACPI contains DSDT entries, thus acpi_can_fallback_to_crs()
        returns false (because device properties have been populated from
        _DSD), thus the _CRS is never used for the lookup.
      
      Fix:
      
      Try "cd" for lookup in the _DSD before falling back to using NULL so
      as to try looking up in the _CRS.
      
      I've tested this patch successfully with both Legacy BIOS (that
      provide only _CRS method) as well as modern BIOS (that provide both
      _CRS and _DSD). Also the use of "cd" appears to be fairly consistent
      across other users of this API (other MMC host controller drivers).
      
      Link: https://lkml.org/lkml/2018/9/25/1113
      
      Signed-off-by: default avatarRajat Jain <rajatja@google.com>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Fixes: f10e4bf6
      
       ("gpio: acpi: Even more tighten up ACPI GPIO lookups")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      cdcefe6b
  12. 16 Jul, 2018 2 commits
  13. 02 May, 2018 2 commits
  14. 11 Apr, 2018 1 commit
    • Daniel Kurtz's avatar
      mmc: sdhci-pci: Only do AMD tuning for HS200 · 300ad899
      Daniel Kurtz authored
      Commit c31165d7
      
       ("mmc: sdhci-pci: Add support for HS200 tuning mode
      on AMD, eMMC-4.5.1") added a HS200 tuning method for use with AMD SDHCI
      controllers.  As described in the commit subject, this tuning is specific
      for HS200.  However, as implemented, this method is used for all host
      timings, because platform_execute_tuning, if it exists, is called
      unconditionally by sdhci_execute_tuning().  This breaks tuning when using
      the AMD controller with, for example, a DDR50 SD card.
      
      Instead, we can implement an amd execute_tuning wrapper callback, and
      then conditionally do the HS200 specific tuning for HS200, and otherwise
      call back to the standard sdhci_execute_tuning().
      Signed-off-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
      Acked-by: default avatarShyam Sundar S K <Shyam-sundar.S-k@amd.com>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Fixes: c31165d7
      
       ("mmc: sdhci-pci: Add support for HS200 tuning mode on AMD, eMMC-4.5.1")
      Cc: stable@vger.kernel.org # v4.11+
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      300ad899
  15. 05 Mar, 2018 2 commits
  16. 27 Feb, 2018 1 commit
  17. 17 Jan, 2018 2 commits
  18. 11 Jan, 2018 1 commit
  19. 04 Jan, 2018 1 commit
  20. 11 Dec, 2017 1 commit
  21. 30 Oct, 2017 2 commits
  22. 10 Oct, 2017 1 commit
  23. 22 Sep, 2017 1 commit
  24. 30 Aug, 2017 2 commits
  25. 20 Jun, 2017 5 commits
  26. 07 Jun, 2017 1 commit
  27. 24 Apr, 2017 1 commit