.. | .. |
---|
156 | 156 | up->dl_write(up, value); |
---|
157 | 157 | } |
---|
158 | 158 | |
---|
159 | | -static inline void serial8250_set_IER(struct uart_8250_port *up, |
---|
160 | | - unsigned char ier) |
---|
161 | | -{ |
---|
162 | | - struct uart_port *port = &up->port; |
---|
163 | | - unsigned int flags; |
---|
164 | | - bool is_console; |
---|
165 | | - |
---|
166 | | - is_console = uart_console(port); |
---|
167 | | - |
---|
168 | | - if (is_console) |
---|
169 | | - console_atomic_lock(&flags); |
---|
170 | | - |
---|
171 | | - serial_out(up, UART_IER, ier); |
---|
172 | | - |
---|
173 | | - if (is_console) |
---|
174 | | - console_atomic_unlock(flags); |
---|
175 | | -} |
---|
176 | | - |
---|
177 | | -static inline unsigned char serial8250_clear_IER(struct uart_8250_port *up) |
---|
178 | | -{ |
---|
179 | | - struct uart_port *port = &up->port; |
---|
180 | | - unsigned int clearval = 0; |
---|
181 | | - unsigned int prior; |
---|
182 | | - unsigned int flags; |
---|
183 | | - bool is_console; |
---|
184 | | - |
---|
185 | | - is_console = uart_console(port); |
---|
186 | | - |
---|
187 | | - if (up->capabilities & UART_CAP_UUE) |
---|
188 | | - clearval = UART_IER_UUE; |
---|
189 | | - |
---|
190 | | - if (is_console) |
---|
191 | | - console_atomic_lock(&flags); |
---|
192 | | - |
---|
193 | | - prior = serial_port_in(port, UART_IER); |
---|
194 | | - serial_port_out(port, UART_IER, clearval); |
---|
195 | | - |
---|
196 | | - if (is_console) |
---|
197 | | - console_atomic_unlock(flags); |
---|
198 | | - |
---|
199 | | - return prior; |
---|
200 | | -} |
---|
201 | | - |
---|
202 | 159 | static inline bool serial8250_set_THRI(struct uart_8250_port *up) |
---|
203 | 160 | { |
---|
204 | 161 | if (up->ier & UART_IER_THRI) |
---|
.. | .. |
---|
207 | 164 | #if defined(CONFIG_ARCH_ROCKCHIP) && defined(CONFIG_NO_GKI) |
---|
208 | 165 | up->ier |= UART_IER_PTIME; |
---|
209 | 166 | #endif |
---|
210 | | - serial8250_set_IER(up, up->ier); |
---|
| 167 | + serial_out(up, UART_IER, up->ier); |
---|
211 | 168 | return true; |
---|
212 | 169 | } |
---|
213 | 170 | |
---|
.. | .. |
---|
219 | 176 | #if defined(CONFIG_ARCH_ROCKCHIP) && defined(CONFIG_NO_GKI) |
---|
220 | 177 | up->ier &= ~UART_IER_PTIME; |
---|
221 | 178 | #endif |
---|
222 | | - serial8250_set_IER(up, up->ier); |
---|
| 179 | + serial_out(up, UART_IER, up->ier); |
---|
223 | 180 | return true; |
---|
224 | 181 | } |
---|
225 | 182 | |
---|