1 // SPDX-License-Identifier: GPL-2.0 1 2 /* 3 * MIPS-specific debug support for pre-boot en 4 * 5 * NOTE: putc() is board specific, if your boa 6 * please select SYS_SUPPORTS_ZBOOT_UART16550 7 * need to implement your own putc(). 8 */ 9 #include <linux/compiler.h> 10 #include <linux/types.h> 11 12 #include "decompress.h" 13 14 void __weak putc(char c) 15 { 16 } 17 18 void puts(const char *s) 19 { 20 char c; 21 while ((c = *s++) != '\0') { 22 putc(c); 23 if (c == '\n') 24 putc('\r'); 25 } 26 } 27 28 void puthex(unsigned long long val) 29 { 30 31 unsigned char buf[10]; 32 int i; 33 for (i = 7; i >= 0; i--) { 34 buf[i] = "0123456789ABCDEF"[va 35 val >>= 4; 36 } 37 buf[8] = '\0'; 38 puts(buf); 39 } 40
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.