Lines Matching refs:base
66 return io_pa_or_va(&pd->base, HI16XX_UART_REG_SIZE); in chip_to_base()
71 vaddr_t base = chip_to_base(chip); in hi16xx_uart_flush() local
73 while (!(io_read32(base + UART_USR) & UART_USR_TFE_BIT)) in hi16xx_uart_flush()
79 vaddr_t base = chip_to_base(chip); in hi16xx_uart_putc() local
82 while (!(io_read32(base + UART_USR) & UART_USR_TFE_BIT)) in hi16xx_uart_putc()
86 io_write32(base + UART_THR, ch & 0xFF); in hi16xx_uart_putc()
91 vaddr_t base = chip_to_base(chip); in hi16xx_uart_have_rx_data() local
93 return (io_read32(base + UART_USR) & UART_USR_RFNE_BIT); in hi16xx_uart_have_rx_data()
98 vaddr_t base = chip_to_base(chip); in hi16xx_uart_getchar() local
102 return io_read32(base + UART_RBR) & 0xFF; in hi16xx_uart_getchar()
113 void hi16xx_uart_init(struct hi16xx_uart_data *pd, paddr_t base, in hi16xx_uart_init() argument
118 pd->base.pa = base; in hi16xx_uart_init()
122 io_write32(base + UART_FCR, UART_FCR_FIFO_EN); in hi16xx_uart_init()
125 io_write32(base + UART_LCR, UART_LCR_DLAB); in hi16xx_uart_init()
128 io_write32(base + UART_DLL, freq_div & 0xFF); in hi16xx_uart_init()
131 io_write32(base + UART_DLH, (freq_div >> 8) & 0xFF); in hi16xx_uart_init()
134 io_write32(base + UART_LCR, UART_LCR_DLS8); in hi16xx_uart_init()
137 io_write32(base + UART_IEL, 0); in hi16xx_uart_init()