summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-02-27 18:21:54 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-04-16 09:36:28 +0300
commitbf4661bcb0e70da975b7513006b204f01fdbc0f7 (patch)
treebc0188cc4e893b028eab74572d39615765d6d4f0 /test
parent66b8669d7709cecedf2e0403bb17b48bab86f644 (diff)
downloadu-boot-bf4661bcb0e70da975b7513006b204f01fdbc0f7.tar.xz
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>
Diffstat (limited to 'test')
-rw-r--r--test/dm/serial.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/dm/serial.c b/test/dm/serial.c
index 3d741a8c36..c6be6ab7ab 100644
--- a/test/dm/serial.c
+++ b/test/dm/serial.c
@@ -29,6 +29,7 @@ static int dm_test_serial(struct unit_test_state *uts)
ut_assertok(serial_getinfo(dev_serial, &info_serial));
ut_assert(info_serial.type == SERIAL_CHIP_UNKNOWN);
ut_assert(info_serial.addr == SERIAL_DEFAULT_ADDRESS);
+ ut_assert(info_serial.clock == SERIAL_DEFAULT_CLOCK);
/*
* test with a parameter which is NULL pointer
*/