Angel Pons | 585495e | 2020-04-03 01:21:38 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 2 | |
3 | #include <types.h> | ||||
4 | #include <console/uart.h> | ||||
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 5 | #include <boot/coreboot_tables.h> |
6 | |||||
7 | static uint8_t *buf = (void *)0; | ||||
Felix Held | e3a1247 | 2020-09-11 15:47:09 +0200 | [diff] [blame] | 8 | uintptr_t uart_platform_base(unsigned int idx) |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 9 | { |
Elyes Haouas | 486240f | 2022-11-18 15:21:03 +0100 | [diff] [blame] | 10 | return (uintptr_t)buf; |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 11 | } |
12 | |||||
Felix Held | e3a1247 | 2020-09-11 15:47:09 +0200 | [diff] [blame] | 13 | void uart_init(unsigned int idx) |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 14 | { |
15 | } | ||||
16 | |||||
Felix Held | e3a1247 | 2020-09-11 15:47:09 +0200 | [diff] [blame] | 17 | unsigned char uart_rx_byte(unsigned int idx) |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 18 | { |
19 | return 0; | ||||
20 | } | ||||
21 | |||||
Felix Held | e3a1247 | 2020-09-11 15:47:09 +0200 | [diff] [blame] | 22 | void uart_tx_byte(unsigned int idx, unsigned char data) |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 23 | { |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 24 | } |
25 | |||||
Felix Held | e3a1247 | 2020-09-11 15:47:09 +0200 | [diff] [blame] | 26 | void uart_tx_flush(unsigned int idx) |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 27 | { |
28 | } | ||||
29 | |||||
Arthur Heymans | 9948c52 | 2022-10-24 14:37:40 +0200 | [diff] [blame] | 30 | enum cb_err fill_lb_serial(struct lb_serial *serial) |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 31 | { |
Arthur Heymans | 9948c52 | 2022-10-24 14:37:40 +0200 | [diff] [blame] | 32 | serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED; |
33 | serial->baseaddr = 0; | ||||
34 | serial->baud = 115200; | ||||
35 | serial->regwidth = 1; | ||||
36 | serial->input_hertz = uart_platform_refclk(); | ||||
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 37 | |
Arthur Heymans | 9948c52 | 2022-10-24 14:37:40 +0200 | [diff] [blame] | 38 | return CB_SUCCESS; |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 39 | } |