amba-pl011.c (61b7369483efb5e0a9f3b48e75fac00d46d661e0) | amba-pl011.c (fd2b55f86b8b25afc5b6e7dff53dddb3fd0dd211) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Driver for AMBA serial ports 4 * 5 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o. 6 * 7 * Copyright 1999 ARM Limited 8 * Copyright (C) 2000 Deep Blue Solutions Ltd. --- 293 unchanged lines hidden (view full) --- 302 303/* 304 * Reads up to 256 characters from the FIFO or until it's empty and 305 * inserts them into the TTY layer. Returns the number of characters 306 * read from the FIFO. 307 */ 308static int pl011_fifo_to_tty(struct uart_amba_port *uap) 309{ | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Driver for AMBA serial ports 4 * 5 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o. 6 * 7 * Copyright 1999 ARM Limited 8 * Copyright (C) 2000 Deep Blue Solutions Ltd. --- 293 unchanged lines hidden (view full) --- 302 303/* 304 * Reads up to 256 characters from the FIFO or until it's empty and 305 * inserts them into the TTY layer. Returns the number of characters 306 * read from the FIFO. 307 */ 308static int pl011_fifo_to_tty(struct uart_amba_port *uap) 309{ |
310 unsigned int ch, flag, fifotaken; | 310 unsigned int ch, fifotaken; |
311 int sysrq; 312 u16 status; | 311 int sysrq; 312 u16 status; |
313 u8 flag; |
|
313 314 for (fifotaken = 0; fifotaken != 256; fifotaken++) { 315 status = pl011_read(uap, REG_FR); 316 if (status & UART01x_FR_RXFE) 317 break; 318 319 /* Take chars from the FIFO and update status */ 320 ch = pl011_read(uap, REG_DR) | UART_DUMMY_DR_RX; --- 2706 unchanged lines hidden --- | 314 315 for (fifotaken = 0; fifotaken != 256; fifotaken++) { 316 status = pl011_read(uap, REG_FR); 317 if (status & UART01x_FR_RXFE) 318 break; 319 320 /* Take chars from the FIFO and update status */ 321 ch = pl011_read(uap, REG_DR) | UART_DUMMY_DR_RX; --- 2706 unchanged lines hidden --- |