uncompress.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* include/asm-arm/arch-lh7a40x/uncompress.h
  2. *
  3. * Copyright (C) 2004 Coastal Environmental Systems
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * version 2 as published by the Free Software Foundation.
  8. *
  9. */
  10. #include <asm/arch/registers.h>
  11. #ifndef UART_R_DATA
  12. # define UART_R_DATA (0x00)
  13. #endif
  14. #ifndef UART_R_STATUS
  15. # define UART_R_STATUS (0x10)
  16. #endif
  17. #define nTxRdy (0x20) /* Not TxReady (literally Tx FIFO full) */
  18. /* Access UART with physical addresses before MMU is setup */
  19. #define UART_STATUS (*(volatile unsigned long*) (UART2_PHYS + UART_R_STATUS))
  20. #define UART_DATA (*(volatile unsigned long*) (UART2_PHYS + UART_R_DATA))
  21. static __inline__ void putc (char ch)
  22. {
  23. while (UART_STATUS & nTxRdy)
  24. ;
  25. UART_DATA = ch;
  26. }
  27. static void putstr (const char* sz)
  28. {
  29. for (; *sz; ++sz) {
  30. putc (*sz);
  31. if (*sz == '\n')
  32. putc ('\r');
  33. }
  34. }
  35. /* NULL functions; we don't presently need them */
  36. #define arch_decomp_setup()
  37. #define arch_decomp_wdog()