Path: blob/master/arch/arm/mach-realview/include/mach/uncompress.h
10820 views
/*1* arch/arm/mach-realview/include/mach/uncompress.h2*3* Copyright (C) 2003 ARM Limited4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18*/19#include <mach/hardware.h>20#include <asm/mach-types.h>2122#include <mach/board-eb.h>23#include <mach/board-pb11mp.h>24#include <mach/board-pb1176.h>25#include <mach/board-pba8.h>26#include <mach/board-pbx.h>2728#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))29#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c))30#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))31#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))3233/*34* Return the UART base address35*/36static inline unsigned long get_uart_base(void)37{38if (machine_is_realview_eb())39return REALVIEW_EB_UART0_BASE;40else if (machine_is_realview_pb11mp())41return REALVIEW_PB11MP_UART0_BASE;42else if (machine_is_realview_pb1176())43return REALVIEW_PB1176_UART0_BASE;44else if (machine_is_realview_pba8())45return REALVIEW_PBA8_UART0_BASE;46else if (machine_is_realview_pbx())47return REALVIEW_PBX_UART0_BASE;48else49return 0;50}5152/*53* This does not append a newline54*/55static inline void putc(int c)56{57unsigned long base = get_uart_base();5859while (AMBA_UART_FR(base) & (1 << 5))60barrier();6162AMBA_UART_DR(base) = c;63}6465static inline void flush(void)66{67unsigned long base = get_uart_base();6869while (AMBA_UART_FR(base) & (1 << 3))70barrier();71}7273/*74* nothing to do75*/76#define arch_decomp_setup()77#define arch_decomp_wdog()787980