From: Stefan Roese Date: Mon, 9 Nov 2020 10:00:57 +0100 Subject: [PATCH v3 21/23] mmc: mtk-sd: assign plat->cfg.f_max with a correct value In-Reply-To: <58ca12e09b5434fd152687fe53706ff0948a2304.1604907361.git.weijie.gao@mediatek.com> References: <58ca12e09b5434fd152687fe53706ff0948a2304.1604907361.git.weijie.gao@mediatek.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09.11.20 09:28, Weijie Gao wrote: > Currently this driver does not set the value of plat->cfg.f_max, which > results in that MMC framework will always run at the lowest frequency. > > This patch sets plat->cfg.f_max to the maximum allowed frequency, which is > half of the source clock frequency. > > Signed-off-by: Weijie Gao Reviewed-by: Stefan Roese Thanks, Stefan > --- > v3 changes: new > --- > drivers/mmc/mtk-sd.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c > index f4ff8822f2..5e24943212 100644 > --- a/drivers/mmc/mtk-sd.c > +++ b/drivers/mmc/mtk-sd.c > @@ -1639,6 +1639,8 @@ static int msdc_drv_probe(struct udevice *dev) > else > cfg->f_min = host->src_clk_freq / (4 * 4095); > > + cfg->f_max = host->src_clk_freq / 2; > + > cfg->b_max = 1024; > cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34; > > Viele Gr??e, Stefan -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de