• Adrian Hunter's avatar
    mmc: sdhci: Remove SDHCI_SDR104_NEEDS_TUNING · 4228b213
    Adrian Hunter authored
    SDHCI_SDR104_NEEDS_TUNING was originally named SDHCI_HS200_NEEDS_TUNING
    and was added in commit 069c9f14 ("mmc: host: Adds support for eMMC
    4.5 HS200 mode").
    
    That commit conflated SDHCI_SDR50_NEEDS_TUNING and SDHCI_HS200_NEEDS_TUNING
    due to what appears to be misplaced parentheses.
    
    Commit 156e14b1 ("mmc: sdhci: fix caps2 for HS200") made HS200
    configuration equivalent to SDR104 configuration, renaming
    SDHCI_HS200_NEEDS_TUNING to SDHCI_SDR104_NEEDS_TUNING despite tuning for
    HS200 now being non-optional.
    
    The mix-up with SDHCI_SDR50_NEEDS_TUNING remained and became more obvious
    after commit 4b6f37d3 ("mmc: sdhci: clean up sdhci_execute_tuning()
    decision") where the author noted the patch was "reflecting what the
    original code was doing, it shows that it may not be what the author
    actually intended."
    
    The way the code is currently written, SDHCI_SDR104_NEEDS_TUNING
    causes tuning to be done always for SDR50 mode if SDR104 mode is
    also supported by the host controller.  That makes no sense because
    we already have capabilities bit SDHCI_USE_SDR50_TUNING and
    corresponding flag SDHCI_SDR50_NEEDS_TUNING for that purpose.
    
    Given the dubious origins of SDHCI_SDR104_NEEDS_TUNING, it seems
    reasonable to remove it.  The benefit being SDR50 mode will now not
    un-nessessarily do tuning.
    Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    4228b213
sdhci.h 22.3 KB