forked from mirrors/linux
		
	ARM: add an extra temp register to the low level debugging addruart macro
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>
This commit is contained in:
		
							parent
							
								
									57c89707da
								
							
						
					
					
						commit
						639da5ee37
					
				
					 55 changed files with 58 additions and 58 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
 *
 | 
			
		||||
**/
 | 
			
		||||
 | 
			
		||||
		.macro	addruart, rp, rv
 | 
			
		||||
		.macro	addruart, rp, rv, tmp
 | 
			
		||||
		mov	\rp, #0xf0000000
 | 
			
		||||
		orr	\rp, \rp, #0x00000be0
 | 
			
		||||
		mov	\rp, \rv
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
 *
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
		.macro  addruart, rp, rv
 | 
			
		||||
		.macro  addruart, rp, rv, tmp
 | 
			
		||||
		mov	\rp, #0x00030000
 | 
			
		||||
#ifdef	__ARMEB__
 | 
			
		||||
		orr	\rp, \rp, #0x00000003
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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__
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 ]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
#if CONFIG_DEBUG_S3C_UART != 0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,7 @@
 | 
			
		|||
*/
 | 
			
		||||
#include <mach/hardware.h>
 | 
			
		||||
 | 
			
		||||
		.macro	addruart, rp, rv
 | 
			
		||||
		.macro	addruart, rp, rv, tmp
 | 
			
		||||
		mrc	p15, 0, \rp, c1, c0
 | 
			
		||||
		tst	\rp, #1			@ MMU enabled?
 | 
			
		||||
		moveq	\rp, #0x80000000	@ physical base address
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
 *
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
		.macro	addruart, rp, rv
 | 
			
		||||
		.macro	addruart, rp, rv, tmp
 | 
			
		||||
		mov	\rp, #0xe0000000
 | 
			
		||||
		orr	\rp, \rp, #0x000003f8
 | 
			
		||||
		mov	\rv, \rp
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -21,7 +21,7 @@
 | 
			
		|||
#include <mach/io.h>
 | 
			
		||||
#include <mach/iomap.h>
 | 
			
		||||
 | 
			
		||||
	.macro  addruart, rp, rv
 | 
			
		||||
	.macro  addruart, rp, rv, tmp
 | 
			
		||||
        ldr     \rp, =IO_APB_PHYS       @ physical
 | 
			
		||||
        ldr     \rv, =IO_APB_VIRT        @ virtual
 | 
			
		||||
	orr	\rp, \rp, #(TEGRA_DEBUG_UART_BASE & 0xFF)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,7 +10,7 @@
 | 
			
		|||
 */
 | 
			
		||||
#include <mach/hardware.h>
 | 
			
		||||
 | 
			
		||||
	.macro	addruart, rp, rv
 | 
			
		||||
	.macro	addruart, rp, rv, tmp
 | 
			
		||||
	/* If we move the address using MMU, use this. */
 | 
			
		||||
	ldr	\rp,	  = U300_SLOW_PER_PHYS_BASE @ MMU off, physical address
 | 
			
		||||
	ldr	\rv,	  = U300_SLOW_PER_VIRT_BASE @ MMU on, virtual address
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -35,7 +35,7 @@
 | 
			
		|||
#define UX500_UART(n)	__UX500_UART(n)
 | 
			
		||||
#define UART_BASE	UX500_UART(CONFIG_UX500_DEBUG_UART)
 | 
			
		||||
 | 
			
		||||
	.macro	addruart, rp, rv
 | 
			
		||||
	.macro	addruart, rp, rv, tmp
 | 
			
		||||
	ldr	\rp, =UART_BASE				@ no, physical address
 | 
			
		||||
	ldr	\rv, =IO_ADDRESS(UART_BASE)		@ yes, virtual address
 | 
			
		||||
	.endm
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
 *
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
		.macro	addruart, rp, rv
 | 
			
		||||
		.macro	addruart, rp, rv, tmp
 | 
			
		||||
		mov	\rp,      #0x001F0000
 | 
			
		||||
		orr	\rp, \rp, #0x00001000
 | 
			
		||||
		orr	\rv, \rp, #0xf1000000	@ virtual base
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,7 +12,7 @@
 | 
			
		|||
 | 
			
		||||
#define DEBUG_LL_UART_OFFSET	0x00009000
 | 
			
		||||
 | 
			
		||||
		.macro	addruart,rp,rv
 | 
			
		||||
		.macro	addruart,rp,rv,tmp
 | 
			
		||||
		mov	\rp, #DEBUG_LL_UART_OFFSET
 | 
			
		||||
		orr	\rv, \rp, #0xf8000000	@ virtual base
 | 
			
		||||
		orr	\rp, \rp, #0x10000000	@ physical base
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
 *
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
	.macro	addruart, rp, rv
 | 
			
		||||
	.macro	addruart, rp, rv, tmp
 | 
			
		||||
	mov	\rp,      #0x00200000
 | 
			
		||||
	orr	\rv, \rp, #0xf8000000
 | 
			
		||||
	orr	\rp, \rp, #0xd8000000
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,7 @@
 | 
			
		|||
#include <mach/zynq_soc.h>
 | 
			
		||||
#include <mach/uart.h>
 | 
			
		||||
 | 
			
		||||
		.macro	addruart, rp, rv
 | 
			
		||||
		.macro	addruart, rp, rv, tmp
 | 
			
		||||
		ldr	\rp, =LL_UART_PADDR	@ physical
 | 
			
		||||
		ldr	\rv, =LL_UART_VADDR	@ virtual
 | 
			
		||||
		.endm
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -54,7 +54,7 @@
 | 
			
		|||
 | 
			
		||||
#define UART_VADDR	IMX_IO_ADDRESS(UART_PADDR)
 | 
			
		||||
 | 
			
		||||
		.macro	addruart, rp, rv
 | 
			
		||||
		.macro	addruart, rp, rv, tmp
 | 
			
		||||
		ldr	\rp, =UART_PADDR	@ physical
 | 
			
		||||
		ldr	\rv, =UART_VADDR	@ virtual
 | 
			
		||||
		.endm
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,7 @@
 | 
			
		|||
#include <linux/amba/serial.h>
 | 
			
		||||
#include <mach/hardware.h>
 | 
			
		||||
 | 
			
		||||
		.macro	addruart, rp, rv
 | 
			
		||||
		.macro	addruart, rp, rv, tmp
 | 
			
		||||
		mov	\rp, #SPEAR_DBG_UART_BASE		@ Physical base
 | 
			
		||||
		mov	\rv, #VA_SPEAR_DBG_UART_BASE		@ Virtual base
 | 
			
		||||
		.endm
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,7 @@
 | 
			
		|||
 *
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
		.macro	addruart, rp, rv
 | 
			
		||||
		.macro	addruart, rp, rv, tmp
 | 
			
		||||
		moveq	\rp, #0x90000000	@ physical base address
 | 
			
		||||
		movne	\rv, #0xF1000000	@ virtual base
 | 
			
		||||
		orr	\rp, \rp, #0x00007000	@ UART0
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue