uncompress.h 819 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * linux/include/asm-arm/arch-cl7500/uncompress.h
  3. *
  4. * Copyright (C) 1999, 2000 Nexus Electronics Ltd.
  5. */
  6. #define BASE 0x03010000
  7. #define SERBASE (BASE + (0x2f8 << 2))
  8. static inline void putc(char c)
  9. {
  10. while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20))
  11. barrier();
  12. *((volatile unsigned int *)(SERBASE)) = c;
  13. }
  14. static inline void flush(void)
  15. {
  16. }
  17. static __inline__ void arch_decomp_setup(void)
  18. {
  19. int baud = 3686400 / (9600 * 32);
  20. *((volatile unsigned int *)(SERBASE + 0xC)) = 0x80;
  21. *((volatile unsigned int *)(SERBASE + 0x0)) = baud & 0xff;
  22. *((volatile unsigned int *)(SERBASE + 0x4)) = (baud & 0xff00) >> 8;
  23. *((volatile unsigned int *)(SERBASE + 0xC)) = 3; /* 8 bits */
  24. *((volatile unsigned int *)(SERBASE + 0x10)) = 3; /* DTR, RTS */
  25. }
  26. /*
  27. * nothing to do
  28. */
  29. #define arch_decomp_wdog()