uncompress.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * arch/arm/mach-sa1100/include/mach/uncompress.h
  4. *
  5. * (C) 1999 Nicolas Pitre <[email protected]>
  6. *
  7. * Reorganised to be machine independent.
  8. */
  9. #include "hardware.h"
  10. #define IOMEM(x) (x)
  11. /*
  12. * The following code assumes the serial port has already been
  13. * initialized by the bootloader. We search for the first enabled
  14. * port in the most probable order. If you didn't setup a port in
  15. * your bootloader then nothing will appear (which might be desired).
  16. */
  17. #define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
  18. static inline void putc(int c)
  19. {
  20. unsigned long serial_port;
  21. do {
  22. serial_port = _Ser3UTCR0;
  23. if (UART(UTCR3) & UTCR3_TXE) break;
  24. serial_port = _Ser1UTCR0;
  25. if (UART(UTCR3) & UTCR3_TXE) break;
  26. serial_port = _Ser2UTCR0;
  27. if (UART(UTCR3) & UTCR3_TXE) break;
  28. return;
  29. } while (0);
  30. /* wait for space in the UART's transmitter */
  31. while (!(UART(UTSR1) & UTSR1_TNF))
  32. barrier();
  33. /* send the character out. */
  34. UART(UTDR) = c;
  35. }
  36. static inline void flush(void)
  37. {
  38. }
  39. /*
  40. * Nothing to do for these
  41. */
  42. #define arch_decomp_setup()