uncompress.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * arch/arm/mach-meson/include/mach/uncompress.h
  3. *
  4. * Copyright (C) 2010 AMLOGIC, INC.
  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 as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #define UART0_RFIFO (*(volatile unsigned int *)0xc11084c0)
  21. #define UART0_WFIFO (*(volatile unsigned int *)0xc11084c4)
  22. #define UART0_CONTROL (*(volatile unsigned int *)0xc11084c8)
  23. #define UART0_STATUS (*(volatile unsigned int *)0xc11084cc)
  24. /*
  25. * This does not append a newline
  26. */
  27. static inline void putc(int c)
  28. {
  29. /* wait TX FIFO not full */
  30. while (UART0_STATUS & (1 << 21)) {
  31. barrier();
  32. }
  33. UART0_WFIFO = c;
  34. }
  35. static inline void flush(void)
  36. {
  37. /* wait TX FIFO not empty */
  38. while ((UART0_STATUS & (1 << 22)) == 0) {
  39. barrier();
  40. }
  41. }
  42. static inline void arch_decomp_setup(void)
  43. {
  44. /* 115200 bps at 180M MPEG clock */
  45. UART0_CONTROL = 0x185;
  46. }
  47. /*
  48. * nothing to do
  49. */
  50. #define arch_decomp_wdog()