| b4121bfb | 09-Oct-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
pl011: prevent putc() and flush() function from blocking indefinitely
It may happen that trace functions are called by OP-TEE when the UART or its clock is disabled by the non-secure OS. In such a c
pl011: prevent putc() and flush() function from blocking indefinitely
It may happen that trace functions are called by OP-TEE when the UART or its clock is disabled by the non-secure OS. In such a case, flush() is likely to loop indefinitely, because the UART status register may never contain the expected value. Make the code more robust by checking if the UART is enabled in the wait loop. If it is not, or if the status bit remains zero due to the clock being turned off, return immediately. By doing so, we allow to drop some output rather than hang the whole system.
Fixes: https://github.com/OP-TEE/optee_os/issues/1863 Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 65d34b1f | 06-Jul-2017 |
Joseph Chen <chenjh@rock-chips.com> |
drivers: serial8250_uart: use 32-bit accesses to the uart registers
Due to hardware design, some platforms can't access the peripheral IO registers once a byte(8-bit) but once a word(32-bit). Obviou
drivers: serial8250_uart: use 32-bit accesses to the uart registers
Due to hardware design, some platforms can't access the peripheral IO registers once a byte(8-bit) but once a word(32-bit). Obviously, using 32-bit accesses to the registers is more flexible for other plaforms to use serial8250 uart.
Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Igor Opaniuk <igor.opaniuk@linaro.org> (serial8250_uart, TI-AM57xx)
show more ...
|