forked from Minki/linux
4d2b7d4cb4
When CONFIG_DEBUG_ICEDCC is set, we don't use the platform specific putc() function, but use icedcc_putc() instead, so putc is unused and causes a compile time warning: In file included from ../arch/arm/boot/compressed/misc.c:28:0: arch/arm/mach-rpc/include/mach/uncompress.h:79:13: warning: 'putc' defined but not used [-Wunused-function] arch/arm/mach-w90x900/include/mach/uncompress.h:30:13: warning: 'putc' defined but not used [-Wunused-function] On most platforms, this does not happen, because putc is defined as 'static inline' so the compiler will automatically drop it when it's unused. This changes the remaining seven platforms to behave the same way. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
76 lines
1.9 KiB
C
76 lines
1.9 KiB
C
/*
|
|
* arch/arm/mach-netx/include/mach/uncompress.h
|
|
*
|
|
* Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2
|
|
* as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
/*
|
|
* The following code assumes the serial port has already been
|
|
* initialized by the bootloader. We search for the first enabled
|
|
* port in the most probable order. If you didn't setup a port in
|
|
* your bootloader then nothing will appear (which might be desired).
|
|
*
|
|
* This does not append a newline
|
|
*/
|
|
|
|
#define REG(x) (*(volatile unsigned long *)(x))
|
|
|
|
#define UART1_BASE 0x100a00
|
|
#define UART2_BASE 0x100a80
|
|
|
|
#define UART_DR 0x0
|
|
|
|
#define UART_CR 0x14
|
|
#define CR_UART_EN (1<<0)
|
|
|
|
#define UART_FR 0x18
|
|
#define FR_BUSY (1<<3)
|
|
#define FR_TXFF (1<<5)
|
|
|
|
static inline void putc(char c)
|
|
{
|
|
unsigned long base;
|
|
|
|
if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
|
|
base = UART1_BASE;
|
|
else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
|
|
base = UART2_BASE;
|
|
else
|
|
return;
|
|
|
|
while (REG(base + UART_FR) & FR_TXFF);
|
|
REG(base + UART_DR) = c;
|
|
}
|
|
|
|
static inline void flush(void)
|
|
{
|
|
unsigned long base;
|
|
|
|
if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
|
|
base = UART1_BASE;
|
|
else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
|
|
base = UART2_BASE;
|
|
else
|
|
return;
|
|
|
|
while (REG(base + UART_FR) & FR_BUSY);
|
|
}
|
|
|
|
/*
|
|
* nothing to do
|
|
*/
|
|
#define arch_decomp_setup()
|