* [PATCH 3/7] serial: sh-sci: restore big-endian operation. [not found] <1331311133-26937-1-git-send-email-thomas@codesourcery.com> @ 2012-03-09 16:38 ` Thomas Schwinge 2012-03-09 17:10 ` Greg KH 0 siblings, 1 reply; 3+ messages in thread From: Thomas Schwinge @ 2012-03-09 16:38 UTC (permalink / raw) Cc: Thomas Schwinge, Paul Mundt, linux-sh, linux-serial 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 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 3/7] serial: sh-sci: restore big-endian operation. 2012-03-09 16:38 ` [PATCH 3/7] serial: sh-sci: restore big-endian operation Thomas Schwinge @ 2012-03-09 17:10 ` Greg KH 2012-03-09 20:23 ` Thomas Schwinge 0 siblings, 1 reply; 3+ messages in thread From: Greg KH @ 2012-03-09 17:10 UTC (permalink / raw) To: Thomas Schwinge; +Cc: Paul Mundt, linux-sh, linux-serial On Fri, Mar 09, 2012 at 05:38:49PM +0100, Thomas Schwinge wrote: > As of 37b7a97884ba64bf7d403351ac2a9476ab4f1bba we have to use the > endianess-agnostic I/O accessor functions. Please always put a human readable description of what the git id is, so that we have a chance to understand what is going on. Are these patches supposed to be going through the sh tree, or the serial tree to Linus? And watch your To: line, it seemed to be munged :( confused, greg k-h ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/7] serial: sh-sci: restore big-endian operation. 2012-03-09 17:10 ` Greg KH @ 2012-03-09 20:23 ` Thomas Schwinge 0 siblings, 0 replies; 3+ messages in thread From: Thomas Schwinge @ 2012-03-09 20:23 UTC (permalink / raw) To: Greg KH; +Cc: Paul Mundt, linux-sh, linux-serial [-- Attachment #1: Type: text/plain, Size: 2160 bytes --] Hi Greg! First -- as you probably have guessed already -- I'm not (not yet?) :-) too familiar with the Linux kernel patch submission process. I have spent quite some time reading the included documentation, but apparently missed some details... :-) On Fri, 9 Mar 2012 09:10:07 -0800, Greg KH <gregkh@linuxfoundation.org> wrote: > On Fri, Mar 09, 2012 at 05:38:49PM +0100, Thomas Schwinge wrote: > > As of 37b7a97884ba64bf7d403351ac2a9476ab4f1bba we have to use the > > endianess-agnostic I/O accessor functions. > > Please always put a human readable description of what the git id is, so > that we have a chance to understand what is going on. Sorry. ``sh: machvec IO death.'' -- well, the essential part what I'm fixing here is that before this commit readw (and friends, such as ioread16) didn't do any endianess modification of the data, but directly invoked __raw_readw, whereas after 37b7a978 they do such modification by means of filtering through le16_to_cpu (in the readw/ioread16 case). This is where things break for big endian (but not little endian, where this is a no-op). > Are these patches supposed to be going through the sh tree, or the > serial tree to Linus? I'm assuming that Paul Mundt will handle the whole lot in an SH tree. Paul, by the way, if that's more convenient I can also publish my Git tree. > And watch your To: line, it seemed to be munged :( Yes. By means of scripts/get_maintainer.pl (and some manual adjustments) I created the Cc: lists that are part of my commits' log messages. Then, I just had git send-email send that out, without explicitly specifying a primary recipient (To: line). I assume I should have put Paul there? On this patch, the linux-serial was Cced (as suggested by scripts/get_maintainer.pl), as it touches a TTY/serial driver, and I wanted to make sure to give you an opportunity to review that the patch doesn't introduce any breakage on non-SH architectures, for example. (Despite its indicative name, sh-sci also seems to be used on some ARM boards.) > confused, Sorry; will hopefully improve. :-) Grüße, Thomas [-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-09 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1331311133-26937-1-git-send-email-thomas@codesourcery.com>
2012-03-09 16:38 ` [PATCH 3/7] serial: sh-sci: restore big-endian operation Thomas Schwinge
2012-03-09 17:10 ` Greg KH
2012-03-09 20:23 ` Thomas Schwinge
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox