uncompress.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * linux/include/asm-arm/arch-ep93xx/uncompress.h
  3. *
  4. * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or (at
  9. * your option) any later version.
  10. */
  11. #include <asm/arch/ep93xx-regs.h>
  12. static unsigned char __raw_readb(unsigned int ptr)
  13. {
  14. return *((volatile unsigned char *)ptr);
  15. }
  16. static void __raw_writeb(unsigned char value, unsigned int ptr)
  17. {
  18. *((volatile unsigned char *)ptr) = value;
  19. }
  20. #define PHYS_UART1_DATA 0x808c0000
  21. #define PHYS_UART1_FLAG 0x808c0018
  22. #define UART1_FLAG_TXFF 0x20
  23. static __inline__ void putc(char c)
  24. {
  25. int i;
  26. for (i = 0; i < 1000; i++) {
  27. /* Transmit fifo not full? */
  28. if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF))
  29. break;
  30. }
  31. __raw_writeb(c, PHYS_UART1_DATA);
  32. }
  33. static void putstr(const char *s)
  34. {
  35. while (*s) {
  36. putc(*s);
  37. if (*s == '\n')
  38. putc('\r');
  39. s++;
  40. }
  41. }
  42. #define arch_decomp_setup()
  43. #define arch_decomp_wdog()