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

@@ -23,6 +23,7 @@
#define ARIANE_UART_BAUDRATE 115200
#define ARIANE_UART_REG_SHIFT 2
#define ARIANE_UART_REG_WIDTH 4
#define ARIANE_UART_REG_OFFSET 0
#define ARIANE_PLIC_ADDR 0xc000000
#define ARIANE_PLIC_NUM_SOURCES 3
#define ARIANE_HART_COUNT 1
@@ -92,7 +93,8 @@ static int ariane_console_init(void)
ARIANE_UART_FREQ,
ARIANE_UART_BAUDRATE,
ARIANE_UART_REG_SHIFT,
ARIANE_UART_REG_WIDTH);
ARIANE_UART_REG_WIDTH,
ARIANE_UART_REG_OFFSET);
}
static int plic_ariane_warm_irqchip_init(int m_cntx_id, int s_cntx_id)