aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/44x/misc_44x.S
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-05-08 12:59:31 +1000
committerPaul Mackerras <paulus@samba.org>2007-05-08 14:47:33 +1000
commitd9b55a03611ff2e2e54fb4e1ad2648d5eb870fa3 (patch)
tree5704be539afcd6f29b1f5751476c8b4f53673bff /arch/powerpc/platforms/44x/misc_44x.S
parentf6dfc80554b27da11dbb36ebae166b23ec3aa9ca (diff)
[POWERPC] Early serial debug support for PPC44x
This adds support for early serial debugging via the built in port on IBM/AMCC PowerPC 44x CPUs. It uses a bolted TLB entry in address space 1 for the UART's mapping, allowing robust debugging both before and after the initialization of the MMU. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/44x/misc_44x.S')
-rw-r--r--arch/powerpc/platforms/44x/misc_44x.S31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/44x/misc_44x.S b/arch/powerpc/platforms/44x/misc_44x.S
index 52bde71485b..3bce71d5d75 100644
--- a/arch/powerpc/platforms/44x/misc_44x.S
+++ b/arch/powerpc/platforms/44x/misc_44x.S
@@ -15,6 +15,37 @@
.text
/*
+ * Do an IO access in AS1
+ */
+_GLOBAL(as1_readb)
+ mfmsr r7
+ ori r0,r7,MSR_DS
+ sync
+ mtmsr r0
+ sync
+ isync
+ lbz r3,0(r3)
+ sync
+ mtmsr r7
+ sync
+ isync
+ blr
+
+_GLOBAL(as1_writeb)
+ mfmsr r7
+ ori r0,r7,MSR_DS
+ sync
+ mtmsr r0
+ sync
+ isync
+ stb r3,0(r4)
+ sync
+ mtmsr r7
+ sync
+ isync
+ blr
+
+/*
* void ppc44x_reset_system(char *cmd)
*
* At present, this routine just applies a system reset.