Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9f1a2e9d authored by Sarthak Garg's avatar Sarthak Garg
Browse files

mmc: core: Set the correct frequency when scaling down to DDR mode



When scaling down to DDR mode we are passing 52Mhz to mmc_set_clock.
The SDHC requires internal clock frequency to be double the actual clock
that will be set for DDR mode. The controller uses the faster
clock(100/400MHz) for some part of SDHC internal h/w logic and send
the actual required clock (50/200MHz) to the card.
So in sdhci_msm_set_clock we multiply the clock by 2 for DDR modes.

Finally when we set host clk rate to 104Mhz then it scales to the nearest
equal or larger value which is 192Mhz for sdcc1_apps clk as per clk
drivers.
High frequency of 192Mhz for DDR52 mode leads to CRC errors for some
targets.

Hence Set the frequency to 50Mhz instead of 52Mhz.

Change-Id: I1d536db1dec4dfe16f41fd66362819c6db362901
Signed-off-by: default avatarSarthak Garg <sartgarg@codeaurora.org>
parent 73db1046
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment