Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 268099e3 authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[ARM] Collect 8250-based debug implementations together



Several ARM machine implementations used an 8250 compatible port for
debugging purposes, and indepdently implemented the low level debug
macros every time.  Provide a common implementation and convert these
implementations to use this version.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 22398f57
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -17,15 +17,5 @@
		orr	\rx, \rx, #0x00000be0
		.endm

		.macro	senduart,rd,rx
		strb	\rd, [\rx]
		.endm

		.macro	busyuart,rd,rx
		.endm

		.macro	waituart,rd,rx
1001:		ldrb	\rd, [\rx, #0x14]
		tst	\rd, #0x20
		beq	1001b
		.endm
#define UART_SHIFT	2
#include <asm/hardware/debug-8250.S>
+3 −16
Original line number Diff line number Diff line
@@ -16,19 +16,6 @@
		orr	\rx, \rx, #0x00000be0
		.endm

		.macro	senduart,rd,rx
		strb	\rd, [\rx]
		.endm

		.macro	busyuart,rd,rx
1002:		ldrb	\rd, [\rx, #0x14]
		and	\rd, \rd, #0x60
		teq	\rd, #0x60
		bne	1002b
		.endm

		.macro	waituart,rd,rx
1001:		ldrb	\rd, [\rx, #0x18]
		tst	\rd, #0x10
		beq	1001b
		.endm
#define UART_SHIFT	2
#define FLOW_CONTROL
#include <asm/hardware/debug-8250.h>
+3 −15
Original line number Diff line number Diff line
@@ -23,22 +23,10 @@
		orr	\rx, \rx, #0x000003f8
		.endm

		.macro	senduart,rd,rx
		strb	\rd, [\rx]
		.endm
#define UART_SHIFT	0
#define FLOW_CONTROL
#include <asm/hardware/debug-8250.S>

		.macro	busyuart,rd,rx
1002:		ldrb	\rd, [\rx, #0x5]
		and	\rd, \rd, #0x60
		teq	\rd, #0x60
		bne	1002b
		.endm

		.macro	waituart,rd,rx
1001:		ldrb	\rd, [\rx, #0x6]
		tst	\rd, #0x10
		beq	1001b
		.endm
#else
	/* For EBSA285 debugging */
		.equ	dc21285_high, ARMCSR_BASE & 0xff000000
+3 −16
Original line number Diff line number Diff line
@@ -28,21 +28,8 @@
#endif
		.endm

		.macro	senduart,rd,rx
		strb	\rd, [\rx]
		.endm

		.macro	busyuart,rd,rx
1002:		ldrb	\rd, [\rx, #0x5]
		and	\rd, \rd, #0x60
		teq	\rd, #0x60
		bne	1002b
		.endm

		.macro	waituart,rd,rx
#if !defined(CONFIG_ARCH_IQ80321) || !defined(CONFIG_ARCH_IQ31244) || !defined(CONFIG_ARCH_IQ80331)
1001:		ldrb	\rd, [\rx, #0x6]
		tst	\rd, #0x10
		beq	1001b
#define FLOW_CONTROL
#endif
		.endm
#define UART_SHIFT	0
#include <asm/hardware/debug-8250.S>
+2 −13
Original line number Diff line number Diff line
@@ -20,16 +20,5 @@
						@ byte writes used - Big Endian.
                .endm

               .macro  senduart,rd,rx
                strb    \rd, [\rx]
                .endm

                .macro  waituart,rd,rx
1002:           ldrb    \rd, [\rx, #0x14]
                and     \rd, \rd, #0x60		@ check THRE and TEMT bits
                teq     \rd, #0x60
                bne     1002b
                .endm

                .macro  busyuart,rd,rx
                .endm
#define UART_SHIFT	2
#include <asm/hardware/debug-8250.S>
Loading