linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
Cc: Thomas Schwinge <thomas@codesourcery.com>,
	Paul Mundt <lethal@linux-sh.org>,
	linux-sh@vger.kernel.org, linux-serial@vger.kernel.org
Subject: [PATCH 3/7] serial: sh-sci: restore big-endian operation.
Date: Fri, 09 Mar 2012 16:38:49 +0000	[thread overview]
Message-ID: <1331311133-26937-3-git-send-email-thomas@codesourcery.com> (raw)
In-Reply-To: <1331311133-26937-1-git-send-email-thomas@codesourcery.com>

As of 37b7a97884ba64bf7d403351ac2a9476ab4f1bba we have to use the
endianess-agnostic I/O accessor functions.

Tested on both litte-endian and big-endian sh7785lcr.

Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Cc: linux-serial@vger.kernel.org
---
 drivers/tty/serial/sh-sci.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index aff9d61..0b45258 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -332,9 +332,9 @@ static unsigned int sci_serial_in(struct uart_port *p, int offset)
 	struct plat_sci_reg *reg = sci_getreg(p, offset);
 
 	if (reg->size = 8)
-		return ioread8(p->membase + (reg->offset << p->regshift));
+		return __raw_readb(p->membase + (reg->offset << p->regshift));
 	else if (reg->size = 16)
-		return ioread16(p->membase + (reg->offset << p->regshift));
+		return __raw_readw(p->membase + (reg->offset << p->regshift));
 	else
 		WARN(1, "Invalid register access\n");
 
@@ -346,9 +346,9 @@ static void sci_serial_out(struct uart_port *p, int offset, int value)
 	struct plat_sci_reg *reg = sci_getreg(p, offset);
 
 	if (reg->size = 8)
-		iowrite8(value, p->membase + (reg->offset << p->regshift));
+		__raw_writeb(value, p->membase + (reg->offset << p->regshift));
 	else if (reg->size = 16)
-		iowrite16(value, p->membase + (reg->offset << p->regshift));
+		__raw_writew(value, p->membase + (reg->offset << p->regshift));
 	else
 		WARN(1, "Invalid register access\n");
 }
-- 
1.7.4.1


  reply	other threads:[~2012-03-09 16:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09 16:38 [PATCH 1/7] SH: sh7785lcr board: restore big-endian operation Thomas Schwinge
2012-03-09 16:38 ` Thomas Schwinge [this message]
2012-03-09 17:10   ` [PATCH 3/7] serial: sh-sci: " Greg KH
2012-03-09 20:23     ` Thomas Schwinge
2012-03-09 16:38 ` [PATCH 5/7] USB: r8a66597-hcd: " Thomas Schwinge
2012-03-10 11:02   ` Sergei Shtylyov
2012-03-09 16:38 ` [PATCH 7/7] sm501: " Thomas Schwinge

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=1331311133-26937-3-git-send-email-thomas@codesourcery.com \
    --to=thomas@codesourcery.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-sh@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;
as well as URLs for NNTP newsgroup(s).