]> Git Repo - J-u-boot.git/blame - drivers/serial/serial_sbi.c
pinctrl: renesas: Minimize R8A77970 V3M PFC tables
[J-u-boot.git] / drivers / serial / serial_sbi.c
CommitLineData
41f7be73
SH
1// SPDX-License-Identifier: GPL-2.0+
2
3#include <debug_uart.h>
4#include <asm/sbi.h>
5
dfe08374
HS
6#ifdef CONFIG_SBI_V01
7
41f7be73
SH
8static inline void _debug_uart_init(void)
9{
10}
11
12static inline void _debug_uart_putc(int c)
13{
14 if (CONFIG_IS_ENABLED(RISCV_SMODE))
15 sbi_console_putchar(c);
16}
17
dfe08374
HS
18#else
19
25e7d4bf 20static int sbi_dbcn_available __section(".data");
dfe08374
HS
21
22static inline void _debug_uart_init(void)
23{
24 if (CONFIG_IS_ENABLED(RISCV_SMODE))
25 sbi_dbcn_available = sbi_probe_extension(SBI_EXT_DBCN);
26}
27
28static inline void _debug_uart_putc(int ch)
29{
30 if (CONFIG_IS_ENABLED(RISCV_SMODE) && sbi_dbcn_available)
31 sbi_dbcn_write_byte(ch);
32}
33
34#endif
35
41f7be73 36DEBUG_UART_FUNCS
This page took 0.106358 seconds and 4 git commands to generate.