]> git.baikalelectronics.ru Git - uboot.git/commit
arm: rpi: fallback to max clock rate for MMC clock
authorVincent Fazio <vfazio@xes-inc.com>
Tue, 14 Sep 2021 18:19:18 +0000 (13:19 -0500)
committerPeter Robinson <pbrobinson@gmail.com>
Fri, 24 Mar 2023 14:43:20 +0000 (14:43 +0000)
commit27cae6793e0e55fe1d9c36024990c473cb144444
tree076a90713b5faf285461e6b17ba16a9491cc429b
parentfedb8a3afc7981f3107f40b414a1db7b2aa90b7e
arm: rpi: fallback to max clock rate for MMC clock

In rpi-firmware 25e2b597ebfb2495eab4816a276758dcc6ea21f1,
the GET_CLOCK_RATE mailbox property was changed to return the last
value set by SET_CLOCK_RATE.

https://github.com/raspberrypi/firmware/issues/1619#issuecomment-917025502

Due to this change in firmware behavior, bcm2835_get_mmc_clock now
returns a clock rate of zero since we do not issue SET_CLOCK_RATE.
This results in degraded MMC performance.

SET_CLOCK_RATE fixes the clock to a specific value and disables scaling
so is not an ideal solution.

Instead, fallback to GET_MAX_CLOCK_RATE in bcm2835_get_mmc_clock if
GET_CLOCK_RATE returns zero.

Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
arch/arm/mach-bcm283x/include/mach/mbox.h
arch/arm/mach-bcm283x/msg.c