riscv: Fix sifive serial driver
authorDamien Le Moal <damien.lemoal@wdc.com>
Sun, 13 Dec 2020 13:50:35 +0000 (22:50 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2021 10:47:43 +0000 (11:47 +0100)
commitb1b943f5b65e374df982d9d37bfdddcb4870372f
tree25d104f1258cef63698a97811a3b7d11f390eaca
parentcd0c46821aa5bbc3f2f2a09a68b9adc647fb4167
riscv: Fix sifive serial driver

[ Upstream commit 1f1496a923b6ba16679074fe77100e1b53cdb880 ]

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>
drivers/tty/serial/sifive.c