lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f861ec6f1003241046q200bdb4ey2d2439197e63e76e@mail.gmail.com>
Date:	Wed, 24 Mar 2010 18:46:34 +0100
From:	Manuel Lauss <manuel.lauss@...glemail.com>
To:	Sergei Shtylyov <sshtylyov@...sta.com>
Cc:	linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mips@...ux-mips.org, Manuel Lauss <manuel.lauss@...il.com>
Subject: Re: [RFC PATCH 2/2] Alchemy: UART PM through serial framework.

On Wed, Mar 24, 2010 at 6:40 PM, Sergei Shtylyov <sshtylyov@...sta.com> wrote:
> Hello.
>
> Manuel Lauss wrote:
>
>> Hook up the Alchemy on-chip uarts with the platform 8250 PM callback
>> and enable/disable the uart blocks as needed.
>>
>> Tested on Au1200.
>>
>> Signed-off-by: Manuel Lauss <manuel.lauss@...il.com>
>> ---
>>  arch/mips/alchemy/common/platform.c |   17 +++++++++++++++++
>>  arch/mips/alchemy/common/power.c    |   32
>> --------------------------------
>>  2 files changed, 17 insertions(+), 32 deletions(-)
>>
>> diff --git a/arch/mips/alchemy/common/platform.c
>> b/arch/mips/alchemy/common/platform.c
>> index 2580e77..70f4abd 100644
>> --- a/arch/mips/alchemy/common/platform.c
>> +++ b/arch/mips/alchemy/common/platform.c
>> @@ -21,6 +21,22 @@
>>  #include <asm/mach-au1x00/au1100_mmc.h>
>>  #include <asm/mach-au1x00/au1xxx_eth.h>
>>  +static void alchemy_8250_pm(struct uart_port *port, unsigned int state,
>> +                           unsigned int old_state)
>> +{
>> +       if (state == 0) {               /* power on */
>> +               __raw_writel(0, port->membase + UART_MOD_CNTRL);
>> +               wmb();
>> +               __raw_writel(1, port->membase + UART_MOD_CNTRL);
>> +               wmb();
>> +               __raw_writel(3, port->membase + UART_MOD_CNTRL);
>> +               wmb();
>> +       } else if (state == 3) {        /* power off */
>> +               __raw_writel(0, port->membase + UART_MOD_CNTRL);
>> +               wmb();
>> +       }
>> +}
>
>  A *switch* statement seems more fitting here...

Well, those are the only 2 values defined anyway, but I'll change it.

Thanks!
       Manuel Lauss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ