Merge branch 'linus' into x86/header-guards
[firefly-linux-kernel-4.4.55.git] / include / asm-arm / arch-pxa / uncompress.h
index fe38090444e0b4c3de7828a69434588b5bb5065f..f4551269aaf2e667ed7829857df75c65ed82e6a4 100644 (file)
@@ -9,35 +9,37 @@
  * published by the Free Software Foundation.
  */
 
-#define FFUART         ((volatile unsigned long *)0x40100000)
-#define BTUART         ((volatile unsigned long *)0x40200000)
-#define STUART         ((volatile unsigned long *)0x40700000)
-#define HWUART         ((volatile unsigned long *)0x41600000)
+#include <linux/serial_reg.h>
+#include <asm/arch/pxa-regs.h>
+#include <asm/mach-types.h>
 
-#define UART           FFUART
+#define __REG(x)       ((volatile unsigned long *)x)
 
+static volatile unsigned long *UART = FFUART;
 
-static __inline__ void putc(char c)
+static inline void putc(char c)
 {
-       while (!(UART[5] & 0x20));
-       UART[0] = c;
+       if (!(UART[UART_IER] & IER_UUE))
+               return;
+       while (!(UART[UART_LSR] & LSR_TDRQ))
+               barrier();
+       UART[UART_TX] = c;
 }
 
 /*
  * This does not append a newline
  */
-static void putstr(const char *s)
+static inline void flush(void)
 {
-       while (*s) {
-               putc(*s);
-               if (*s == '\n')
-                       putc('\r');
-               s++;
-       }
+}
+
+static inline void arch_decomp_setup(void)
+{
+       if (machine_is_littleton())
+               UART = STUART;
 }
 
 /*
  * nothing to do
  */
-#define arch_decomp_setup()
 #define arch_decomp_wdog()