uncompress.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  * linux/include/asm-arm/arch-brutus/uncompress.h
  3.  *
  4.  * (C) 1999 Nicolas Pitre <nico@cam.org>
  5.  *
  6.  * Reorganised to be machine independent.
  7.  */
  8. #include "hardware.h"
  9. /*
  10.  * The following code assumes the serial port has already been
  11.  * initialized by the bootloader.  We search for the first enabled
  12.  * port in the most probable order.  If you didn't setup a port in
  13.  * your bootloader then nothing will appear (which might be desired).
  14.  */
  15. #define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
  16. static void puts( const char *s )
  17. {
  18. unsigned long serial_port;
  19. do {
  20. serial_port = _Ser3UTCR0;
  21. if (UART(UTCR3) & UTCR3_TXE) break;
  22. serial_port = _Ser1UTCR0;
  23. if (UART(UTCR3) & UTCR3_TXE) break;
  24. serial_port = _Ser2UTCR0;
  25. if (UART(UTCR3) & UTCR3_TXE) break;
  26. return;
  27. } while (0);
  28. for (; *s; s++) {
  29. /* wait for space in the UART's transmiter */
  30. while (!(UART(UTSR1) & UTSR1_TNF))
  31. barrier();
  32. /* send the character out. */
  33. UART(UTDR) = *s;
  34. /* if a LF, also do CR... */
  35. if (*s == 10) {
  36. while (!(UART(UTSR1) & UTSR1_TNF))
  37. barrier();
  38. UART(UTDR) = 13;
  39. }
  40. }
  41. }
  42. /*
  43.  * Nothing to do for these
  44.  */
  45. #define arch_decomp_setup()
  46. #define arch_decomp_wdog()