blob: 7d88a20986268851ba128db1a1387cdabbd0597c [file] [log] [blame]
Patrick Georgiac959032020-05-05 22:49:26 +02001/* SPDX-License-Identifier: GPL-2.0-only */
T Michael Turney99bf4362019-08-07 14:25:58 -07002
3#include <console/uart.h>
4#include <gpio.h>
T Michael Turney99bf4362019-08-07 14:25:58 -07005#include <boot/coreboot_tables.h>
6
7#define UART_TX_PIN GPIO(44)
8
9void uart_fill_lb(void *data)
10{
11
12}
13
14static void set_tx(int line_state)
15{
16 gpio_set(UART_TX_PIN, line_state);
17}
18
Felix Helde3a12472020-09-11 15:47:09 +020019void uart_init(unsigned int idx)
T Michael Turney99bf4362019-08-07 14:25:58 -070020{
21 gpio_output(UART_TX_PIN, 1);
22}
23
Felix Helde3a12472020-09-11 15:47:09 +020024void uart_tx_byte(unsigned int idx, unsigned char data)
T Michael Turney99bf4362019-08-07 14:25:58 -070025{
26 uart_bitbang_tx_byte(data, set_tx);
27}
28
Felix Helde3a12472020-09-11 15:47:09 +020029void uart_tx_flush(unsigned int idx)
T Michael Turney99bf4362019-08-07 14:25:58 -070030{
31 /* unnecessary, PIO Tx means transaction is over when tx_byte returns */
32}
33
Felix Helde3a12472020-09-11 15:47:09 +020034unsigned char uart_rx_byte(unsigned int idx)
T Michael Turney99bf4362019-08-07 14:25:58 -070035{
36 return 0; /* not implemented */
37}