summaryrefslogtreecommitdiff
path: root/arch/arm/kernel/debug.S
diff options
context:
space:
mode:
authorSascha Hauer <sascha@de.rmk.(none)>2004-10-10 00:05:21 +0100
committerRussell King <rmk@flint.arm.linux.org.uk>2004-10-10 00:05:21 +0100
commit433a3e8e9bc3bea33729ba38c4dd412f9ae80f0d (patch)
treeee819bee5f8d71ac4ce16d35f1f405d9a57fb8cf /arch/arm/kernel/debug.S
parente56893298e95b3ceb05a2bea3f1feb1778c4e30a (diff)
[ARM PATCH] 2073/3: Hynix h720x architecture support
Patch from Sascha Hauer This patch supports the Hynix developer boards h7201 and h7202 for the HMS30C7201 and HMS30C7202 CPUs. Changes to previous patch: - reorganized file structure. We now have common.c which shares stuff common to all h720x processors and cpu-h720[12].c files for the cpu specific stuff - fixed timer handling for timers 1/2 - cleaned up h720x register definitions and splitted in files specific to each cpu and one generic part Signed-off-by: Thomas Gleixner Signed-off-by: Robert Schwebel Signed-off-by: Sascha Hauer
Diffstat (limited to 'arch/arm/kernel/debug.S')
-rw-r--r--arch/arm/kernel/debug.S30
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index fca21523ef6f..7b4e9721fb63 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -675,6 +675,36 @@
tst \rd, #1 << 3 @ TXDC
beq 1002b @ wait until transmit done
.endm
+
+#elif defined(CONFIG_ARCH_H720X)
+
+ .equ io_virt, IO_BASE
+ .equ io_phys, IO_START
+
+ .macro addruart,rx
+ mrc p15, 0, \rx, c1, c0
+ tst \rx, #1 @ MMU enabled?
+ moveq \rx, #io_phys @ physical base address
+ movne \rx, #io_virt @ virtual address
+ add \rx, \rx, #0x00020000 @ UART1
+ .endm
+
+ .macro senduart,rd,rx
+ str \rd, [\rx, #0x0] @ UARTDR
+
+ .endm
+
+ .macro waituart,rd,rx
+1001: ldr \rd, [\rx, #0x18] @ UARTFLG
+ tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full
+ bne 1001b
+ .endm
+
+ .macro busyuart,rd,rx
+1001: ldr \rd, [\rx, #0x18] @ UARTFLG
+ tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy
+ bne 1001b
+ .endm
#else
#error Unknown architecture
#endif