drivers: serial_sifive: Skip baudrate config if no input clock
authorAtish Patra <atish.patra@wdc.com>
Mon, 25 Feb 2019 08:15:08 +0000 (08:15 +0000)
committerAndes <uboot@andestech.com>
Wed, 27 Feb 2019 01:12:33 +0000 (09:12 +0800)
commitee0633ef8b027960bd53ab62abb6f6fc25b1c66b
tree5a0c2f82bc53413bf9a5130e2839dd4089ec4c85
parenta3682008a03c0d4a58bcf62ca1e4a37187c9a8df
drivers: serial_sifive: Skip baudrate config if no input clock

It is possible that input clock is not available because clk
device was not available and 'clock-frequency' DT property is
also not available.

In this case, instead of failing we should just skip baudrate
config by returning zero.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
drivers/serial/serial_sifive.c