Debian Codegraph @

src/soc/amd/common/block/simnow/simnow_console.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <arch/io.h>
4 #include <console/console.h>
5 #include <console/simnow.h>
6
7 #define AMD_SIMNOW_PORT 0x80
8 #define AMD_SIMNOW_PORT_DATA_BEGIN 0x5f535452ul
9 #define AMD_SIMNOW_PORT_DATA_END 0x5f454e44ul
10
11 void simnow_console_init(void)
12 {
13 outl(AMD_SIMNOW_PORT_DATA_BEGIN, AMD_SIMNOW_PORT);
14 }
15
16 void simnow_console_tx_byte(unsigned char data)
17 {
18 outb(data, AMD_SIMNOW_PORT);
19
20 if (data == '\n') {
21 outl(AMD_SIMNOW_PORT_DATA_END, AMD_SIMNOW_PORT);
22 outl(AMD_SIMNOW_PORT_DATA_BEGIN, AMD_SIMNOW_PORT);
23 }
24 }