Skip to contentSkip to conversation

arm: vt8500: Fix build warning in uncompress.h [for 3.7]

PATCH New Olof Johansson 1 participant 1 message Oct 7, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH v3 1/1 arm: vt8500: Fix build warning in uncompress.h [for 3.7]

Quoted 7 lines · Tony Prisk

This removes a build-time warning in uncompress.h due to incorrectly cast values being passed to readb/writeb.

Removed arm/io.h and readb/writeb. Read/write directly to the serial port with a volatile pointer.

Ok, applied to fixes (I had actually applied v2, so replaced it).

Btw, if you want to annotate [for 3.7] in the future, put it on the front of the patch subject, since it seems that git am doesn't strip it off when it's not at the beginning. :-)

-Olof

Quoted 31 lines
---
 arch/arm/mach-vt8500/include/mach/uncompress.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/mach-vt8500/include/mach/uncompress.h +4 -5
index bb9e2d2..e6e81fd 100644
@@ -15,15 +15,15 @@
  *
  */
 
-#define UART0_PHYS 0xd8200000
-#include <asm/io.h>
+#define UART0_PHYS     0xd8200000
+#define UART0_ADDR(x)  *(volatile unsigned char *)(UART0_PHYS + x)
 
 static void putc(const char c)
 {
-       while (readb(UART0_PHYS + 0x1c) & 0x2)
+       while (UART0_ADDR(0x1c) & 0x2)
                /* Tx busy, wait and poll */;
 
-       writeb(c, UART0_PHYS);
+       UART0_ADDR(0) = c;
 }
 
 static void flush(void)
--

1.7.9.5