Thread (6 messages) 6 messages, 3 authors, 2011-12-02

Re: sam460ex, sm501 incorrect device id with kernel >=linux-2.6.39

From: Anatolij Gustschin <agust@denx.de>
Date: 2011-12-02 15:35:22

Hi,

On Fri, 2 Dec 2011 15:48:33 +0100
acrux [off-list ref] wrote:
...
quoted hunk ↗ jump to hunk
This little hack fix my problem:
--- a/inlcude/linux/sm501.h	2011-12-02 01:11:04.000000000 +0100
+++ b/include/linux/sm501.h	2011-12-02 01:11:09.000000000 +0100
@@ -174,8 +174,8 @@
 };
 
 #if defined(CONFIG_PPC32)
-#define smc501_readl(addr)		ioread32be((addr))
-#define smc501_writel(val, addr)	iowrite32be((val), (addr))
+#define smc501_readl(addr)		ioread32((addr))
+#define smc501_writel(val, addr)	iowrite32((val), (addr))
 #else
 #define smc501_readl(addr)		readl(addr)
 #define smc501_writel(val, addr)	writel(val, addr)

but instead, why am I obliged to read it as little endian to have the correct value? 
The SM502 registers are in little endian format, you access them
over PCI interface, that is the reason. The commit introduced
a regression, I'll try to fix it this weekend. IIRC, there is
a flag to switch to big-endian register format in SM502, but
I'm not sure if it will also affect frame buffer data format.

Anatolij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help