Lines Matching +full:zephyr +full:- +full:base
4 * SPDX-License-Identifier: Apache-2.0
7 #include <zephyr/kernel.h>
8 #include <zephyr/arch/cpu.h>
9 #include <zephyr/drivers/uart.h>
10 #include <zephyr/irq.h>
39 mem_addr_t base; member
45 const struct uart_opentitan_config *cfg = dev->config; in uart_opentitan_init()
48 sys_write32(0u, cfg->base + UART_CTRL_REG_OFFSET); in uart_opentitan_init()
52 cfg->base + UART_FIFO_CTRL_REG_OFFSET); in uart_opentitan_init()
55 sys_write32(0u, cfg->base + UART_OVRD_REG_OFFSET); in uart_opentitan_init()
56 sys_write32(0u, cfg->base + UART_TIMEOUT_CTRL_REG_OFFSET); in uart_opentitan_init()
59 sys_write32(0u, cfg->base + UART_INTR_ENABLE_REG_OFFSET); in uart_opentitan_init()
62 sys_write32(0xffffffffu, cfg->base + UART_INTR_STATE_REG_OFFSET); in uart_opentitan_init()
66 (cfg->nco_reg << UART_CTRL_NCO_OFFSET), in uart_opentitan_init()
67 cfg->base + UART_CTRL_REG_OFFSET); in uart_opentitan_init()
73 const struct uart_opentitan_config *cfg = dev->config; in uart_opentitan_poll_in()
75 if (sys_read32(cfg->base + UART_STATUS_REG_OFFSET) & UART_STATUS_RXEMPTY_BIT) { in uart_opentitan_poll_in()
77 return -1; in uart_opentitan_poll_in()
79 *c = sys_read32(cfg->base + UART_RDATA_REG_OFFSET); in uart_opentitan_poll_in()
85 const struct uart_opentitan_config *cfg = dev->config; in uart_opentitan_poll_out()
88 while (sys_read32(cfg->base + UART_STATUS_REG_OFFSET) & in uart_opentitan_poll_out()
93 sys_write32(c, cfg->base + UART_WDATA_REG_OFFSET); in uart_opentitan_poll_out()
110 .base = DT_INST_REG_ADDR(n), \