uncompress.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * linux/include/asm-arm/arch-aaec2000/uncompress.h
  3. *
  4. * Copyright (c) 2005 Nicolas Bellido Y Ortega
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASM_ARCH_UNCOMPRESS_H
  11. #define __ASM_ARCH_UNCOMPRESS_H
  12. #include "hardware.h"
  13. #define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
  14. static void putstr( const char *s )
  15. {
  16. unsigned long serial_port;
  17. do {
  18. serial_port = _UART3_BASE;
  19. if (UART(UART_CR) & UART_CR_EN) break;
  20. serial_port = _UART1_BASE;
  21. if (UART(UART_CR) & UART_CR_EN) break;
  22. serial_port = _UART2_BASE;
  23. if (UART(UART_CR) & UART_CR_EN) break;
  24. return;
  25. } while (0);
  26. for (; *s; s++) {
  27. /* wait for space in the UART's transmitter */
  28. while ((UART(UART_SR) & UART_SR_TxFF));
  29. /* send the character out. */
  30. UART(UART_DR) = *s;
  31. /* if a LF, also do CR... */
  32. if (*s == 10) {
  33. while ((UART(UART_SR) & UART_SR_TxFF));
  34. UART(UART_DR) = 13;
  35. }
  36. }
  37. }
  38. #define arch_decomp_setup()
  39. #define arch_decomp_wdog()
  40. #endif /* __ASM_ARCH_UNCOMPRESS_H */