All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mips@linux-mips.org, Manuel Lauss <manuel.lauss@gmail.com>
Subject: Re: [RFC PATCH 2/2] Alchemy: UART PM through serial framework.
Date: Wed, 24 Mar 2010 20:40:17 +0300	[thread overview]
Message-ID: <4BAA4E81.8070405@mvista.com> (raw)
In-Reply-To: <1269450986-3714-3-git-send-email-manuel.lauss@gmail.com>

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@gmail.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...

WBR, Sergei

  reply	other threads:[~2010-03-24 17:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 17:16 [RFC PATCH 0/2] serial 8250 platform PM hooks Manuel Lauss
2010-03-24 17:16 ` [RFC PATCH 1/2] 8250: allow platform uarts to install PM callback Manuel Lauss
2010-03-24 17:16 ` [RFC PATCH 2/2] Alchemy: UART PM through serial framework Manuel Lauss
2010-03-24 17:40   ` Sergei Shtylyov [this message]
2010-03-24 17:46     ` Manuel Lauss
2010-03-24 17:46       ` Manuel Lauss
2010-04-14 17:39 ` [RFC PATCH 0/2] serial 8250 platform PM hooks Manuel Lauss
2010-04-14 17:39   ` Manuel Lauss
  -- strict thread matches above, loose matches on Subject: below --
2010-02-23 18:22 Manuel Lauss
2010-02-23 18:22 ` [RFC PATCH 1/2] 8250: allow platform uarts to install PM callback Manuel Lauss
2010-02-23 18:22   ` [RFC PATCH 2/2] Alchemy: UART PM through serial framework Manuel Lauss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BAA4E81.8070405@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=manuel.lauss@gmail.com \
    --cc=manuel.lauss@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.