uncompress.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * include/asm-arm/arch-ixp4xx/uncompress.h
  3. *
  4. * Copyright (C) 2002 Intel Corporation.
  5. * Copyright (C) 2003-2004 MontaVista Software, Inc.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. */
  12. #ifndef _ARCH_UNCOMPRESS_H_
  13. #define _ARCH_UNCOMPRESS_H_
  14. #include <asm/hardware.h>
  15. #include <asm/mach-types.h>
  16. #include <linux/serial_reg.h>
  17. #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
  18. static volatile u32* uart_base;
  19. static inline void putc(int c)
  20. {
  21. /* Check THRE and TEMT bits before we transmit the character.
  22. */
  23. while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
  24. barrier();
  25. *uart_base = c;
  26. }
  27. static void flush(void)
  28. {
  29. }
  30. static __inline__ void __arch_decomp_setup(unsigned long arch_id)
  31. {
  32. /*
  33. * Coyote and gtwx5715 only have UART2 connected
  34. */
  35. if (machine_is_adi_coyote() || machine_is_gtwx5715())
  36. uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
  37. else
  38. uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
  39. }
  40. /*
  41. * arch_id is a variable in decompress_kernel()
  42. */
  43. #define arch_decomp_setup() __arch_decomp_setup(arch_id)
  44. #define arch_decomp_wdog()
  45. #endif