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"
Unified · Split
| @@ -1265,7 +1265,8 @@ static int bcm2835_add_host(struct bcm2835_host *host) · 1264 unmodified lines | ||
| 1265 | 1265 | char pio_limit_string[20]; |
| 1266 | 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 | 1270 | mmc->f_min = host->max_clk / SDCDIV_MAX_CDIV; |
| 1270 | 1271 | |
| 1271 | 1272 | mmc->max_busy_timeout = ~0 / (mmc->f_max / 1000); |
| @@ -717,22 +717,6 @@ static int meson_mmc_clk_phase_tuning(struct mmc_host *mmc, u32 opcode, · 716 unmodified lines | ||
| 717 | 717 | static int meson_mmc_execute_tuning(struct mmc_host *mmc, u32 opcode) |
| 718 | 718 | { |
| 719 | 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 | 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) · 24 unmodified lines | ||
| 763 | 747 | if (!IS_ERR(mmc->supply.vmmc)) |
| 764 | 748 | mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd); |
| 765 | 749 | |
| 766 | − /* Reset phases */ | |
| 750 | + /* Reset rx phase */ | |
| 767 | 751 | clk_set_phase(host->rx_clk, 0); |
| 768 | − clk_set_phase(host->tx_clk, 270); | |
| 769 | 752 | |
| 770 | 753 | break; |
| 771 | 754 | |