Path: blob/master/arch/arm/mach-lpc32xx/include/mach/uncompress.h
10820 views
/*1* arch/arm/mach-lpc32xx/include/mach/uncompress.h2*3* Author: Kevin Wells <[email protected]>4*5* Copyright (C) 2010 NXP Semiconductors6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*/1718#ifndef __ASM_ARM_ARCH_UNCOMPRESS_H19#define __ASM_ARM_ARCH_UNCOMPRESS_H2021#include <linux/io.h>2223#include <mach/hardware.h>24#include <mach/platform.h>2526/*27* Uncompress output is hardcoded to standard UART 528*/2930#define UART_FIFO_CTL_TX_RESET (1 << 2)31#define UART_STATUS_TX_MT (1 << 6)3233#define _UARTREG(x) (void __iomem *)(LPC32XX_UART5_BASE + (x))3435#define LPC32XX_UART_DLLFIFO_O 0x0036#define LPC32XX_UART_IIRFCR_O 0x0837#define LPC32XX_UART_LSR_O 0x143839static inline void putc(int ch)40{41/* Wait for transmit FIFO to empty */42while ((__raw_readl(_UARTREG(LPC32XX_UART_LSR_O)) &43UART_STATUS_TX_MT) == 0)44;4546__raw_writel((u32) ch, _UARTREG(LPC32XX_UART_DLLFIFO_O));47}4849static inline void flush(void)50{51__raw_writel(__raw_readl(_UARTREG(LPC32XX_UART_IIRFCR_O)) |52UART_FIFO_CTL_TX_RESET, _UARTREG(LPC32XX_UART_IIRFCR_O));53}5455/* NULL functions; we don't presently need them */56#define arch_decomp_setup()57#define arch_decomp_wdog()5859#endif606162