// SPDX-License-Identifier: GPL-2.01/*2* MIPS-specific debug support for pre-boot environment3*4* NOTE: putc() is board specific, if your board have a 16550 compatible uart,5* please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. otherwise, you6* need to implement your own putc().7*/8#include <linux/compiler.h>9#include <linux/types.h>1011#include "decompress.h"1213void __weak putc(char c)14{15}1617void puts(const char *s)18{19char c;20while ((c = *s++) != '\0') {21putc(c);22if (c == '\n')23putc('\r');24}25}2627void puthex(unsigned long long val)28{2930unsigned char buf[10];31int i;32for (i = 7; i >= 0; i--) {33buf[i] = "0123456789ABCDEF"[val & 0x0F];34val >>= 4;35}36buf[8] = '\0';37puts(buf);38}394041