lkml.org 
[lkml]   [2018]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.16 300/410] mmc: sdhci: export sdhci_execute_tuning()
    3.16.57-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Masahiro Yamada <yamada.masahiro@socionext.com>

    commit 85a882c2e91d3655927ecdc1db823d1420a65b8f upstream.

    Some SDHCI-compat controllers support not only SD, but also eMMC,
    but they use different commands for tuning: CMD19 for SD, CMD21 for
    eMMC.

    Due to the difference of the underlying mechanism, some controllers
    (at least, the Cadence IP is the case) provide their own registers
    for the eMMC tuning.

    This commit will be useful when we want to override .execute_tuning
    callback (for eMMC HS200 tuning), but still let it fall back to
    sdhci_execute_tuning() for SD timing.

    Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
    Acked-by: Adrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    [bwh: Backported to 3.16: Delete an additional prototype]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    --- a/drivers/mmc/host/sdhci.c
    +++ b/drivers/mmc/host/sdhci.c
    @@ -52,7 +52,6 @@ static unsigned int debug_quirks2;
    static void sdhci_finish_data(struct sdhci_host *);

    static void sdhci_finish_command(struct sdhci_host *);
    -static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode);
    static void sdhci_tuning_timer(unsigned long data);
    static void sdhci_enable_preset_value(struct sdhci_host *host, bool enable);

    @@ -1840,7 +1839,7 @@ static int sdhci_card_busy(struct mmc_ho
    return !(present_state & SDHCI_DATA_LVL_MASK);
    }

    -static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
    +int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
    {
    struct sdhci_host *host = mmc_priv(mmc);
    u16 ctrl;
    @@ -2054,6 +2053,7 @@ out:

    return err;
    }
    +EXPORT_SYMBOL_GPL(sdhci_execute_tuning);


    static void sdhci_enable_preset_value(struct sdhci_host *host, bool enable)
    --- a/drivers/mmc/host/sdhci.h
    +++ b/drivers/mmc/host/sdhci.h
    @@ -402,6 +402,7 @@ void sdhci_set_clock(struct sdhci_host *
    void sdhci_set_bus_width(struct sdhci_host *host, int width);
    void sdhci_reset(struct sdhci_host *host, u8 mask);
    void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing);
    +int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode);

    #ifdef CONFIG_PM
    extern int sdhci_suspend_host(struct sdhci_host *host);
    \
     
     \ /
      Last update: 2018-06-07 16:19    [W:4.052 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site