Path: blob/master/arch/arm/mach-ixp4xx/include/mach/uncompress.h
17778 views
/*1* arch/arm/mach-ixp4xx/include/mach/uncompress.h2*3* Copyright (C) 2002 Intel Corporation.4* Copyright (C) 2003-2004 MontaVista Software, Inc.5*6* This program is free software; you can redistribute it and/or modify7* it under the terms of the GNU General Public License version 2 as8* published by the Free Software Foundation.9*10*/1112#ifndef _ARCH_UNCOMPRESS_H_13#define _ARCH_UNCOMPRESS_H_1415#include "ixp4xx-regs.h"16#include <asm/mach-types.h>17#include <linux/serial_reg.h>1819#define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE)2021volatile u32* uart_base;2223static inline void putc(int c)24{25/* Check THRE and TEMT bits before we transmit the character.26*/27while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)28barrier();2930*uart_base = c;31}3233static void flush(void)34{35}3637static __inline__ void __arch_decomp_setup(unsigned long arch_id)38{39/*40* Some boards are using UART2 as console41*/42if (machine_is_adi_coyote() || machine_is_gtwx5715() ||43machine_is_gateway7001() || machine_is_wg302v2())44uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;45else46uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;47}4849/*50* arch_id is a variable in decompress_kernel()51*/52#define arch_decomp_setup() __arch_decomp_setup(arch_id)5354#define arch_decomp_wdog()5556#endif575859