diff options
author | Jun Nie <jun.nie@linaro.org> | 2018-08-23 23:53:07 +0800 |
---|---|---|
committer | Jun Nie <jun.nie@linaro.org> | 2018-08-24 00:23:03 +0800 |
commit | b9c9a6f5c3325905f31de11647ce111e607e3481 (patch) | |
tree | 11810301e36ca52f20baf27dcc54559d7fe07d50 /drivers/nxp | |
parent | 215c703dda923d1ae82d79d3469f2c727686ef94 (diff) |
warp7: Fix unprotected reg in serial driver
warp7: Fix unprotected reg in serial driver. R7 is used without
protection in current code and result various peculiar bugs.
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Diffstat (limited to 'drivers/nxp')
-rw-r--r-- | drivers/nxp/uart/nxp_console.S | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/nxp/uart/nxp_console.S b/drivers/nxp/uart/nxp_console.S index 22baa87..995c0bc 100644 --- a/drivers/nxp/uart/nxp_console.S +++ b/drivers/nxp/uart/nxp_console.S @@ -184,7 +184,7 @@ endfunc console_putc * In : r0 - character to be printed * r1 - console base address * Out : return -1 on error else return character. - * Clobber list : r2, r7 + * Clobber list : r2 * -------------------------------------------------------- */ func console_core_putc @@ -197,8 +197,8 @@ func console_core_putc /* Wait for transmit MXC_UART_STAT2_OFFSET.MXC_UART_STAT2_TXDC == 1 */ __putc_spin_ready: - ldr r7, [r1, #MXC_UART_STAT2_OFFSET] - ands r7, #MXC_UART_STAT2_TXDC + ldr r2, [r1, #MXC_UART_STAT2_OFFSET] + ands r2, #MXC_UART_STAT2_TXDC beq __putc_spin_ready /* Transmit complete do we need to fixup \n to \n\r */ |