uncompress.h 1.0 KB

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