uncompress.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * arch/arm/mach-sa1100/include/mach/uncompress.h
  3. *
  4. * (C) 1999 Nicolas Pitre <nico@fluxnic.net>
  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 putc(int c)
  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. /* wait for space in the UART's transmitter */
  29. while (!(UART(UTSR1) & UTSR1_TNF))
  30. barrier();
  31. /* send the character out. */
  32. UART(UTDR) = c;
  33. }
  34. static inline void flush(void)
  35. {
  36. }
  37. /*
  38. * Nothing to do for these
  39. */
  40. #define arch_decomp_setup()
  41. #define arch_decomp_wdog()