uncompress.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * linux/include/asm-arm/arch-iop3xx/uncompress.h
  3. */
  4. #include <linux/config.h>
  5. #include <asm/types.h>
  6. #include <asm/mach-types.h>
  7. #include <linux/serial_reg.h>
  8. #include <asm/hardware.h>
  9. #ifdef CONFIG_ARCH_IOP321
  10. #define UTYPE unsigned char *
  11. #elif defined(CONFIG_ARCH_IOP331)
  12. #define UTYPE u32 *
  13. #else
  14. #error "Missing IOP3xx arch type def"
  15. #endif
  16. static volatile UTYPE uart_base;
  17. #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
  18. static inline void putc(char c)
  19. {
  20. while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
  21. barrier();
  22. *uart_base = c;
  23. }
  24. static inline void flush(void)
  25. {
  26. }
  27. static __inline__ void __arch_decomp_setup(unsigned long arch_id)
  28. {
  29. if(machine_is_iq80321())
  30. uart_base = (volatile UTYPE)IQ80321_UART;
  31. else if(machine_is_iq31244())
  32. uart_base = (volatile UTYPE)IQ31244_UART;
  33. else if(machine_is_iq80331() || machine_is_iq80332())
  34. uart_base = (volatile UTYPE)IOP331_UART0_PHYS;
  35. else
  36. uart_base = (volatile UTYPE)0xfe800000;
  37. }
  38. /*
  39. * nothing to do
  40. */
  41. #define arch_decomp_setup() __arch_decomp_setup(arch_id)
  42. #define arch_decomp_wdog()