uncompress.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* arch/arm/mach-zynq/include/mach/uncompress.h
  2. *
  3. * Copyright (C) 2011 Xilinx
  4. *
  5. * This software is licensed under the terms of the GNU General Public
  6. * License version 2, as published by the Free Software Foundation, and
  7. * may be copied, distributed, and modified under those terms.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #ifndef __MACH_UNCOMPRESS_H__
  15. #define __MACH_UNCOMPRESS_H__
  16. #include <linux/io.h>
  17. #include <asm/processor.h>
  18. #include <mach/zynq_soc.h>
  19. #include <mach/uart.h>
  20. void arch_decomp_setup(void)
  21. {
  22. }
  23. static inline void flush(void)
  24. {
  25. /*
  26. * Wait while the FIFO is not empty
  27. */
  28. while (!(__raw_readl(IOMEM(LL_UART_PADDR + UART_SR_OFFSET)) &
  29. UART_SR_TXEMPTY))
  30. cpu_relax();
  31. }
  32. #define arch_decomp_wdog()
  33. static void putc(char ch)
  34. {
  35. /*
  36. * Wait for room in the FIFO, then write the char into the FIFO
  37. */
  38. while (__raw_readl(IOMEM(LL_UART_PADDR + UART_SR_OFFSET)) &
  39. UART_SR_TXFULL)
  40. cpu_relax();
  41. __raw_writel(ch, IOMEM(LL_UART_PADDR + UART_FIFO_OFFSET));
  42. }
  43. #endif