serial: ns16550: Provide UART base clock speed in ->getinfo()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 27 Feb 2020 15:21:55 +0000 (17:21 +0200)
committerBin Meng <bmeng.cn@gmail.com>
Thu, 16 Apr 2020 06:36:28 +0000 (14:36 +0800)
Some callers may need the UART base clock speed value.
Provide it in the ->getinfo() callback.

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

index a2f1b356295ddd42bb30352d8d9d6ab34cfa3012..6415d2e1e552e18cb03b8240a3d999b9268dec01 100644 (file)
@@ -476,6 +476,8 @@ static int ns16550_serial_getinfo(struct udevice *dev,
        info->reg_width = plat->reg_width;
        info->reg_shift = plat->reg_shift;
        info->reg_offset = plat->reg_offset;
+       info->clock = plat->clock;
+
        return 0;
 }