linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>
Cc: "gregkh@suse.de" <gregkh@suse.de>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] amba-pl011: do not disable RTS during shutdown
Date: Wed, 18 Jan 2012 10:10:13 +0000	[thread overview]
Message-ID: <20120118101013.GF22472@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20120118094505.GA889@bnru02.bnr.st.com>

On Wed, Jan 18, 2012 at 03:15:06PM +0530, Shreshtha Kumar SAHU wrote:
> data type of old_cr was bool in patchv2, corrected in this patchv3

This is much better, just a small little niggle with it.

> @@ -1411,7 +1412,9 @@ static int pl011_startup(struct uart_port *port)
>  	while (readw(uap->port.membase + UART01x_FR) & UART01x_FR_BUSY)
>  		barrier();
>  
> -	cr = UART01x_CR_UARTEN | UART011_CR_RXE | UART011_CR_TXE;
> +	/* restore RTS and DTR */
> +	cr = (uap->old_cr & (UART011_CR_RTS | UART011_CR_DTR));

You don't need the outer set of parens around this (additional
unnecessary parens can cause confusion when trying to read code.)

> @@ -1488,9 +1492,16 @@ static void pl011_shutdown(struct uart_port *port)
>  
>  	/*
>  	 * disable the port
> +	 * disable the port. It should not disable RTS and DTR.
> +	 * Also RTS and DTR state should be preserved to restore
> +	 * it during startup().
>  	 */
>  	uap->autorts = false;
> -	writew(UART01x_CR_UARTEN | UART011_CR_TXE, uap->port.membase + UART011_CR);
> +	cr = readw(uap->port.membase + UART011_CR);
> +	uap->old_cr = cr;
> +	cr &= (UART011_CR_RTS | UART011_CR_DTR);

Ditto.

Once those are fixed:

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2012-01-18 10:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 10:29 [PATCH] amba-pl011: do not disable RTS during shutdown Shreshtha Kumar SAHU
2012-01-17 15:41 ` Greg KH
2012-01-17 18:40 ` Russell King
2012-01-18  9:36   ` Shreshtha Kumar SAHU
2012-01-18  9:45   ` Shreshtha Kumar SAHU
2012-01-18 10:10     ` Russell King [this message]
2012-01-18 10:23       ` Shreshtha Kumar SAHU

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=20120118101013.GF22472@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=shreshthakumar.sahu@stericsson.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).