uncompress.h 932 B

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