Skip to content

Commit

Permalink
ARM: add an extra temp register to the low level debugging addruart m…
Browse files Browse the repository at this point in the history
…acro

Some platforms (like OMAP not to name it) are doing rather complicated
hacks just to determine the base UART address to use.  Let's give their
addruart macro some slack by providing an extra work register which will
allow for much needed cleanups.

This is basically a no-op as this commit is only adding the extra argument
to the macro but no one is using it yet.

Signed-off-by: nicolas Pitre <nicolas.pitre@linaro.org>
Reviewed-by: Kevin Hilman <khilman@ti.com>
  • Loading branch information
Nicolas Pitre authored and Nicolas Pitre committed Sep 26, 2011
1 parent 57c8970 commit 639da5e
Show file tree
Hide file tree
Showing 55 changed files with 58 additions and 58 deletions.
4 changes: 2 additions & 2 deletions arch/arm/kernel/debug.S
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#if defined(CONFIG_DEBUG_ICEDCC)
@@ debug using ARM EmbeddedICE DCC channel

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
.endm

#if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K) || defined(CONFIG_CPU_V7)
Expand Down Expand Up @@ -106,7 +106,7 @@

#ifdef CONFIG_MMU
.macro addruart_current, rx, tmp1, tmp2
addruart \tmp1, \tmp2
addruart \tmp1, \tmp2, \rx
mrc p15, 0, \rx, c1, c0
tst \rx, #1
moveq \rx, \tmp1
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ __create_page_tables:
* This allows debug messages to be output
* via a serial console before paging_init.
*/
addruart r7, r3
addruart r7, r3, r0

mov r3, r3, lsr #20
mov r3, r3, lsl #2
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <mach/hardware.h>
#include <mach/at91_dbgu.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =(AT91_BASE_SYS + AT91_DBGU) @ System peripherals (phys address)
ldr \rv, =(AT91_VA_BASE_SYS + AT91_DBGU) @ System peripherals (virt address)
.endm
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-clps711x/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <mach/hardware.h>
#include <asm/hardware/clps7111.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
#ifndef CONFIG_DEBUG_CLPS711X_UART2
mov \rp, #0x0000 @ UART1
#else
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-cns3xxx/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* published by the Free Software Foundation.
*/

.macro addruart,rp,rv
.macro addruart,rp,rv,tmp
mov \rp, #0x00009000
orr \rv, \rp, #0xf0000000 @ virtual base
orr \rp, \rp, #0x10000000
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-davinci/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ davinci_uart_phys: .word 0
davinci_uart_virt: .word 0
.popsection

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp

/* Use davinci_uart_phys/virt if already configured */
10: mrc p15, 0, \rp, c1, c0
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-dove/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <mach/bridge-regs.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =DOVE_SB_REGS_PHYS_BASE
ldr \rv, =DOVE_SB_REGS_VIRT_BASE
orr \rp, \rp, #0x00012000
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ebsa110/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
**/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0xf0000000
orr \rp, \rp, #0x00000be0
mov \rp, \rv
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ep93xx/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
#include <mach/ep93xx-regs.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =EP93XX_APB_PHYS_BASE @ Physical base
ldr \rv, =EP93XX_APB_VIRT_BASE @ virtual base
orr \rp, \rp, #0x000c0000
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-exynos4/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* aligned and add in the offset when we load the value here.
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, = S3C_PA_UART
ldr \rv, = S3C_VA_UART
#if CONFIG_DEBUG_S3C_UART != 0
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-footbridge/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#ifndef CONFIG_DEBUG_DC21285_PORT
/* For NetWinder debugging */
.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x000003f8
orr \rv, \rp, #0xff000000 @ virtual
orr \rp, \rp, #0x7c000000 @ physical
Expand All @@ -31,7 +31,7 @@
.equ dc21285_high, ARMCSR_BASE & 0xff000000
.equ dc21285_low, ARMCSR_BASE & 0x00ffffff

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
.if dc21285_low
mov \rp, #dc21285_low
.else
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-gemini/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
#include <mach/hardware.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =GEMINI_UART_BASE @ physical
ldr \rv, =IO_ADDRESS(GEMINI_UART_BASE) @ virtual
.endm
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-h720x/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.equ io_virt, IO_VIRT
.equ io_phys, IO_PHYS

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x00020000 @ UART1
add \rv, \rp, #io_virt @ virtual address
add \rp, \rp, #io_phys @ physical base address
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-integrator/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x16000000 @ physical base address
mov \rv, #0xf0000000 @ virtual base
add \rv, \rv, #0x16000000 >> 4
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-iop13xx/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* published by the Free Software Foundation.
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x00002300
orr \rp, \rp, #0x00000040
orr \rv, \rp, #0xfe000000 @ virtual
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-iop32x/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* published by the Free Software Foundation.
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0xfe000000 @ physical as well as virtual
orr \rp, \rp, #0x00800000 @ location of the UART
mov \rv, \rp
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-iop33x/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* published by the Free Software Foundation.
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x00ff0000
orr \rp, \rp, #0x0000f700
orr \rv, #0xfe000000 @ virtual
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ixp2000/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x00030000
#ifdef __ARMEB__
orr \rp, \rp, #0x00000003
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ixp23xx/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
#include <mach/ixp23xx.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =IXP23XX_PERIPHERAL_PHYS @ physical
ldr \rv, =IXP23XX_PERIPHERAL_VIRT @ virtual
#ifdef __ARMEB__
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ixp4xx/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* published by the Free Software Foundation.
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
#ifdef __ARMEB__
mov \rp, #3 @ Uart regs are at off set of 3 if
@ byte writes used - Big Endian.
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-kirkwood/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <mach/bridge-regs.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =KIRKWOOD_REGS_PHYS_BASE
ldr \rv, =KIRKWOOD_REGS_VIRT_BASE
orr \rp, \rp, #0x00012000
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-ks8695/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <mach/hardware.h>
#include <mach/regs-uart.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =KS8695_UART_PA @ physical base address
ldr \rv, =KS8695_UART_VA @ virtual base address
.endm
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-l7200/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.equ io_virt, IO_BASE
.equ io_phys, IO_START

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x00044000 @ UART1
@ mov \rp, #0x00045000 @ UART2
add \rv, \rp, #io_virt @ virtual address
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-lpc32xx/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Debug output is hardcoded to standard UART 5
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldreq \rp, =0x40090000
ldrne \rv, =0xF4090000
.endm
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-mmp/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <mach/addr-map.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =APB_PHYS_BASE @ physical
ldr \rv, =APB_VIRT_BASE @ virtual
orr \rp, \rp, #0x00017000
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-msm/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <mach/msm_iomap.h>

#if defined(CONFIG_HAS_MSM_DEBUG_UART_PHYS) && !defined(CONFIG_MSM_DEBUG_UART_NONE)
.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =MSM_DEBUG_UART_PHYS
ldr \rv, =MSM_DEBUG_UART_BASE
.endm
Expand All @@ -37,7 +37,7 @@
beq 1001b
.endm
#else
.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rv, #0xff000000
orr \rv, \rv, #0x00f00000
.endm
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-mv78xx0/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <mach/mv78xx0.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =MV78XX0_REGS_PHYS_BASE
ldr \rv, =MV78XX0_REGS_VIRT_BASE
orr \rp, \rp, #0x00012000
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-mxs/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#define UART_VADDR MXS_IO_ADDRESS(UART_PADDR)

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =UART_PADDR @ physical
ldr \rv, =UART_VADDR @ virtual
.endm
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-netx/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "hardware.h"

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x00000a00
orr \rv, \rp, #io_p2v(0x00100000) @ virtual
orr \rp, \rp, #0x00100000 @ physical
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-nomadik/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x00100000
add \rp, \rp, #0x000fb000
add \rv, \rp, #0xf0000000 @ virtual base
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap1/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ omap_uart_virt: .word 0x0
* the desired UART phys and virt addresses temporarily into
* the omap_uart_phys and omap_uart_virt above.
*/
.macro addruart, rp, rv
.macro addruart, rp, rv, tmp

/* Use omap_uart_phys/virt if already configured */
9: mrc p15, 0, \rp, c1, c0
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ omap_uart_lsr: .word 0
* the desired UART phys and virt addresses temporarily into
* the omap_uart_phys and omap_uart_virt above.
*/
.macro addruart, rp, rv
.macro addruart, rp, rv, tmp

/* Use omap_uart_phys/virt if already configured */
10: mrc p15, 0, \rp, c1, c0
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-orion5x/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include <mach/orion5x.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =ORION5X_REGS_PHYS_BASE
ldr \rv, =ORION5X_REGS_VIRT_BASE
orr \rp, \rp, #0x00012000
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pnx4008/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x00090000
add \rv, \rp, #0xf4000000 @ virtual
add \rp, \rp, #0x40000000 @ physical
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-prima2/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <mach/hardware.h>
#include <mach/uart.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, =SIRFSOC_UART1_PA_BASE @ physical
ldr \rv, =SIRFSOC_UART1_VA_BASE @ virtual
.endm
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "hardware.h"

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x00100000
orr \rv, \rp, #io_p2v(0x40000000) @ virtual
orr \rp, \rp, #0x40000000 @ physical
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-realview/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#error "Unknown RealView platform"
#endif

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #DEBUG_LL_UART_OFFSET
orr \rv, \rp, #0xfb000000 @ virtual base
orr \rp, \rp, #0x10000000 @ physical base
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-rpc/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0x00010000
orr \rp, \rp, #0x00000fe0
orr \rv, \rp, #0xe0000000 @ virtual
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c2410/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define S3C2410_UART1_OFF (0x4000)
#define SHIFT_2440TXF (14-9)

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, = S3C24XX_PA_UART
ldr \rv, = S3C24XX_VA_UART
#if CONFIG_DEBUG_S3C_UART != 0
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s3c64xx/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* aligned and add in the offset when we load the value here.
*/

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
ldr \rp, = S3C_PA_UART
ldr \rv, = (S3C_VA_UART + S3C_PA_UART & 0xfffff)
#if CONFIG_DEBUG_S3C_UART != 0
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-s5p64x0/include/mach/debug-macro.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <plat/regs-serial.h>

.macro addruart, rp, rv
.macro addruart, rp, rv, tmp
mov \rp, #0xE0000000
orr \rp, \rp, #0x00100000
ldr \rp, [\rp, #0x118 ]
Expand Down
Loading

0 comments on commit 639da5e

Please sign in to comment.