Skip to content

Commit 094a4af

Browse files
damien-lemoalgregkh
authored andcommitted
riscv: Fix sifive serial driver
[ Upstream commit 1f1496a ] Setup the port uartclk in sifive_serial_probe() so that the base baud rate is correctly printed during device probe instead of always showing "0". I.e. the probe message is changed from 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 0) is a SiFive UART v0 to the correct: 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0 Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com> Acked-by: Palmer Dabbelt <palmerdabbelt@google.com> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c47d249 commit 094a4af

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎drivers/tty/serial/sifive.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,7 @@ static int sifive_serial_probe(struct platform_device *pdev)
999999
/* Set up clock divider */
10001000
ssp->clkin_rate = clk_get_rate(ssp->clk);
10011001
ssp->baud_rate = SIFIVE_DEFAULT_BAUD_RATE;
1002+
ssp->port.uartclk = ssp->baud_rate * 16;
10021003
__ssp_update_div(ssp);
10031004

10041005
platform_set_drvdata(pdev, ssp);

0 commit comments

Comments
 (0)