Lines Matching refs:uart_dev

33     struct rt_uart_mipssim *uart_dev = RT_NULL;  in mipssim_uart_configure()  local
38 uart_dev = (struct rt_uart_mipssim *)serial->parent.user_data; in mipssim_uart_configure()
40 UART_IER(uart_dev->base) = 0; /* clear interrupt */ in mipssim_uart_configure()
41 UART_FCR(uart_dev->base) = 0xc1; /* reset UART Rx/Tx */ in mipssim_uart_configure()
43 UART_LCR(uart_dev->base) = 0x3; in mipssim_uart_configure()
44 UART_MCR(uart_dev->base) = 0x3; in mipssim_uart_configure()
45 UART_LSR(uart_dev->base) = 0x60; in mipssim_uart_configure()
46 UART_MSR(uart_dev->base) = 0xb0; in mipssim_uart_configure()
53 struct rt_uart_mipssim *uart_dev = RT_NULL; in mipssim_uart_control() local
56 uart_dev = (struct rt_uart_mipssim *)serial->parent.user_data; in mipssim_uart_control()
61 rt_hw_interrupt_mask(uart_dev->IRQ); in mipssim_uart_control()
65 rt_hw_interrupt_umask(uart_dev->IRQ); in mipssim_uart_control()
66 UART_IER(uart_dev->base) |= (IER_IRxE|IER_ILE); in mipssim_uart_control()
77 static rt_bool_t uart_is_transmit_empty(struct rt_uart_mipssim *uart_dev) in uart_is_transmit_empty() argument
79 unsigned char status = UART_LSR(uart_dev->base); in uart_is_transmit_empty()
93 struct rt_uart_mipssim *uart_dev = RT_NULL; in mipssim_uart_putc() local
97 uart_dev = (struct rt_uart_mipssim *)serial->parent.user_data; in mipssim_uart_putc()
99 while (FALSE == uart_is_transmit_empty(uart_dev)) in mipssim_uart_putc()
102 UART_DAT(uart_dev->base) = c; in mipssim_uart_putc()
109 struct rt_uart_mipssim *uart_dev = RT_NULL; in mipssim_uart_getc() local
113 uart_dev = (struct rt_uart_mipssim *)serial->parent.user_data; in mipssim_uart_getc()
115 if (LSR_RXRDY & UART_LSR(uart_dev->base)) in mipssim_uart_getc()
117 return UART_DAT(uart_dev->base); in mipssim_uart_getc()
127 struct rt_uart_mipssim *uart_dev = RT_NULL; in uart_irq_handler() local
131 uart_dev = (struct rt_uart_mipssim *)serial->parent.user_data; in uart_irq_handler()
132 unsigned char iir = UART_IIR(uart_dev->base); in uart_irq_handler()