mirror of
				https://source.denx.de/u-boot/u-boot.git
				synced 2025-10-31 16:31:25 +01:00 
			
		
		
		
	The RISC-V SBI interface v0.1 provides a function for printing a character to the console. Even though SBI v0.1 functions are deprecated, the SBI console is quite useful for early debugging, because it works without any dcache, memory, or MMIO access in S mode. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
		
			
				
	
	
		
			17 lines
		
	
	
		
			259 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			259 B
		
	
	
	
		
			C
		
	
	
	
	
	
| // SPDX-License-Identifier: GPL-2.0+
 | |
| 
 | |
| #include <debug_uart.h>
 | |
| #include <asm/sbi.h>
 | |
| 
 | |
| static inline void _debug_uart_init(void)
 | |
| {
 | |
| }
 | |
| 
 | |
| static inline void _debug_uart_putc(int c)
 | |
| {
 | |
| 	if (CONFIG_IS_ENABLED(RISCV_SMODE))
 | |
| 		sbi_console_putchar(c);
 | |
| }
 | |
| 
 | |
| DEBUG_UART_FUNCS
 |