Files
u-boot/drivers
Vasily Khoruzhick 7786710adb rockchip: sdhci: rk3568: fix clock setting logic
mmc->tran_speed is max clock, but currently rk3568_sdhci_set_ios_post
uses it if its != 0, regardless of mmc->clock value, and it breaks
eMMC controller.

Without this patch 'mmc dev 0; mmc dev 1; mmc dev 0' is enough for
breaking eMMC, since first initialization sets mmc->mmc_tran speed
to non-zero value (26MHz in my case), and on subsequent re-init when
mmc layer asks for 400KHz it sets 26MHz instead.

Fix it by using MAX(mmc->tran_speed, mmc->clock)

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2023-04-21 15:16:00 +08:00
..
2023-03-03 09:49:02 -05:00
2023-02-10 07:41:39 -05:00
2023-04-11 06:51:56 +02:00
2023-04-16 12:30:46 +02:00
2023-03-02 17:45:58 -05:00
2023-01-20 12:27:24 -05:00
2023-04-03 16:45:41 -04:00
2023-04-01 10:11:50 +02:00
2023-01-24 13:55:05 +01:00
2023-04-03 16:45:41 -04:00
2023-03-27 15:19:57 -04:00
2023-02-10 07:41:41 -05:00
2023-03-02 17:45:58 -05:00