From bf4661bcb0e70da975b7513006b204f01fdbc0f7 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 27 Feb 2020 17:21:54 +0200 Subject: 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 Reviewed-by: Simon Glass Reviewed-by: Bin Meng --- test/dm/serial.c | 1 + 1 file changed, 1 insertion(+) (limited to 'test/dm/serial.c') diff --git a/test/dm/serial.c b/test/dm/serial.c index 3d741a8c363..c6be6ab7abd 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 */ -- cgit v1.2.3