debug-macro.S 1.22 KB
Newer Older
1
/* arch/arm/mach-footbridge/include/mach/debug-macro.S
Linus Torvalds's avatar
Linus Torvalds committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * Debugging macro include header
 *
 *  Copyright (C) 1994-1999 Russell King
 *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
 *
 * 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 <asm/hardware/dec21285.h>

#ifndef CONFIG_DEBUG_DC21285_PORT
	/* For NetWinder debugging */
18
		.macro	addruart, rp, rv, tmp
19
		mov	\rp, #0x000003f8
20 21
		orr	\rv, \rp, #0xff000000	@ virtual
		orr	\rp, \rp, #0x7c000000	@ physical
Linus Torvalds's avatar
Linus Torvalds committed
22 23
		.endm

24 25 26
#define UART_SHIFT	0
#define FLOW_CONTROL
#include <asm/hardware/debug-8250.S>
Linus Torvalds's avatar
Linus Torvalds committed
27 28

#else
29
#include <mach/hardware.h>
Linus Torvalds's avatar
Linus Torvalds committed
30 31 32 33
	/* For EBSA285 debugging */
		.equ	dc21285_high, ARMCSR_BASE & 0xff000000
		.equ	dc21285_low,  ARMCSR_BASE & 0x00ffffff

34
		.macro	addruart, rp, rv, tmp
Linus Torvalds's avatar
Linus Torvalds committed
35
		.if	dc21285_low
36 37 38
		mov	\rp, #dc21285_low
		.else
		mov	\rp, #0
Linus Torvalds's avatar
Linus Torvalds committed
39
		.endif
40 41
		orr	\rv, \rp, #dc21285_high
		orr	\rp, \rp, #0x42000000
Linus Torvalds's avatar
Linus Torvalds committed
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
		.endm

		.macro	senduart,rd,rx
		str	\rd, [\rx, #0x160]	@ UARTDR
		.endm

		.macro	busyuart,rd,rx
1001:		ldr	\rd, [\rx, #0x178]	@ UARTFLG
		tst	\rd, #1 << 3
		bne	1001b
		.endm

		.macro	waituart,rd,rx
		.endm
#endif