summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/mediatek/common/uart.c18
-rw-r--r--src/soc/nvidia/tegra124/uart.c18
-rw-r--r--src/soc/nvidia/tegra210/uart.c18
-rw-r--r--src/soc/qualcomm/common/qupv3_uart.c16
-rw-r--r--src/soc/qualcomm/common/uart_bitbang.c4
-rw-r--r--src/soc/qualcomm/ipq40xx/uart.c17
-rw-r--r--src/soc/qualcomm/ipq806x/uart.c3
-rw-r--r--src/soc/qualcomm/qcs405/uart.c17
-rw-r--r--src/soc/samsung/exynos5250/uart.c18
-rw-r--r--src/soc/samsung/exynos5420/uart.c18
-rw-r--r--src/soc/ti/am335x/uart.c18
11 files changed, 73 insertions, 92 deletions
diff --git a/src/soc/mediatek/common/uart.c b/src/soc/mediatek/common/uart.c
index 11c3452ce2..79ca07230f 100644
--- a/src/soc/mediatek/common/uart.c
+++ b/src/soc/mediatek/common/uart.c
@@ -159,15 +159,13 @@ void uart_tx_flush(unsigned int idx)
mtk_uart_tx_flush();
}
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
- struct lb_serial serial;
- serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
- serial.baseaddr = UART0_BASE;
- serial.baud = get_uart_baudrate();
- serial.regwidth = 4;
- serial.input_hertz = UART_HZ;
- lb_add_serial(&serial, data);
-
- lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
+ serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
+ serial->baseaddr = UART0_BASE;
+ serial->baud = get_uart_baudrate();
+ serial->regwidth = 4;
+ serial->input_hertz = UART_HZ;
+
+ return CB_SUCCESS;
}
diff --git a/src/soc/nvidia/tegra124/uart.c b/src/soc/nvidia/tegra124/uart.c
index 77d6de2c9d..557f0e82fe 100644
--- a/src/soc/nvidia/tegra124/uart.c
+++ b/src/soc/nvidia/tegra124/uart.c
@@ -114,15 +114,13 @@ void uart_tx_flush(unsigned int idx)
tegra124_uart_tx_flush(uart_ptr);
}
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
- struct lb_serial serial;
- serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
- serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
- serial.baud = get_uart_baudrate();
- serial.regwidth = 4;
- serial.input_hertz = uart_platform_refclk();
- lb_add_serial(&serial, data);
-
- lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
+ serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
+ serial->baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
+ serial->baud = get_uart_baudrate();
+ serial->regwidth = 4;
+ serial->input_hertz = uart_platform_refclk();
+
+ return CB_SUCCESS;
}
diff --git a/src/soc/nvidia/tegra210/uart.c b/src/soc/nvidia/tegra210/uart.c
index b2cdf67aa2..33660659f8 100644
--- a/src/soc/nvidia/tegra210/uart.c
+++ b/src/soc/nvidia/tegra210/uart.c
@@ -101,15 +101,13 @@ unsigned char uart_rx_byte(unsigned int idx)
return tegra210_uart_rx_byte();
}
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
- struct lb_serial serial;
- serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
- serial.baseaddr = CONFIG_CONSOLE_SERIAL_TEGRA210_UART_ADDRESS;
- serial.baud = get_uart_baudrate();
- serial.regwidth = 4;
- serial.input_hertz = uart_platform_refclk();
- lb_add_serial(&serial, data);
-
- lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
+ serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
+ serial->baseaddr = CONFIG_CONSOLE_SERIAL_TEGRA210_UART_ADDRESS;
+ serial->baud = get_uart_baudrate();
+ serial->regwidth = 4;
+ serial->input_hertz = uart_platform_refclk();
+
+ return CB_SUCCESS;
}
diff --git a/src/soc/qualcomm/common/qupv3_uart.c b/src/soc/qualcomm/common/qupv3_uart.c
index 2086c1df70..f4ff53b8b1 100644
--- a/src/soc/qualcomm/common/qupv3_uart.c
+++ b/src/soc/qualcomm/common/qupv3_uart.c
@@ -140,15 +140,13 @@ uintptr_t uart_platform_base(unsigned int idx)
return (uintptr_t)qup[idx].regs;
}
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
- struct lb_serial serial = {0};
+ serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
+ serial->baseaddr = (uint32_t)uart_platform_base(CONFIG_UART_FOR_CONSOLE);
+ serial->baud = get_uart_baudrate();
+ serial->regwidth = 4;
+ serial->input_hertz = SRC_XO_HZ;
- serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
- serial.baseaddr = (uint32_t)uart_platform_base(CONFIG_UART_FOR_CONSOLE);
- serial.baud = get_uart_baudrate();
- serial.regwidth = 4;
- serial.input_hertz = SRC_XO_HZ;
-
- lb_add_serial(&serial, data);
+ return CB_SUCCESS;
}
diff --git a/src/soc/qualcomm/common/uart_bitbang.c b/src/soc/qualcomm/common/uart_bitbang.c
index 943dcf8a06..d6447f1f18 100644
--- a/src/soc/qualcomm/common/uart_bitbang.c
+++ b/src/soc/qualcomm/common/uart_bitbang.c
@@ -5,9 +5,9 @@
#include <boot/coreboot_tables.h>
#include <soc/uart.h>
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
-
+ return CB_ERR;
}
static void set_tx(int line_state)
diff --git a/src/soc/qualcomm/ipq40xx/uart.c b/src/soc/qualcomm/ipq40xx/uart.c
index c04a773bce..45dc09af35 100644
--- a/src/soc/qualcomm/ipq40xx/uart.c
+++ b/src/soc/qualcomm/ipq40xx/uart.c
@@ -256,16 +256,13 @@ uint8_t uart_rx_byte(unsigned int idx)
}
/* TODO: Implement function */
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
- struct lb_serial serial;
+ serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
+ serial->baseaddr = (uint32_t)UART1_DM_BASE;
+ serial->baud = get_uart_baudrate();
+ serial->regwidth = 1;
+ serial->input_hertz = uart_platform_refclk();
- serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
- serial.baseaddr = (uint32_t)UART1_DM_BASE;
- serial.baud = get_uart_baudrate();
- serial.regwidth = 1;
- serial.input_hertz = uart_platform_refclk();
- lb_add_serial(&serial, data);
-
- lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
+ return CB_SUCCESS;
}
diff --git a/src/soc/qualcomm/ipq806x/uart.c b/src/soc/qualcomm/ipq806x/uart.c
index 15a0998fb5..6d69edc991 100644
--- a/src/soc/qualcomm/ipq806x/uart.c
+++ b/src/soc/qualcomm/ipq806x/uart.c
@@ -368,6 +368,7 @@ uint8_t uart_rx_byte(unsigned int idx)
}
/* TODO: Implement function */
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
+ return CB_ERR;
}
diff --git a/src/soc/qualcomm/qcs405/uart.c b/src/soc/qualcomm/qcs405/uart.c
index 007a98093f..16c71b4205 100644
--- a/src/soc/qualcomm/qcs405/uart.c
+++ b/src/soc/qualcomm/qcs405/uart.c
@@ -257,16 +257,13 @@ uint8_t uart_rx_byte(unsigned int idx)
}
#endif
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
- struct lb_serial serial;
+ serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
+ serial->baseaddr = (uint64_t)UART2_DM_BASE;
+ serial->baud = get_uart_baudrate();
+ serial->regwidth = 1;
+ serial->input_hertz = uart_platform_refclk();
- serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
- serial.baseaddr = (uint64_t)UART2_DM_BASE;
- serial.baud = get_uart_baudrate();
- serial.regwidth = 1;
- serial.input_hertz = uart_platform_refclk();
- lb_add_serial(&serial, data);
-
- lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
+ return CB_SUCCESS;
}
diff --git a/src/soc/samsung/exynos5250/uart.c b/src/soc/samsung/exynos5250/uart.c
index 7943651d85..7cd1d4671a 100644
--- a/src/soc/samsung/exynos5250/uart.c
+++ b/src/soc/samsung/exynos5250/uart.c
@@ -132,15 +132,13 @@ void uart_tx_flush(unsigned int idx)
exynos5_uart_tx_flush(uart);
}
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
- struct lb_serial serial;
- serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
- serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
- serial.baud = get_uart_baudrate();
- serial.regwidth = 4;
- serial.input_hertz = uart_platform_refclk();
- lb_add_serial(&serial, data);
-
- lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
+ serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
+ serial->baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
+ serial->baud = get_uart_baudrate();
+ serial->regwidth = 4;
+ serial->input_hertz = uart_platform_refclk();
+
+ return CB_SUCCESS;
}
diff --git a/src/soc/samsung/exynos5420/uart.c b/src/soc/samsung/exynos5420/uart.c
index 12681834bf..eb1d3f9fca 100644
--- a/src/soc/samsung/exynos5420/uart.c
+++ b/src/soc/samsung/exynos5420/uart.c
@@ -123,15 +123,13 @@ void uart_tx_flush(unsigned int idx)
/* Exynos5250 implements this too. */
}
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
- struct lb_serial serial;
- serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
- serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
- serial.baud = get_uart_baudrate();
- serial.regwidth = 4;
- serial.input_hertz = uart_platform_refclk();
- lb_add_serial(&serial, data);
-
- lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
+ serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
+ serial->baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
+ serial->baud = get_uart_baudrate();
+ serial->regwidth = 4;
+ serial->input_hertz = uart_platform_refclk();
+
+ return CB_SUCCESS;
}
diff --git a/src/soc/ti/am335x/uart.c b/src/soc/ti/am335x/uart.c
index 136d785059..b19ba96aec 100644
--- a/src/soc/ti/am335x/uart.c
+++ b/src/soc/ti/am335x/uart.c
@@ -170,15 +170,13 @@ void uart_tx_flush(unsigned int idx)
{
}
-void uart_fill_lb(void *data)
+enum cb_err fill_lb_serial(struct lb_serial *serial)
{
- struct lb_serial serial;
- serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
- serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
- serial.baud = get_uart_baudrate();
- serial.regwidth = 2;
- serial.input_hertz = uart_platform_refclk();
- lb_add_serial(&serial, data);
-
- lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
+ serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
+ serial->baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
+ serial->baud = get_uart_baudrate();
+ serial->regwidth = 2;
+ serial->input_hertz = uart_platform_refclk();
+
+ return CB_SUCCESS;
}