public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Albin Tonnerre <albin.tonnerre@free-electrons.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, haavard.skinnemoen@atmel.com,
	avictor.za@gmail.com
Subject: Re: [PATCH v2] Add poll_get_char and poll_put_char uart_ops to atmel_serial.
Date: Wed, 11 Nov 2009 12:37:13 +0100	[thread overview]
Message-ID: <20091111113713.GC2605@pc-ran3241.res.insa> (raw)
In-Reply-To: <1252317170-9782-1-git-send-email-albin.tonnerre@free-electrons.com>

Andrew, could you please pick this up ? It got:

Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>

Regards,
Albin

On Mon, 07 Sep 2009 11:52 +0200, Albin Tonnerre wrote :
> This patch allows using KGDB over the console with the atmel_serial
> driver.
> 
> Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com>
> ---
> changes: Use register access macros instead of __raw_readl/writel
> 
>  drivers/serial/atmel_serial.c |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
> index 607d43a..c562883 100644
> --- a/drivers/serial/atmel_serial.c
> +++ b/drivers/serial/atmel_serial.c
> @@ -1213,6 +1213,24 @@ static int atmel_verify_port(struct uart_port *port, struct serial_struct *ser)
>  	return ret;
>  }
>  
> +#ifdef CONFIG_CONSOLE_POLL
> +static int atmel_poll_get_char(struct uart_port *port)
> +{
> +	while (!(UART_GET_CSR(port) & ATMEL_US_RXRDY))
> +		barrier();
> +
> +	return UART_GET_CHAR(port);
> +}
> +
> +static void atmel_poll_put_char(struct uart_port *port, unsigned char ch)
> +{
> +	while (!(UART_GET_CSR(port) & ATMEL_US_TXRDY))
> +		barrier();
> +
> +	UART_PUT_CHAR(port, ch);
> +}
> +#endif
> +
>  static struct uart_ops atmel_pops = {
>  	.tx_empty	= atmel_tx_empty,
>  	.set_mctrl	= atmel_set_mctrl,
> @@ -1232,6 +1250,10 @@ static struct uart_ops atmel_pops = {
>  	.config_port	= atmel_config_port,
>  	.verify_port	= atmel_verify_port,
>  	.pm		= atmel_serial_pm,
> +#ifdef CONFIG_CONSOLE_POLL
> +	.poll_get_char	= atmel_poll_get_char,
> +	.poll_put_char	= atmel_poll_put_char,
> +#endif
>  };
>  
>  /*
-- 
Albin Tonnerre, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com

  parent reply	other threads:[~2009-11-11 11:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30  9:05 [PATCH] Add poll_get_char and poll_put_char uart_ops to atmel_serial Albin Tonnerre
2009-07-27 14:23 ` Haavard Skinnemoen
2009-07-27 15:19   ` Albin Tonnerre
2009-07-28 16:09     ` Haavard Skinnemoen
2009-09-04 15:34       ` Albin Tonnerre
2009-09-07  6:22     ` Andrew Victor
2009-09-07  9:52       ` [PATCH v2] " Albin Tonnerre
2009-09-07 18:17         ` Andrew Victor
2009-09-08  8:30         ` Haavard Skinnemoen
2009-09-11 11:31           ` Albin Tonnerre
2009-10-10 18:57             ` Albin Tonnerre
2009-11-11 11:37         ` Albin Tonnerre [this message]
2009-11-12 22:24         ` Andrew Morton

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=20091111113713.GC2605@pc-ran3241.res.insa \
    --to=albin.tonnerre@free-electrons.com \
    --cc=akpm@linux-foundation.org \
    --cc=avictor.za@gmail.com \
    --cc=haavard.skinnemoen@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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