kernel-ark/arch/mips/boot/compressed/dbg.c
Wu Zhangjin e52dd9fc6b MIPS: Simplify the weak annotation with __weak
Found by

$ find arch/mips/ -name "*.c" | xargs -i grep -H weak {} | grep -v __weak

[Ralf: Made this bulletproof by including <linux/compiler.h>]

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/874/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-02-27 12:53:17 +01:00

38 lines
672 B
C

/*
* MIPS-specific debug support for pre-boot environment
*
* NOTE: putc() is board specific, if your board have a 16550 compatible uart,
* please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. othewise, you
* need to implement your own putc().
*/
#include <linux/compiler.h>
#include <linux/init.h>
#include <linux/types.h>
void __weak putc(char c)
{
}
void puts(const char *s)
{
char c;
while ((c = *s++) != '\0') {
putc(c);
if (c == '\n')
putc('\r');
}
}
void puthex(unsigned long long val)
{
unsigned char buf[10];
int i;
for (i = 7; i >= 0; i--) {
buf[i] = "0123456789ABCDEF"[val & 0x0F];
val >>= 4;
}
buf[8] = '\0';
puts(buf);
}