* [PATCH 1/7] SH: sh7785lcr board: restore big-endian operation.
@ 2012-03-09 16:38 Thomas Schwinge
2012-03-09 16:38 ` [PATCH 3/7] serial: sh-sci: " Thomas Schwinge
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Thomas Schwinge @ 2012-03-09 16:38 UTC (permalink / raw)
To: linux-sh
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
---
arch/sh/boards/board-sh7785lcr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c
index d879848..c4cb782 100644
--- a/arch/sh/boards/board-sh7785lcr.c
+++ b/arch/sh/boards/board-sh7785lcr.c
@@ -339,7 +339,7 @@ static void __init sh7785lcr_setup(char **cmdline_p)
return;
}
- writel(0x000307c2, sm501_reg + SM501_DRAM_CONTROL);
+ __raw_writel(0x000307c2, sm501_reg + SM501_DRAM_CONTROL);
iounmap(sm501_reg);
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/7] serial: sh-sci: restore big-endian operation.
2012-03-09 16:38 [PATCH 1/7] SH: sh7785lcr board: restore big-endian operation Thomas Schwinge
@ 2012-03-09 16:38 ` Thomas Schwinge
2012-03-09 17:10 ` Greg KH
2012-03-09 16:38 ` [PATCH 5/7] USB: r8a66597-hcd: " Thomas Schwinge
2012-03-09 16:38 ` [PATCH 7/7] sm501: " Thomas Schwinge
2 siblings, 1 reply; 7+ 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] 7+ messages in thread
* [PATCH 5/7] USB: r8a66597-hcd: restore big-endian operation.
2012-03-09 16:38 [PATCH 1/7] SH: sh7785lcr board: restore big-endian operation Thomas Schwinge
2012-03-09 16:38 ` [PATCH 3/7] serial: sh-sci: " Thomas Schwinge
@ 2012-03-09 16:38 ` Thomas Schwinge
2012-03-10 11:02 ` Sergei Shtylyov
2012-03-09 16:38 ` [PATCH 7/7] sm501: " Thomas Schwinge
2 siblings, 1 reply; 7+ messages in thread
From: Thomas Schwinge @ 2012-03-09 16:38 UTC (permalink / raw)
To: linux-arm-kernel
On SH, as of 37b7a97884ba64bf7d403351ac2a9476ab4f1bba we have to use the
endianess-agnostic I/O accessor functions.
This driver is also enabled in ARM's viper_defconfig as well as MIPS'
bcm47xx_defconfig and fuloong2e_defconfig -- I suppose none of these are
operating in big-endian mode, or this issue should already have been noticed
before.
The device is now recognized correctly for both litte-endian and big-endian
sh7785lcr, but I have not tested this any further, as the board is situated in
a remote data center.
Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Cc: linux-usb@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mips@linux-mips.org
---
drivers/usb/host/r8a66597.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h
index f28782d..c2ea6d1 100644
--- a/drivers/usb/host/r8a66597.h
+++ b/drivers/usb/host/r8a66597.h
@@ -170,7 +170,7 @@ static inline struct urb *r8a66597_get_urb(struct r8a66597 *r8a66597,
static inline u16 r8a66597_read(struct r8a66597 *r8a66597, unsigned long offset)
{
- return ioread16(r8a66597->reg + offset);
+ return __raw_readw(r8a66597->reg + offset);
}
static inline void r8a66597_read_fifo(struct r8a66597 *r8a66597,
@@ -198,7 +198,7 @@ static inline void r8a66597_read_fifo(struct r8a66597 *r8a66597,
static inline void r8a66597_write(struct r8a66597 *r8a66597, u16 val,
unsigned long offset)
{
- iowrite16(val, r8a66597->reg + offset);
+ __raw_writew(val, r8a66597->reg + offset);
}
static inline void r8a66597_mdfy(struct r8a66597 *r8a66597,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 7/7] sm501: restore big-endian operation.
2012-03-09 16:38 [PATCH 1/7] SH: sh7785lcr board: restore big-endian operation Thomas Schwinge
2012-03-09 16:38 ` [PATCH 3/7] serial: sh-sci: " Thomas Schwinge
2012-03-09 16:38 ` [PATCH 5/7] USB: r8a66597-hcd: " Thomas Schwinge
@ 2012-03-09 16:38 ` Thomas Schwinge
2 siblings, 0 replies; 7+ messages in thread
From: Thomas Schwinge @ 2012-03-09 16:38 UTC (permalink / raw)
Cc: Thomas Schwinge, Paul Mundt, linux-sh, Heiko Schocher,
Samuel Ortiz, linux-fbdev, devicetree-discuss, Ben Dooks,
Vincent Sanders, Randy Dunlap
On SH, as of 37b7a97884ba64bf7d403351ac2a9476ab4f1bba we have to use the
endianess-agnostic I/O accessor functions.
In commit bf5f0019046d596d613caf74722ba4994e153899, Heiko fixed this for 32-bit
PowerPC; my patch now generalizes upon that.
The device is now recognized correctly for both litte-endian and big-endian
sh7785lcr, but I have not tested this any further, as the board is situated in
a remote data center.
Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Cc: Heiko Schocher <hs@denx.de>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: linux-fbdev@vger.kernel.org
Cc: devicetree-discuss@ozlabs.org
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Vincent Sanders <vince@simtec.co.uk>
Cc: Randy Dunlap <rdunlap@xenotime.net>
---
include/linux/sm501.h | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/include/linux/sm501.h b/include/linux/sm501.h
index 02fde50..0312e3c 100644
--- a/include/linux/sm501.h
+++ b/include/linux/sm501.h
@@ -173,10 +173,5 @@ struct sm501_platdata {
unsigned int gpio_i2c_nr;
};
-#if defined(CONFIG_PPC32)
-#define smc501_readl(addr) ioread32be((addr))
-#define smc501_writel(val, addr) iowrite32be((val), (addr))
-#else
-#define smc501_readl(addr) readl(addr)
-#define smc501_writel(val, addr) writel(val, addr)
-#endif
+#define smc501_readl(addr) __raw_readl(addr)
+#define smc501_writel(val, addr) __raw_writel(val, addr)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 7+ 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: " Thomas Schwinge
@ 2012-03-09 17:10 ` Greg KH
2012-03-09 20:23 ` Thomas Schwinge
0 siblings, 1 reply; 7+ 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] 7+ 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; 7+ 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] 7+ messages in thread
* Re: [PATCH 5/7] USB: r8a66597-hcd: restore big-endian operation.
2012-03-09 16:38 ` [PATCH 5/7] USB: r8a66597-hcd: " Thomas Schwinge
@ 2012-03-10 11:02 ` Sergei Shtylyov
0 siblings, 0 replies; 7+ messages in thread
From: Sergei Shtylyov @ 2012-03-10 11:02 UTC (permalink / raw)
To: linux-arm-kernel
Hello.
On 09-03-2012 20:38, Thomas Schwinge wrote:
> On SH, as of 37b7a97884ba64bf7d403351ac2a9476ab4f1bba we have to use the
Please also specify the summary of thta commit in parens.
> endianess-agnostic I/O accessor functions.
> This driver is also enabled in ARM's viper_defconfig as well as MIPS'
> bcm47xx_defconfig and fuloong2e_defconfig -- I suppose none of these are
> operating in big-endian mode, or this issue should already have been noticed
> before.
> The device is now recognized correctly for both litte-endian and big-endian
> sh7785lcr, but I have not tested this any further, as the board is situated in
> a remote data center.
> Signed-off-by: Thomas Schwinge<thomas@codesourcery.com>
> Cc: Paul Mundt<lethal@linux-sh.org>
> Cc: linux-sh@vger.kernel.org
> Cc: linux-usb@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-mips@linux-mips.org
WBR, Sergei
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-10 11:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 16:38 [PATCH 1/7] SH: sh7785lcr board: restore big-endian operation Thomas Schwinge
2012-03-09 16:38 ` [PATCH 3/7] serial: sh-sci: " Thomas Schwinge
2012-03-09 17:10 ` 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
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).