linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
	Govindraj R <govindraj.raja@ti.com>,
	Tero Kristo <tero.kristo@nokia.com>
Subject: Re: [PM][PATCH 1/4] OMAP3: Serial: Add context save and restore for mcr
Date: Wed, 05 May 2010 16:49:38 -0700	[thread overview]
Message-ID: <87pr19ykml.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1270749249-14041-2-git-send-email-nm@ti.com> (Nishanth Menon's message of "Thu\,  8 Apr 2010 12\:54\:06 -0500")

Nishanth Menon <nm@ti.com> writes:

> From: Govindraj R <govindraj.raja@ti.com>
>
> Ref:
> http://git.omapzoom.org/?p=kernel/omap.git;a=commitdiff;h=c74952c3077e4b19e649b5b48c785c01f73ab9d4
>
> Adds context save/restore for mcr register as state of mcr register
> is lost after core off.
>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Tero Kristo <tero.kristo@nokia.com>
>
> Signed-off-by: Govindraj R <govindraj.raja@ti.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>

OK, adding to pm-next, and queing (hopefully) for 2.6.35.

Kevin

> ---
> Note: Original Patch was done for android kernel, was ported and sanity
> tested to l-o pm.  A quick check did not reveal any mcr access in
> arch/arm/mach-omap2/serial.c though drivers/serial/8250.c seems to
> hit on it a lot, hence posting.
>
>  arch/arm/mach-omap2/serial.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index b731556..86d3b47 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -78,6 +78,7 @@ struct omap_uart_state {
>  	u16 sysc;
>  	u16 scr;
>  	u16 wer;
> +	u16 mcr;
>  #endif
>  };
>  
> @@ -201,6 +202,9 @@ static void omap_uart_save_context(struct omap_uart_state *uart)
>  	uart->sysc = serial_read_reg(p, UART_OMAP_SYSC);
>  	uart->scr = serial_read_reg(p, UART_OMAP_SCR);
>  	uart->wer = serial_read_reg(p, UART_OMAP_WER);
> +	serial_write_reg(p, UART_LCR, 0x80);
> +	uart->mcr = serial_read_reg(p, UART_MCR);
> +	serial_write_reg(p, UART_LCR, lcr);
>  
>  	uart->context_valid = 1;
>  }
> @@ -229,6 +233,8 @@ static void omap_uart_restore_context(struct omap_uart_state *uart)
>  	serial_write_reg(p, UART_DLM, uart->dlh);
>  	serial_write_reg(p, UART_LCR, 0x0); /* Operational mode */
>  	serial_write_reg(p, UART_IER, uart->ier);
> +	serial_write_reg(p, UART_LCR, 0x80);
> +	serial_write_reg(p, UART_MCR, uart->mcr);
>  	serial_write_reg(p, UART_FCR, 0xA1);
>  	serial_write_reg(p, UART_LCR, 0xBF); /* Config B mode */
>  	serial_write_reg(p, UART_EFR, efr);
> -- 
> 1.6.3.3

      parent reply	other threads:[~2010-05-05 23:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 17:54 [PM][PATCH 0/4] OMAP3: Serial Misc fixes Nishanth Menon
2010-04-08 17:54 ` [PM][PATCH 1/4] OMAP3: Serial: Add context save and restore for mcr Nishanth Menon
2010-04-08 17:54   ` [PM][PATCH 2/4] OMAP3: Serial: Errata i202: fix for MDR1 access Nishanth Menon
2010-04-08 17:54     ` [PM][PATCH 3/4] OMAP3: Serial: remove initialization sparse warnings Nishanth Menon
2010-04-08 17:54       ` [PM][PATCH 4/4] OMAP3: Serial: kill dev_attr_sleep_timeout sparse warn Nishanth Menon
2010-05-05 23:57         ` Kevin Hilman
2010-04-09 17:00     ` [PM][PATCH 2/4] OMAP3: Serial: Errata i202: fix for MDR1 access Nishanth Menon
2010-04-09 17:06       ` Kattungal, Deepak
2010-04-09 17:21         ` Nishanth Menon
2010-05-05 23:49   ` Kevin Hilman [this message]

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=87pr19ykml.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=govindraj.raja@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=tero.kristo@nokia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).