Re: [PATCH] serial: 8250_omap: Set the console genpd always on if no console suspend

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

 



On 10/23/23 09:44, Tony Lindgren wrote:
> Hi,
> 
> Adding Kevin and Vignesh too in case they have better ideas on how to
> prevent the power domain from suspending for no_console_suspend kernel
> parameter.
> 
> * Thomas Richard <thomas.richard@xxxxxxxxxxx> [231017 13:05]:
>> If the console suspend is disabled, the genpd of the console shall not
>> be powered-off during suspend.
>> Set the flag GENPD_FLAG_ALWAYS_ON to the corresponding genpd during
>> suspend, and restore the original value during the resume.
>>
>> Signed-off-by: Thomas Richard <thomas.richard@xxxxxxxxxxx>
>> ---
>>  drivers/tty/serial/8250/8250_omap.c | 33 ++++++++++++++++++++++++-----
>>  1 file changed, 28 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
>> index ca972fd37725..91a483dc460c 100644
>> --- a/drivers/tty/serial/8250/8250_omap.c
>> +++ b/drivers/tty/serial/8250/8250_omap.c
>> @@ -27,6 +27,7 @@
>>  #include <linux/pm_wakeirq.h>
>>  #include <linux/dma-mapping.h>
>>  #include <linux/sys_soc.h>
>> +#include <linux/pm_domain.h>
>>  
>>  #include "8250.h"
>>  
>> @@ -114,6 +115,12 @@
>>  /* RX FIFO occupancy indicator */
>>  #define UART_OMAP_RX_LVL		0x19
>>  
>> +/*
>> + * Copy of the genpd flags for the console.
>> + * Only used if console suspend is disabled
>> + */
>> +static unsigned int genpd_flags_console;
> 
> This should be priv->genpd_flags_console or something similar as the
> uarts in an always-on power domain may have different flags from other
> power domains.

Ok I'll move genpd_flags_console to the priv struct.

@Greg, as you already added the patch to your tty git tree, do you
prefer a new version of the patch or a fixup ?

Regards,

Thomas

> 
> Other than that I'm fine with with unless other people have better ideas
> on how to handle this.
> 
> Regards,
> 
> Tony
> 



[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