diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-17 13:08:28 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-17 13:08:28 -0500 |
| commit | fa2139ef9c43030286debe532c65c35ef4551599 (patch) | |
| tree | 4cc67c4eb0aec4289a2710edc3e6846c6d7e7b19 | |
| parent | 4b6415f9f9ca6bc8e449a73d8be1055aed63fd3a (diff) | |
| parent | 118032be389009b07ecb5a03ffe219a89d421def (diff) | |
Merge tag 'mmc-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC fixes from Ulf Hansson:
- meson-gx: Revert to earlier tuning process
- bcm2835: Don't overwrite max frequency unconditionally
* tag 'mmc-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
mmc: bcm2835: Don't overwrite max frequency unconditionally
Revert "mmc: meson-gx: include tx phase in the tuning process"
| -rw-r--r-- | drivers/mmc/host/bcm2835.c | 3 | ||||
| -rw-r--r-- | drivers/mmc/host/meson-gx-mmc.c | 19 |
2 files changed, 3 insertions, 19 deletions
diff --git a/drivers/mmc/host/bcm2835.c b/drivers/mmc/host/bcm2835.c index 229dc18f0581..768972af8b85 100644 --- a/drivers/mmc/host/bcm2835.c +++ b/drivers/mmc/host/bcm2835.c | |||
| @@ -1265,7 +1265,8 @@ static int bcm2835_add_host(struct bcm2835_host *host) | |||
| 1265 | char pio_limit_string[20]; | 1265 | char pio_limit_string[20]; |
| 1266 | int ret; | 1266 | int ret; |
| 1267 | 1267 | ||
| 1268 | mmc->f_max = host->max_clk; | 1268 | if (!mmc->f_max || mmc->f_max > host->max_clk) |
| 1269 | mmc->f_max = host->max_clk; | ||
| 1269 | mmc->f_min = host->max_clk / SDCDIV_MAX_CDIV; | 1270 | mmc->f_min = host->max_clk / SDCDIV_MAX_CDIV; |
| 1270 | 1271 | ||
| 1271 | mmc->max_busy_timeout = ~0 / (mmc->f_max / 1000); | 1272 | mmc->max_busy_timeout = ~0 / (mmc->f_max / 1000); |
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 22438ebfe4e6..4f972b879fe6 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c | |||
| @@ -717,22 +717,6 @@ static int meson_mmc_clk_phase_tuning(struct mmc_host *mmc, u32 opcode, | |||
| 717 | static int meson_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode) | 717 | static int meson_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode) |
| 718 | { | 718 | { |
| 719 | struct meson_host *host = mmc_priv(mmc); | 719 | struct meson_host *host = mmc_priv(mmc); |
| 720 | int ret; | ||
| 721 | |||
| 722 | /* | ||
| 723 | * If this is the initial tuning, try to get a sane Rx starting | ||
| 724 | * phase before doing the actual tuning. | ||
| 725 | */ | ||
| 726 | if (!mmc->doing_retune) { | ||
| 727 | ret = meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk); | ||
| 728 | |||
| 729 | if (ret) | ||
| 730 | return ret; | ||
| 731 | } | ||
| 732 | |||
| 733 | ret = meson_mmc_clk_phase_tuning(mmc, opcode, host->tx_clk); | ||
| 734 | if (ret) | ||
| 735 | return ret; | ||
| 736 | 720 | ||
| 737 | return meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk); | 721 | return meson_mmc_clk_phase_tuning(mmc, opcode, host->rx_clk); |
| 738 | } | 722 | } |
| @@ -763,9 +747,8 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
| 763 | if (!IS_ERR(mmc->supply.vmmc)) | 747 | if (!IS_ERR(mmc->supply.vmmc)) |
| 764 | mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd); | 748 | mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd); |
| 765 | 749 | ||
| 766 | /* Reset phases */ | 750 | /* Reset rx phase */ |
| 767 | clk_set_phase(host->rx_clk, 0); | 751 | clk_set_phase(host->rx_clk, 0); |
| 768 | clk_set_phase(host->tx_clk, 270); | ||
| 769 | 752 | ||
| 770 | break; | 753 | break; |
| 771 | 754 | ||
