]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
atmel_serial: keep clock off when it's not needed
authorDavid Brownell <dbrownell@users.sourceforge.net>
Thu, 6 Nov 2008 20:53:40 +0000 (12:53 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Nov 2008 23:41:19 +0000 (15:41 -0800)
commit06a7f058761cd232cab42d5c7da82f7255b51d5b
tree252628da8a885a2f2c0ca6488e110a7e1fb2d169
parentb225d44e27521290faca2e0f9b1a4a8c74dc510a
atmel_serial: keep clock off when it's not needed

The atmel_serial driver is mismanaging its clock by leaving it on at all
times ...  the whole point of clock management is to leave it off unless
it's actively needed, which conserves power!!

Although the kernel doesn't actually hang without my fix, it does
discard quite a lot of early console output.

The result still looks correct:

          usart        users= 1 on   35000000 Hz, for atmel_usart.0
          usart        users= 0 off  35000000 Hz, for atmel_usart.2

when using ttyS0 as serial console.

[haavard.skinnemoen@atmel.com: Make sure clock is enabled early for console]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/atmel_serial.c