uncompress.h 887 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * arch/arm/mach-mv78xx0/include/mach/uncompress.h
  3. *
  4. * This file is licensed under the terms of the GNU General Public
  5. * License version 2. This program is licensed "as is" without any
  6. * warranty of any kind, whether express or implied.
  7. */
  8. #include <linux/serial_reg.h>
  9. #include <mach/mv78xx0.h>
  10. #define SERIAL_BASE ((unsigned char *)UART0_PHYS_BASE)
  11. static void putc(const char c)
  12. {
  13. unsigned char *base = SERIAL_BASE;
  14. int i;
  15. for (i = 0; i < 0x1000; i++) {
  16. if (base[UART_LSR << 2] & UART_LSR_THRE)
  17. break;
  18. barrier();
  19. }
  20. base[UART_TX << 2] = c;
  21. }
  22. static void flush(void)
  23. {
  24. unsigned char *base = SERIAL_BASE;
  25. unsigned char mask;
  26. int i;
  27. mask = UART_LSR_TEMT | UART_LSR_THRE;
  28. for (i = 0; i < 0x1000; i++) {
  29. if ((base[UART_LSR << 2] & mask) == mask)
  30. break;
  31. barrier();
  32. }
  33. }
  34. /*
  35. * nothing to do
  36. */
  37. #define arch_decomp_setup()
  38. #define arch_decomp_wdog()