forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM: digicolor: add low level debug support
Use the USART peripheral as UART for low level debug. Only the UA0 port is currently supported. Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Baruch Siach <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
- Loading branch information
1 parent
df8d742
commit e23814d
Showing
2 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Debugging macro include header for Conexant Digicolor USART | ||
* | ||
* Copyright (C) 2014 Paradox Innovation Ltd. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* | ||
*/ | ||
|
||
#define UA0_STATUS 0x0742 | ||
#define UA0_EMI_REC 0x0744 | ||
|
||
#define UA0_STATUS_TX_READY 0x40 | ||
|
||
#ifdef CONFIG_DEBUG_UART_PHYS | ||
.macro addruart, rp, rv, tmp | ||
ldr \rp, =CONFIG_DEBUG_UART_PHYS | ||
ldr \rv, =CONFIG_DEBUG_UART_VIRT | ||
.endm | ||
#endif | ||
|
||
.macro senduart,rd,rx | ||
strb \rd, [\rx, #UA0_EMI_REC] | ||
.endm | ||
|
||
.macro waituart,rd,rx | ||
.endm | ||
|
||
.macro busyuart,rd,rx | ||
1001: ldrb \rd, [\rx, #UA0_STATUS] | ||
tst \rd, #UA0_STATUS_TX_READY | ||
beq 1001b | ||
.endm |