dm: serial: Add clock member to struct serial_device_info

Some callers of serial_getinfo() would like to know the UART base
clock speed in order to make decision what to pass to OS in some
cases. In particular, ACPI SPCR table expects only certain base
clock speed and thus we have to act accordingly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Andy Shevchenko
2020-02-27 17:21:54 +02:00
committed by Bin Meng
parent 66b8669d77
commit bf4661bcb0
3 changed files with 5 additions and 0 deletions

View File

@@ -198,6 +198,7 @@ static int sandbox_serial_getinfo(struct udevice *dev,
.reg_width = 1,
.reg_offset = 0,
.reg_shift = 0,
.clock = SERIAL_DEFAULT_CLOCK,
};
if (!serial_info)