Path: blob/master/arch/arm/mach-nomadik/include/mach/uncompress.h
10820 views
/*1* Copyright (C) 2008 STMicroelectronics2*3* This program is free software; you can redistribute it and/or modify4* it under the terms of the GNU General Public License as published by5* the Free Software Foundation; either version 2 of the License, or6* (at your option) any later version.7*8* This program is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11* GNU General Public License for more details.12*13* You should have received a copy of the GNU General Public License14* along with this program; if not, write to the Free Software15* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA16*/1718#ifndef __ASM_ARCH_UNCOMPRESS_H19#define __ASM_ARCH_UNCOMPRESS_H2021#include <asm/setup.h>22#include <asm/io.h>23#include <mach/hardware.h>2425/* we need the constants in amba/serial.h, but it refers to amba_device */26struct amba_device;27#include <linux/amba/serial.h>2829#define NOMADIK_UART_DR 0x101FB00030#define NOMADIK_UART_LCRH 0x101FB02c31#define NOMADIK_UART_CR 0x101FB03032#define NOMADIK_UART_FR 0x101FB0183334static void putc(const char c)35{36/* Do nothing if the UART is not enabled. */37if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN))38return;3940if (c == '\n')41putc('\r');4243while (readb(NOMADIK_UART_FR) & UART01x_FR_TXFF)44barrier();45writeb(c, NOMADIK_UART_DR);46}4748static void flush(void)49{50if (!(readb(NOMADIK_UART_CR) & UART01x_CR_UARTEN))51return;52while (readb(NOMADIK_UART_FR) & UART01x_FR_BUSY)53barrier();54}5556static inline void arch_decomp_setup(void)57{58}5960#define arch_decomp_wdog() /* nothing to do here */6162#endif /* __ASM_ARCH_UNCOMPRESS_H */636465