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 <zong.li@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Zong Li
2022-04-15 02:24:20 +00:00
committed by Anup Patel
parent 3383d6a4d1
commit 5c5cbb53a4
10 changed files with 23 additions and 8 deletions

View File

@@ -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,

View File

@@ -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