- Subject: [PATCH 7/7] sm501: restore big-endian operation.
- From: Thomas Schwinge <thomas@xxxxxxxxxxxxxxxx>
- Date: Fri, 9 Mar 2012 17:38:53 +0100
- Cc: Thomas Schwinge <thomas@xxxxxxxxxxxxxxxx>, Paul Mundt <lethal@xxxxxxxxxxxx>, <linux-sh@xxxxxxxxxxxxxxx>, Heiko Schocher <hs@xxxxxxx>, Samuel Ortiz <sameo@xxxxxxxxxxxxxxx>, <linux-fbdev@xxxxxxxxxxxxxxx>, <devicetree-discuss@xxxxxxxxxx>, Ben Dooks <ben@xxxxxxxxxxxx>, Vincent Sanders <vince@xxxxxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxx>
- In-reply-to: <1331311133-26937-1-git-send-email-thomas@codesourcery.com>
- References: <1331311133-26937-1-git-send-email-thomas@codesourcery.com>
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@xxxxxxxxxxxxxxxx>
Cc: Paul Mundt <lethal@xxxxxxxxxxxx>
Cc: linux-sh@xxxxxxxxxxxxxxx
Cc: Heiko Schocher <hs@xxxxxxx>
Cc: Samuel Ortiz <sameo@xxxxxxxxxxxxxxx>
Cc: linux-fbdev@xxxxxxxxxxxxxxx
Cc: devicetree-discuss@xxxxxxxxxx
Cc: Ben Dooks <ben@xxxxxxxxxxxx>
Cc: Vincent Sanders <vince@xxxxxxxxxxxx>
Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Video for Linux]
[Linux USB Devel]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]