home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.28-15 / arch / arm / mach-ixp4xx / include / mach / uncompress.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-12-24  |  1.3 KB  |  58 lines

  1. /*
  2.  * arch/arm/mach-ixp4xx/include/mach/uncompress.h 
  3.  *
  4.  * Copyright (C) 2002 Intel Corporation.
  5.  * Copyright (C) 2003-2004 MontaVista Software, Inc.
  6.  *
  7.  * This program is free software; you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 2 as
  9.  * published by the Free Software Foundation.
  10.  *
  11.  */
  12.  
  13. #ifndef _ARCH_UNCOMPRESS_H_
  14. #define _ARCH_UNCOMPRESS_H_
  15.  
  16. #include "ixp4xx-regs.h"
  17. #include <asm/mach-types.h>
  18. #include <linux/serial_reg.h>
  19.  
  20. #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)
  21.  
  22. static volatile u32* uart_base;
  23.  
  24. static inline void putc(int c)
  25. {
  26.     /* Check THRE and TEMT bits before we transmit the character.
  27.      */
  28.     while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
  29.         barrier();
  30.  
  31.     *uart_base = c;
  32. }
  33.  
  34. static void flush(void)
  35. {
  36. }
  37.  
  38. static __inline__ void __arch_decomp_setup(unsigned long arch_id)
  39. {
  40.     /*
  41.      * Some boards are using UART2 as console
  42.      */
  43.     if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
  44.              machine_is_gateway7001() || machine_is_wg302v2())
  45.         uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
  46.     else
  47.         uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
  48. }
  49.  
  50. /*
  51.  * arch_id is a variable in decompress_kernel()
  52.  */
  53. #define arch_decomp_setup()    __arch_decomp_setup(arch_id)
  54.  
  55. #define arch_decomp_wdog()
  56.  
  57. #endif
  58.