uncompress.h 1000 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * arch/arm/mach-mmp/include/mach/uncompress.h
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <linux/serial_reg.h>
  9. #include <mach/addr-map.h>
  10. #include <asm/mach-types.h>
  11. #define UART1_BASE (APB_PHYS_BASE + 0x36000)
  12. #define UART2_BASE (APB_PHYS_BASE + 0x17000)
  13. #define UART3_BASE (APB_PHYS_BASE + 0x18000)
  14. static volatile unsigned long *UART;
  15. static inline void putc(char c)
  16. {
  17. /* UART enabled? */
  18. if (!(UART[UART_IER] & UART_IER_UUE))
  19. return;
  20. while (!(UART[UART_LSR] & UART_LSR_THRE))
  21. barrier();
  22. UART[UART_TX] = c;
  23. }
  24. /*
  25. * This does not append a newline
  26. */
  27. static inline void flush(void)
  28. {
  29. }
  30. static inline void arch_decomp_setup(void)
  31. {
  32. /* default to UART2 */
  33. UART = (unsigned long *)UART2_BASE;
  34. if (machine_is_avengers_lite())
  35. UART = (unsigned long *)UART3_BASE;
  36. }
  37. /*
  38. * nothing to do
  39. */
  40. #define arch_decomp_wdog()