Skip to content
Commit da46a0bd authored by Ian Molton's avatar Ian Molton Committed by Pierre Ossman
Browse files

tmio_mmc: fix clock setup



This patch fixes the clock setup in tmio_mmc.

  * Incorrect divider setting
  * Cruft written to the clock registers (seemingly harmless but Not
Good (tm))

It also eliminates some unnecessary ifs and tidies the loop syntax.

Thanks to Philipp Zabel who discovered the divider issue, commenting

   "Except for the SDCLK = HCLK (divider bypassed) case, the clock
    setting resulted in double the requested frequency.
    The smallest possible frequency (f_max/512) is configured with
    a divider setting 0x80, not 0x40."

Signed-off-by: default avatarIan Molton <ian@mnementh.co.uk>
Signed-off-by: default avatarPierre Ossman <pierre@ossman.eu>
parent 544f277b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment