1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #include <console/uart.h> 4 #include <gpio.h> 5 #include <boot/coreboot_tables.h> 6 #include <soc/uart.h> 7 fill_lb_serial(struct lb_serial * serial)8enum cb_err fill_lb_serial(struct lb_serial *serial) 9 { 10 return CB_ERR; 11 } 12 set_tx(int line_state)13static void set_tx(int line_state) 14 { 15 gpio_set(UART_TX_PIN, line_state); 16 } 17 uart_init(unsigned int idx)18void uart_init(unsigned int idx) 19 { 20 gpio_output(UART_TX_PIN, 1); 21 } 22 uart_tx_byte(unsigned int idx,unsigned char data)23void uart_tx_byte(unsigned int idx, unsigned char data) 24 { 25 uart_bitbang_tx_byte(data, set_tx); 26 } 27 uart_tx_flush(unsigned int idx)28void uart_tx_flush(unsigned int idx) 29 { 30 /* unnecessary, PIO Tx means transaction is over when tx_byte returns */ 31 } 32 uart_rx_byte(unsigned int idx)33unsigned char uart_rx_byte(unsigned int idx) 34 { 35 return 0; /* not implemented */ 36 } 37