Re: [PATCH RESEND 1/2] 8250: pm callback for platform uarts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Fri, Sep 24, 2010 at 7:22 PM, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
>> This patch adds a new pm field to the plat_8250_port and uart_port
>> structures and modifies the 8250 pm callback to call the platform
>> method before powering up and after powering down (if the platform
>> is capable of cutting power/clks to the block).
>
> This doesn't entirely make sense. Any hook in uart_port would be one to
> apply outside of 8250.c
>
> You also don't want platform specific stuff in the core 8250 code or to
> go removing stuff without being very careful about who or what uses it.
>
>
>> +     if ((p->port.pm) && (state != 0))       /* power down */
>
> Excess brackets

Gone,


>> +             p->port.pm(port, state, oldstate);
>>  }
>>
>
>> diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
>> index 7638dea..ce3af06 100644
>> --- a/include/linux/serial_8250.h
>> +++ b/include/linux/serial_8250.h
>> @@ -35,6 +35,8 @@ struct plat_serial8250_port {
>>       void            (*set_termios)(struct uart_port *,
>>                                      struct ktermios *new,
>>                                      struct ktermios *old);
>> +     void            (*pm)(struct uart_port *, unsigned int state,
>> +                           unsigned old);
>>  };
>
> This bit makes sense - but why can't you simply propogate it to the
> existing uart_8250_port callback when registering ?


I need a hook for platform code to reenable the UART block clocks before
serial8250_set_sleep() is invoked on resume.  The current code actually
works, it's just that on resume the bootloader disables the clocks for
all UART blocks except the debug one, which leaves all others dead.

So I added the these calls into these platform methods around
serial8250_set_sleep().

Thanks!
      Manuel Lauss
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux