Lines Matching refs:get_uart

73 	get_uart(dev)->cr |=  PL011_CR_UARTEN;  in pl011_enable()
78 get_uart(dev)->cr &= ~PL011_CR_UARTEN; in pl011_disable()
83 get_uart(dev)->lcr_h |= PL011_LCRH_FEN; in pl011_enable_fifo()
88 get_uart(dev)->lcr_h &= ~PL011_LCRH_FEN; in pl011_disable_fifo()
94 get_uart(dev)->cr |= PL011_CR_RTSEn; in pl011_set_flow_control()
96 get_uart(dev)->cr &= ~PL011_CR_RTSEn; in pl011_set_flow_control()
99 get_uart(dev)->cr |= PL011_CR_CTSEn; in pl011_set_flow_control()
101 get_uart(dev)->cr &= ~PL011_CR_CTSEn; in pl011_set_flow_control()
121 get_uart(dev)->ibrd = bauddiv >> PL011_FBRD_WIDTH; in pl011_set_baudrate()
122 get_uart(dev)->fbrd = bauddiv & ((1u << PL011_FBRD_WIDTH) - 1u); in pl011_set_baudrate()
130 get_uart(dev)->lcr_h = get_uart(dev)->lcr_h; in pl011_set_baudrate()
140 (!(get_uart(dev)->cr & PL011_CR_UARTEN) || !(get_uart(dev)->cr & PL011_CR_RXE))) { in pl011_is_readable()
144 return (get_uart(dev)->fr & PL011_FR_RXFE) == 0U; in pl011_is_readable()
154 *c = (unsigned char)get_uart(dev)->dr; in pl011_poll_in()
156 return get_uart(dev)->rsr & PL011_RSR_ERROR_MASK; in pl011_poll_in()
163 while (get_uart(dev)->fr & PL011_FR_TXFF) { in pl011_poll_out()
168 get_uart(dev)->dr = (uint32_t)c; in pl011_poll_out()
175 if (get_uart(dev)->rsr & PL011_RSR_ECR_OE) { in pl011_err_check()
179 if (get_uart(dev)->rsr & PL011_RSR_ECR_BE) { in pl011_err_check()
183 if (get_uart(dev)->rsr & PL011_RSR_ECR_PE) { in pl011_err_check()
187 if (get_uart(dev)->rsr & PL011_RSR_ECR_FE) { in pl011_err_check()
211 lcrh = get_uart(dev)->lcr_h & ~(PL011_LCRH_FORMAT_MASK | PL011_LCRH_STP2); in pl011_runtime_configure_internal()
273 get_uart(dev)->lcr_h = lcrh; in pl011_runtime_configure_internal()
312 while (!(get_uart(dev)->fr & PL011_FR_TXFF) && (len - num_tx > 0)) { in pl011_fifo_fill()
313 get_uart(dev)->dr = tx_data[num_tx++]; in pl011_fifo_fill()
323 while ((len - num_rx > 0) && !(get_uart(dev)->fr & PL011_FR_RXFE)) { in pl011_fifo_read()
324 rx_data[num_rx++] = get_uart(dev)->dr; in pl011_fifo_read()
334 get_uart(dev)->imsc |= PL011_IMSC_TXIM; in pl011_irq_tx_enable()
358 get_uart(dev)->imsc &= ~PL011_IMSC_TXIM; in pl011_irq_tx_disable()
364 return ((get_uart(dev)->fr & PL011_FR_BUSY) == 0); in pl011_irq_tx_complete()
371 if (!data->sbsa && !(get_uart(dev)->cr & PL011_CR_TXE)) in pl011_irq_tx_ready()
374 return ((get_uart(dev)->imsc & PL011_IMSC_TXIM) && in pl011_irq_tx_ready()
376 (get_uart(dev)->ris & PL011_RIS_TXRIS || get_uart(dev)->fr & PL011_FR_TXFE)); in pl011_irq_tx_ready()
381 get_uart(dev)->imsc |= PL011_IMSC_RXIM | PL011_IMSC_RTIM; in pl011_irq_rx_enable()
386 get_uart(dev)->imsc &= ~(PL011_IMSC_RXIM | PL011_IMSC_RTIM); in pl011_irq_rx_disable()
393 if (!data->sbsa && !(get_uart(dev)->cr & PL011_CR_RXE)) in pl011_irq_rx_ready()
396 return ((get_uart(dev)->imsc & PL011_IMSC_RXIM) && in pl011_irq_rx_ready()
397 (!(get_uart(dev)->fr & PL011_FR_RXFE))); in pl011_irq_rx_ready()
403 get_uart(dev)->imsc |= PL011_IMSC_ERROR_MASK; in pl011_irq_err_enable()
408 get_uart(dev)->imsc &= ~PL011_IMSC_ERROR_MASK; in pl011_irq_err_disable()
514 get_uart(dev)->ifls = FIELD_PREP(PL011_IFLS_TXIFLSEL_M, TXIFLSEL_1_8_FULL) in pl011_init()
521 get_uart(dev)->imsc = 0U; in pl011_init()
522 get_uart(dev)->icr = PL011_IMSC_MASK_ALL; in pl011_init()
525 get_uart(dev)->dmacr = 0U; in pl011_init()
527 get_uart(dev)->cr &= ~PL011_CR_SIREN; in pl011_init()
528 get_uart(dev)->cr |= PL011_CR_RXE | PL011_CR_TXE; in pl011_init()