Lines Matching full:up

115 static inline int serial_in(struct uart_8250_port *up, int offset)  in serial_in()  argument
117 return up->port.serial_in(&up->port, offset); in serial_in()
120 static inline void serial_out(struct uart_8250_port *up, int offset, int value) in serial_out() argument
122 up->port.serial_out(&up->port, offset, value); in serial_out()
127 * @up: uart 8250 port
131 * up->lsr_saved_flags.
135 static inline u16 serial_lsr_in(struct uart_8250_port *up) in serial_lsr_in() argument
137 u16 lsr = up->lsr_saved_flags; in serial_lsr_in()
139 lsr |= serial_in(up, UART_LSR); in serial_lsr_in()
140 up->lsr_saved_flags = lsr & up->lsr_save_mask; in serial_lsr_in()
148 static void serial_icr_write(struct uart_8250_port *up, int offset, int value) in serial_icr_write() argument
150 serial_out(up, UART_SCR, offset); in serial_icr_write()
151 serial_out(up, UART_ICR, value); in serial_icr_write()
154 static unsigned int __maybe_unused serial_icr_read(struct uart_8250_port *up, in serial_icr_read() argument
159 serial_icr_write(up, UART_ACR, up->acr | UART_ACR_ICRRD); in serial_icr_read()
160 serial_out(up, UART_SCR, offset); in serial_icr_read()
161 value = serial_in(up, UART_ICR); in serial_icr_read()
162 serial_icr_write(up, UART_ACR, up->acr); in serial_icr_read()
169 static inline u32 serial_dl_read(struct uart_8250_port *up) in serial_dl_read() argument
171 return up->dl_read(up); in serial_dl_read()
174 static inline void serial_dl_write(struct uart_8250_port *up, u32 value) in serial_dl_write() argument
176 up->dl_write(up, value); in serial_dl_write()
179 static inline bool serial8250_set_THRI(struct uart_8250_port *up) in serial8250_set_THRI() argument
182 lockdep_assert_held_once(&up->port.lock); in serial8250_set_THRI()
184 if (up->ier & UART_IER_THRI) in serial8250_set_THRI()
186 up->ier |= UART_IER_THRI; in serial8250_set_THRI()
187 serial_out(up, UART_IER, up->ier); in serial8250_set_THRI()
191 static inline bool serial8250_clear_THRI(struct uart_8250_port *up) in serial8250_clear_THRI() argument
194 lockdep_assert_held_once(&up->port.lock); in serial8250_clear_THRI()
196 if (!(up->ier & UART_IER_THRI)) in serial8250_clear_THRI()
198 up->ier &= ~UART_IER_THRI; in serial8250_clear_THRI()
199 serial_out(up, UART_IER, up->ier); in serial8250_clear_THRI()
272 static inline void serial8250_out_MCR(struct uart_8250_port *up, int value) in serial8250_out_MCR() argument
274 serial_out(up, UART_MCR, value); in serial8250_out_MCR()
276 if (up->gpios) in serial8250_out_MCR()
277 mctrl_gpio_set(up->gpios, serial8250_MCR_to_TIOCM(value)); in serial8250_out_MCR()
280 static inline int serial8250_in_MCR(struct uart_8250_port *up) in serial8250_in_MCR() argument
284 mctrl = serial_in(up, UART_MCR); in serial8250_in_MCR()
286 if (up->gpios) { in serial8250_in_MCR()
289 mctrl_gpio = mctrl_gpio_get_outputs(up->gpios, &mctrl_gpio); in serial8250_in_MCR()
402 static inline int ns16550a_goto_highspeed(struct uart_8250_port *up) in ns16550a_goto_highspeed() argument
406 status = serial_in(up, 0x04); /* EXCR2 */ in ns16550a_goto_highspeed()
414 serial_out(up, 0x04, status); in ns16550a_goto_highspeed()