uncompress.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Serial port stubs for kernel decompress status messages
  3. *
  4. * Author: Anant Gole
  5. * (C) Copyright (C) 2006, Texas Instruments, Inc
  6. *
  7. * This file is licensed under the terms of the GNU General Public License
  8. * version 2. This program is licensed "as is" without any warranty of any
  9. * kind, whether express or implied.
  10. */
  11. #include <linux/types.h>
  12. #include <linux/serial_reg.h>
  13. #include <mach/serial.h>
  14. #include <asm/mach-types.h>
  15. extern unsigned int __machine_arch_type;
  16. static u32 *uart;
  17. static u32 *get_uart_base(void)
  18. {
  19. if (__machine_arch_type == MACH_TYPE_DAVINCI_DA8XX_EVM)
  20. return (u32 *)DA8XX_UART2_BASE;
  21. else
  22. return (u32 *)DAVINCI_UART0_BASE;
  23. }
  24. /* PORT_16C550A, in polled non-fifo mode */
  25. static void putc(char c)
  26. {
  27. if (!uart)
  28. uart = get_uart_base();
  29. while (!(uart[UART_LSR] & UART_LSR_THRE))
  30. barrier();
  31. uart[UART_TX] = c;
  32. }
  33. static inline void flush(void)
  34. {
  35. if (!uart)
  36. uart = get_uart_base();
  37. while (!(uart[UART_LSR] & UART_LSR_THRE))
  38. barrier();
  39. }
  40. #define arch_decomp_setup()
  41. #define arch_decomp_wdog()