1 // SPDX-License-Identifier: GPL-2.0
3 * MIPS-specific debug support for pre-boot environment
5 * NOTE: putc() is board specific, if your board have a 16550 compatible uart,
6 * please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. otherwise, you
7 * need to implement your own putc().
9 #include <linux/compiler.h>
10 #include <linux/types.h>
12 #include "decompress.h"
14 void __weak putc(char c)
18 void puts(const char *s)
21 while ((c = *s++) != '\0') {
28 void puthex(unsigned long long val)
31 unsigned char buf[10];
33 for (i = 7; i >= 0; i--) {
34 buf[i] = "0123456789ABCDEF"[val & 0x0F];