uncompress.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  *  linux/include/asm-arm/arch-anakin/uncompress.h
  3.  *
  4.  *  Copyright (C) 2001 Aleph One Ltd. for Acunia N.V.
  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 version 2 as
  8.  * published by the Free Software Foundation.
  9.  *
  10.  *  Changelog:
  11.  *   10-Apr-2001 TTC Created
  12.  */
  13. #ifndef __ASM_ARCH_UNCOMPRESS_H
  14. #define __ASM_ARCH_UNCOMPRESS_H
  15. #include <linux/config.h>
  16. #include <asm/io.h>
  17. #include <asm/arch/serial_reg.h>
  18. #ifndef CONFIG_ANAKIN_DEFAULT_BAUDRATE
  19. #define CONFIG_ANAKIN_DEFAULT_BAUDRATE 9600
  20. #endif
  21. static inline void
  22. putc(int c)
  23. {
  24. while (!(__raw_readl(IO_START + UART0 + 0x10) & TXEMPTY))
  25. barrier();
  26. __raw_writel(c, IO_START + UART0 + 0x14);
  27. __raw_writel(__raw_readl(IO_START + UART0 + 0x18)
  28. | SENDREQUEST, IO_START + UART0 + 0x18);
  29. }
  30. static void
  31. puts(const char *s)
  32. {
  33. int c;
  34. while ((c = *s++)) {
  35. putc(c);
  36. if (c == 'n') putc('r');
  37. }
  38. }
  39. static void
  40. arch_decomp_setup(void)
  41. {
  42. __raw_writel(__raw_readl(IO_START + UART0 + 0x10) & ~PRESCALER
  43. | SETBAUD(CONFIG_ANAKIN_DEFAULT_BAUDRATE),
  44. IO_START + UART0 + 0x10);
  45. __raw_writel(__raw_readl(IO_START + UART0 + 0x18) & ~(IRQENABLE
  46. | RTS | DTR | BLOCKRX | PARITY),
  47. IO_START + UART0 + 0x18);
  48. }
  49. #define arch_decomp_wdog()
  50. #endif