treewide: replace GPLv2 long form headers with SPDX header
[coreboot.git] / src / soc / qualcomm / sdm845 / uart_bitbang.c
blob7f1720aa5a55355fab783291ce337550fe115d44
1 /* This file is part of the coreboot project. */
2 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <console/uart.h>
5 #include <gpio.h>
6 #include <types.h>
8 #define UART_TX_PIN GPIO(4)
10 static void set_tx(int line_state)
12 gpio_set(UART_TX_PIN, line_state);
15 void uart_init(int idx)
17 gpio_output(UART_TX_PIN, 1);
20 void uart_tx_byte(int idx, unsigned char data)
22 uart_bitbang_tx_byte(data, set_tx);
25 void uart_tx_flush(int idx)
27 /* unnecessary, PIO Tx means transaction is over when tx_byte returns */
30 unsigned char uart_rx_byte(int idx)
32 return 0; /* not implemented */