Thread (33 messages) 33 messages, 5 authors, 2017-05-31

[V2, 2/6] tty: serial: lpuart: add little endian 32 bit register support

From: Andy Shevchenko <hidden>
Date: 2017-05-17 09:53:49
Also in: linux-serial, lkml

On Tue, May 16, 2017 at 2:15 PM, Nikita Yushchenko
[off-list ref] wrote:
quoted
 static u32 lpuart32_read(void __iomem *addr)
 {
-     return ioread32be(addr);
+     return lpuart_is_be ? ioread32be(addr) : readl(addr);
 }

 static void lpuart32_write(u32 val, void __iomem *addr)
 {
-     iowrite32be(val, addr);
+     if (lpuart_is_be)
+             iowrite32be(val, addr);
+     else
+             writel(val, addr);
 }
What if this is ever executed on big endian system?
Above is apparently about bus side of communication and it looks like
it needs to be CPU side. Is this what you are trying to discuss?


-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help