[PATCH] pl011: added clock management feature

Vitaly Wool vitalywool at gmail.com
Fri Dec 3 06:47:14 EST 2010


On Tue, Nov 9, 2010 at 11:40 PM, Greg KH <greg at kroah.com> wrote:
> On Tue, Nov 09, 2010 at 04:30:37PM +0100, Linus Walleij wrote:
>> From: Grzegorz Sygieda <grzegorz.sygieda at tieto.com>
>>
>> This patch allows to control the pl011 clock using set_termios
>> callback. Any positive baudrate passed enables clock, otherwise
>> disables. This saves a lot of power on submicron designs since
>> we can clock off and disable unused UARTs.
>
> That's nice, but it seems like an overload of what people traditionally
> think of when it comes to baud rates.  Why not just power down ports
> that are not open instead?

I like the idea as well and this is definitely gonna help conserving
the power for Bluetooth UARTs.

But using baud rate 0 is something I don't like. Why don't you stop
the clocks if RTS is cleared? This would have allowed the line
discipline driver to implicitly control the UART clock and there will
be no risk of losing data, as well as no non-standard behavior
involved. In fact, you'll be transparent to the upper layers in this
case.

~Vitaly



More information about the linux-arm-kernel mailing list