summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorZong Li <[email protected]>2022-04-15 02:24:20 +0000
committerAnup Patel <[email protected]>2022-04-17 13:57:48 +0530
commit5c5cbb53a4fd2f7d2a7038b584f8ee01266cef04 (patch)
tree6b5b44ba31b880503dc722bd2a707b0d8b14e1f4 /include
parent3383d6a4d1461bb029b21fa53417382e34ae4906 (diff)
lib: utils/serial: support 'reg-offset' property
reg-offset property is used for offset to apply to the mapbase from the start of the registers in 8250 UART. In Linux kernel, it has been handled in 8250 UART driver. dt-bindings: <linux>/Documentation/devicetree/bindings/serial/8250.yaml Signed-off-by: Zong Li <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/sbi_utils/fdt/fdt_helper.h1
-rw-r--r--include/sbi_utils/serial/uart8250.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h
index 41ee826f..2279f96f 100644
--- a/include/sbi_utils/fdt/fdt_helper.h
+++ b/include/sbi_utils/fdt/fdt_helper.h
@@ -31,6 +31,7 @@ struct platform_uart_data {
unsigned long baud;
unsigned long reg_shift;
unsigned long reg_io_width;
+ unsigned long reg_offset;
};
const struct fdt_match *fdt_match_node(void *fdt, int nodeoff,
diff --git a/include/sbi_utils/serial/uart8250.h b/include/sbi_utils/serial/uart8250.h
index 6b9b48b0..d4a8c136 100644
--- a/include/sbi_utils/serial/uart8250.h
+++ b/include/sbi_utils/serial/uart8250.h
@@ -13,6 +13,6 @@
#include <sbi/sbi_types.h>
int uart8250_init(unsigned long base, u32 in_freq, u32 baudrate, u32 reg_shift,
- u32 reg_width);
+ u32 reg_width, u32 reg_offset);
#endif