-
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: BCM63XX: add low-level UART debug support
Broadcom BCM63xx DSL SoCs have a different UART implementation for which we need specially crafted low-level debug assembly code to support. Add support for this using the standard definitions provided in include/linux/serial_bcm63xx.h (shared with their MIPS counterparts). Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
- Loading branch information
Florian Fainelli
committed
Sep 17, 2014
1 parent
dc6aec6
commit b51312b
Showing
2 changed files
with
49 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,33 @@ | ||
/* | ||
* Broadcom BCM63xx low-level UART debug | ||
* | ||
* Copyright (C) 2014 Broadcom Corporation | ||
* | ||
* 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. | ||
*/ | ||
|
||
#include <linux/serial_bcm63xx.h> | ||
|
||
.macro addruart, rp, rv, tmp | ||
ldr \rp, =CONFIG_DEBUG_UART_PHYS | ||
ldr \rv, =CONFIG_DEBUG_UART_VIRT | ||
.endm | ||
|
||
.macro senduart, rd, rx | ||
/* word access do not work */ | ||
strb \rd, [\rx, #UART_FIFO_REG] | ||
.endm | ||
|
||
.macro waituart, rd, rx | ||
1001: ldr \rd, [\rx, #UART_IR_REG] | ||
tst \rd, #(1 << UART_IR_TXEMPTY) | ||
beq 1001b | ||
.endm | ||
|
||
.macro busyuart, rd, rx | ||
1002: ldr \rd, [\rx, #UART_IR_REG] | ||
tst \rd, #(1 << UART_IR_TXTRESH) | ||
beq 1002b | ||
.endm |