Merge branch 'linus' into x86/header-guards
[firefly-linux-kernel-4.4.55.git] / include / asm-arm / arch-pxa / uncompress.h
index 178aa2e073ac0aa1322ac22b46a7dd2405ba9ce5..f4551269aaf2e667ed7829857df75c65ed82e6a4 100644 (file)
@@ -9,19 +9,21 @@
  * 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)
 {
-       while (!(UART[5] & 0x20))
+       if (!(UART[UART_IER] & IER_UUE))
+               return;
+       while (!(UART[UART_LSR] & LSR_TDRQ))
                barrier();
-       UART[0] = c;
+       UART[UART_TX] = c;
 }
 
 /*
@@ -31,8 +33,13 @@ static inline void flush(void)
 {
 }
 
+static inline void arch_decomp_setup(void)
+{
+       if (machine_is_littleton())
+               UART = STUART;
+}
+
 /*
  * nothing to do
  */
-#define arch_decomp_setup()
 #define arch_decomp_wdog()