uncompress.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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_DA830_EVM ||
  20. __machine_arch_type == MACH_TYPE_DAVINCI_DA850_EVM)
  21. return (u32 *)DA8XX_UART2_BASE;
  22. else
  23. return (u32 *)DAVINCI_UART0_BASE;
  24. }
  25. /* PORT_16C550A, in polled non-fifo mode */
  26. static void putc(char c)
  27. {
  28. if (!uart)
  29. uart = get_uart_base();
  30. while (!(uart[UART_LSR] & UART_LSR_THRE))
  31. barrier();
  32. uart[UART_TX] = c;
  33. }
  34. static inline void flush(void)
  35. {
  36. if (!uart)
  37. uart = get_uart_base();
  38. while (!(uart[UART_LSR] & UART_LSR_THRE))
  39. barrier();
  40. }
  41. #define arch_decomp_setup()
  42. #define arch_decomp_wdog()