sc7180: Remove QcLib specific changes from CB UART
To achieve 115200 baudrate QcLib reconfigures UART frequency with the lowest supported frequency from QUP clock table. With this console logs were getting corrupted at qclib stage. In ChromeOS coreboot, baudrate is configuarable using Kconfig. QcLib should not assume the baudrate and reconfigure any UART register once after the configuration is done in coreboot. To fix the issue QcLib done the changes to not to reconfigure any UART registers. Hence clock_configure_qup() is not required in coreboot UART driver. Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org> Change-Id: I2531b64eddfa6e877f769af0d17be61f5e4d0c35 Reviewed-on: https://review.coreboot.org/c/coreboot/+/42095 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
parent
308540de80
commit
dcf80ab025
|
@ -54,10 +54,7 @@ void qupv3_se_fw_load_and_init(unsigned int bus, unsigned int protocol,
|
|||
|
||||
|
||||
/* HPG section 3.1.7.1 */
|
||||
if (protocol == SE_PROTOCOL_UART) {
|
||||
/* To maintain Div=4 for QcLib, configure clock to 7372800Hz for sc7180 */
|
||||
clock_configure_qup(bus, QUPV3_UART_SRC_HZ);
|
||||
} else {
|
||||
if (protocol != SE_PROTOCOL_UART) {
|
||||
setbits_le32(®s->geni_dfs_if_cfg,
|
||||
GENI_DFS_IF_CFG_DFS_IF_EN_BMSK);
|
||||
/* configure clock dfsr */
|
||||
|
|
|
@ -71,7 +71,7 @@ void uart_init(unsigned int idx)
|
|||
/* sc7180 requires 16 clock pulses to sample 1 bit of data */
|
||||
uart_freq = baud_rate * 16;
|
||||
|
||||
div = DIV_ROUND_CLOSEST(QUPV3_UART_SRC_HZ, uart_freq);
|
||||
div = DIV_ROUND_CLOSEST(SRC_XO_HZ, uart_freq);
|
||||
write32(®s->geni_ser_m_clk_cfg, (div << 4) | 1);
|
||||
write32(®s->geni_ser_s_clk_cfg, (div << 4) | 1);
|
||||
|
||||
|
@ -147,7 +147,7 @@ void uart_fill_lb(void *data)
|
|||
serial.baseaddr = (uint32_t)uart_platform_base(CONFIG_UART_FOR_CONSOLE);
|
||||
serial.baud = get_uart_baudrate();
|
||||
serial.regwidth = 4;
|
||||
serial.input_hertz = QUPV3_UART_SRC_HZ;
|
||||
serial.input_hertz = SRC_XO_HZ;
|
||||
|
||||
lb_add_serial(&serial, data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue