/*1* MIPS-specific debug support for pre-boot environment2*3* NOTE: putc() is board specific, if your board have a 16550 compatible uart,4* please select SYS_SUPPORTS_ZBOOT_UART16550 for your machine. othewise, you5* need to implement your own putc().6*/7#include <linux/compiler.h>8#include <linux/init.h>9#include <linux/types.h>1011void __weak putc(char c)12{13}1415void puts(const char *s)16{17char c;18while ((c = *s++) != '\0') {19putc(c);20if (c == '\n')21putc('\r');22}23}2425void puthex(unsigned long long val)26{2728unsigned char buf[10];29int i;30for (i = 7; i >= 0; i--) {31buf[i] = "0123456789ABCDEF"[val & 0x0F];32val >>= 4;33}34buf[8] = '\0';35puts(buf);36}373839