Tristan Hsieh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34191 )
Change subject: mediatek: Fill in input_hertz to coreboot table ......................................................................
mediatek: Fill in input_hertz to coreboot table
Set input_hertz to 26 MHz.
BUG=b:134351649 BRANCH=none TEST=emerge-kukui coreboot; emerge-elm coreboot
Change-Id: I7f9c329ae5d610f2516e60f06b2ac96ebbeaa897 Signed-off-by: Tristan Shieh tristan.shieh@mediatek.com --- M src/soc/mediatek/common/uart.c M src/soc/mediatek/mt8183/include/soc/pll.h 2 files changed, 4 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/34191/1
diff --git a/src/soc/mediatek/common/uart.c b/src/soc/mediatek/common/uart.c index 20ec876..8905c55 100644 --- a/src/soc/mediatek/common/uart.c +++ b/src/soc/mediatek/common/uart.c @@ -20,6 +20,7 @@ #include <stdint.h>
#include <soc/addressmap.h> +#include <soc/pll.h>
struct mtk_uart { union { @@ -84,7 +85,7 @@ static void mtk_uart_init(void) { /* Use a hardcoded divisor for now. */ - const unsigned int uartclk = 26 * MHz; + const unsigned int uartclk = UART_HZ; const unsigned int baudrate = get_uart_baudrate(); const uint8_t line_config = UART8250_LCR_WLS_8; /* 8n1 */ unsigned int highspeed, quot, divisor, remainder; @@ -177,6 +178,7 @@ struct lb_serial serial; serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED; serial.baseaddr = UART0_BASE; + serial.input_hertz = UART_HZ; serial.baud = get_uart_baudrate(); serial.regwidth = 4; lb_add_serial(&serial, data); diff --git a/src/soc/mediatek/mt8183/include/soc/pll.h b/src/soc/mediatek/mt8183/include/soc/pll.h index 3807e00..5a24e75 100644 --- a/src/soc/mediatek/mt8183/include/soc/pll.h +++ b/src/soc/mediatek/mt8183/include/soc/pll.h @@ -268,6 +268,7 @@ /* top_mux rate */ enum { SPI_HZ = MAINPLL_D5_D2_HZ, + UART_HZ = CLK26M_HZ, };
enum {
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34191 )
Change subject: mediatek: Fill in input_hertz to coreboot table ......................................................................
Patch Set 1: Code-Review+2
Martin Roth has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34191 )
Change subject: mediatek: Fill in input_hertz to coreboot table ......................................................................
mediatek: Fill in input_hertz to coreboot table
Set input_hertz to 26 MHz.
BUG=b:134351649 BRANCH=none TEST=emerge-kukui coreboot; emerge-elm coreboot
Change-Id: I7f9c329ae5d610f2516e60f06b2ac96ebbeaa897 Signed-off-by: Tristan Shieh tristan.shieh@mediatek.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/34191 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Hung-Te Lin hungte@chromium.org --- M src/soc/mediatek/common/uart.c M src/soc/mediatek/mt8183/include/soc/pll.h 2 files changed, 4 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Hung-Te Lin: Looks good to me, approved
diff --git a/src/soc/mediatek/common/uart.c b/src/soc/mediatek/common/uart.c index 20ec876..8905c55 100644 --- a/src/soc/mediatek/common/uart.c +++ b/src/soc/mediatek/common/uart.c @@ -20,6 +20,7 @@ #include <stdint.h>
#include <soc/addressmap.h> +#include <soc/pll.h>
struct mtk_uart { union { @@ -84,7 +85,7 @@ static void mtk_uart_init(void) { /* Use a hardcoded divisor for now. */ - const unsigned int uartclk = 26 * MHz; + const unsigned int uartclk = UART_HZ; const unsigned int baudrate = get_uart_baudrate(); const uint8_t line_config = UART8250_LCR_WLS_8; /* 8n1 */ unsigned int highspeed, quot, divisor, remainder; @@ -177,6 +178,7 @@ struct lb_serial serial; serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED; serial.baseaddr = UART0_BASE; + serial.input_hertz = UART_HZ; serial.baud = get_uart_baudrate(); serial.regwidth = 4; lb_add_serial(&serial, data); diff --git a/src/soc/mediatek/mt8183/include/soc/pll.h b/src/soc/mediatek/mt8183/include/soc/pll.h index 3807e00..5a24e75 100644 --- a/src/soc/mediatek/mt8183/include/soc/pll.h +++ b/src/soc/mediatek/mt8183/include/soc/pll.h @@ -268,6 +268,7 @@ /* top_mux rate */ enum { SPI_HZ = MAINPLL_D5_D2_HZ, + UART_HZ = CLK26M_HZ, };
enum {