aboutsummaryrefslogtreecommitdiff
path: root/include/serial.h
diff options
context:
space:
mode:
authorAndy Shevchenko2020-02-27 17:21:54 +0200
committerBin Meng2020-04-16 14:36:28 +0800
commitbf4661bcb0e70da975b7513006b204f01fdbc0f7 (patch)
treebc0188cc4e893b028eab74572d39615765d6d4f0 /include/serial.h
parent66b8669d7709cecedf2e0403bb17b48bab86f644 (diff)
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 'include/serial.h')
-rw-r--r--include/serial.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/serial.h b/include/serial.h
index 104f34ff914..54b21a04700 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -139,6 +139,7 @@ enum adr_space_type {
* @reg_width: size (in bytes) of the IO accesses to the registers
* @reg_offset: offset to apply to the @addr from the start of the registers
* @reg_shift: quantity to shift the register offsets by
+ * @clock: UART base clock speed in Hz
* @baudrate: baud rate
*/
struct serial_device_info {
@@ -148,10 +149,12 @@ struct serial_device_info {
u8 reg_width;
u8 reg_offset;
u8 reg_shift;
+ unsigned int clock;
unsigned int baudrate;
};
#define SERIAL_DEFAULT_ADDRESS 0xBADACCE5
+#define SERIAL_DEFAULT_CLOCK (16 * 115200)
/**
* struct struct dm_serial_ops - Driver model serial operations