]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
tmio_mmc: fix clock setup
authorIan Molton <ian@mnementh.co.uk>
Fri, 12 Jun 2009 20:53:05 +0000 (21:53 +0100)
committerPierre Ossman <pierre@ossman.eu>
Sat, 13 Jun 2009 20:43:00 +0000 (22:43 +0200)
commitda46a0bd42c81a473618e94871500fb792c98727
tree5c2f750e8cc1e2821bb3c62d6b53cebc3937c6b0
parent544f277bb849da0ba86cfc4203a4c9139e2cd927
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: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
drivers/mmc/host/tmio_mmc.c