Lines Matching full:up
17 static int rsa8250_request_resource(struct uart_8250_port *up) in rsa8250_request_resource() argument
19 struct uart_port *port = &up->port; in rsa8250_request_resource()
35 static void rsa8250_release_resource(struct uart_8250_port *up) in rsa8250_release_resource() argument
37 struct uart_port *port = &up->port; in rsa8250_release_resource()
53 struct uart_8250_port *up = up_to_u8250p(port); in univ8250_config_port() local
56 up->probe &= ~UART_PROBE_RSA; in univ8250_config_port()
58 if (rsa8250_request_resource(up) == 0) in univ8250_config_port()
59 up->probe |= UART_PROBE_RSA; in univ8250_config_port()
62 if (probe_rsa[i] == up->port.iobase) { in univ8250_config_port()
63 if (rsa8250_request_resource(up) == 0) in univ8250_config_port()
64 up->probe |= UART_PROBE_RSA; in univ8250_config_port()
72 if (port->type != PORT_RSA && up->probe & UART_PROBE_RSA) in univ8250_config_port()
73 rsa8250_release_resource(up); in univ8250_config_port()
78 struct uart_8250_port *up = up_to_u8250p(port); in univ8250_request_port() local
83 ret = rsa8250_request_resource(up); in univ8250_request_port()
93 struct uart_8250_port *up = up_to_u8250p(port); in univ8250_release_port() local
96 rsa8250_release_resource(up); in univ8250_release_port()
114 static int __rsa_enable(struct uart_8250_port *up) in __rsa_enable() argument
119 mode = serial_in(up, UART_RSA_MSR); in __rsa_enable()
123 serial_out(up, UART_RSA_MSR, mode | UART_RSA_MSR_FIFO); in __rsa_enable()
124 mode = serial_in(up, UART_RSA_MSR); in __rsa_enable()
129 up->port.uartclk = SERIAL_RSA_BAUD_BASE * 16; in __rsa_enable()
135 * If this is an RSA port, see if we can kick it up to the higher speed clock.
137 void rsa_enable(struct uart_8250_port *up) in rsa_enable() argument
139 if (up->port.type != PORT_RSA) in rsa_enable()
142 if (up->port.uartclk != SERIAL_RSA_BAUD_BASE * 16) { in rsa_enable()
143 uart_port_lock_irq(&up->port); in rsa_enable()
144 __rsa_enable(up); in rsa_enable()
145 uart_port_unlock_irq(&up->port); in rsa_enable()
147 if (up->port.uartclk == SERIAL_RSA_BAUD_BASE * 16) in rsa_enable()
148 serial_out(up, UART_RSA_FRR, 0); in rsa_enable()
157 void rsa_disable(struct uart_8250_port *up) in rsa_disable() argument
162 if (up->port.type != PORT_RSA) in rsa_disable()
165 if (up->port.uartclk != SERIAL_RSA_BAUD_BASE * 16) in rsa_disable()
168 uart_port_lock_irq(&up->port); in rsa_disable()
169 mode = serial_in(up, UART_RSA_MSR); in rsa_disable()
173 serial_out(up, UART_RSA_MSR, mode & ~UART_RSA_MSR_FIFO); in rsa_disable()
174 mode = serial_in(up, UART_RSA_MSR); in rsa_disable()
179 up->port.uartclk = SERIAL_RSA_BAUD_BASE_LO * 16; in rsa_disable()
180 uart_port_unlock_irq(&up->port); in rsa_disable()
184 void rsa_autoconfig(struct uart_8250_port *up) in rsa_autoconfig() argument
187 if (up->port.type != PORT_16550A) in rsa_autoconfig()
189 if (!(up->probe & UART_PROBE_RSA)) in rsa_autoconfig()
192 if (__rsa_enable(up)) in rsa_autoconfig()
193 up->port.type = PORT_RSA; in rsa_autoconfig()
197 void rsa_reset(struct uart_8250_port *up) in rsa_reset() argument
199 if (up->port.type != PORT_RSA) in rsa_reset()
202 serial_out(up, UART_RSA_FRR, 0); in rsa_reset()