All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Klauser <tklauser@distanz.ch>
To: Anton Vorontsov <cbouatmailru@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	Alan Cox <alan@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] altera_uart: Add support for different address strides
Date: Tue, 28 Sep 2010 17:29:29 +0200	[thread overview]
Message-ID: <20100928152929.GD3137@distanz.ch> (raw)
In-Reply-To: <20100928133537.GD8289@oksana.dev.rtsoft.ru>

On 2010-09-28 at 15:35:37 +0200, Anton Vorontsov <cbouatmailru@gmail.com> wrote:
> Some controllers implement registers with a stride, to support
> those we must implement the proper IO accessors.
> 
> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
> ---
>  drivers/serial/altera_uart.c |   59 +++++++++++++++++++++++++++---------------
>  include/linux/altera_uart.h  |    1 +
>  2 files changed, 39 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
> index 7686aaa..0a1a066 100644
> --- a/drivers/serial/altera_uart.c
> +++ b/drivers/serial/altera_uart.c
> @@ -78,13 +78,28 @@
>  struct altera_uart {
>  	struct uart_port port;
>  	struct timer_list tmr;
> +	int bus_shift;

This member is never used (only bus_shift from struct
altera_uart_platform_uart). Seems to be a leftover.

>  	unsigned int sigs;	/* Local copy of line sigs */
>  	unsigned short imr;	/* Local IMR mirror */
>  };
>  
> +static u32 altera_uart_readl(struct uart_port *port, int reg)
> +{
> +	struct altera_uart_platform_uart *platp = port->private_data;
> +
> +	return readl(port->membase + (reg << platp->bus_shift));
> +}
> +
> +static void altera_uart_writel(struct uart_port *port, u32 dat, int reg)
> +{
> +	struct altera_uart_platform_uart *platp = port->private_data;
> +
> +	writel(dat, port->membase + (reg << platp->bus_shift));
> +}

Why not make these inline?

Cheers,
  Tobias

  reply	other threads:[~2010-09-28 15:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-28 13:35 [PATCH 4/5] altera_uart: Add support for different address strides Anton Vorontsov
2010-09-28 15:29 ` Tobias Klauser [this message]
2010-10-01 13:24   ` Anton Vorontsov

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=20100928152929.GD3137@distanz.ch \
    --to=tklauser@distanz.ch \
    --cc=akpm@linux-foundation.org \
    --cc=alan@linux.intel.com \
    --cc=cbouatmailru@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@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 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.