forked from Mirrors/opensbi
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:
@@ -91,11 +91,11 @@ static struct sbi_console_device uart8250_console = {
|
||||
};
|
||||
|
||||
int uart8250_init(unsigned long base, u32 in_freq, u32 baudrate, u32 reg_shift,
|
||||
u32 reg_width)
|
||||
u32 reg_width, u32 reg_offset)
|
||||
{
|
||||
u16 bdiv;
|
||||
|
||||
uart8250_base = (volatile char *)base;
|
||||
uart8250_base = (volatile char *)base + reg_offset;
|
||||
uart8250_reg_shift = reg_shift;
|
||||
uart8250_reg_width = reg_width;
|
||||
uart8250_in_freq = in_freq;
|
||||
|
Reference in New Issue
Block a user