diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-05-07 22:59:31 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-08 00:47:33 -0400 |
commit | d9b55a03611ff2e2e54fb4e1ad2648d5eb870fa3 (patch) | |
tree | 5704be539afcd6f29b1f5751476c8b4f53673bff /arch/powerpc/platforms/44x | |
parent | f6dfc80554b27da11dbb36ebae166b23ec3aa9ca (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')
-rw-r--r-- | arch/powerpc/platforms/44x/44x.h | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/44x/misc_44x.S | 31 |
2 files changed, 33 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/44x/44x.h b/arch/powerpc/platforms/44x/44x.h index 45f24b166f4..42eabf87fea 100644 --- a/arch/powerpc/platforms/44x/44x.h +++ b/arch/powerpc/platforms/44x/44x.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __POWERPC_PLATFORMS_44X_44X_H | 1 | #ifndef __POWERPC_PLATFORMS_44X_44X_H |
2 | #define __POWERPC_PLATFORMS_44X_44X_H | 2 | #define __POWERPC_PLATFORMS_44X_44X_H |
3 | 3 | ||
4 | extern u8 as1_readb(volatile u8 __iomem *addr); | ||
5 | extern void as1_writeb(u8 data, volatile u8 __iomem *addr); | ||
4 | extern void ppc44x_reset_system(char *cmd); | 6 | extern void ppc44x_reset_system(char *cmd); |
5 | 7 | ||
6 | #endif /* __POWERPC_PLATFORMS_44X_44X_H */ | 8 | #endif /* __POWERPC_PLATFORMS_44X_44X_H */ |
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 @@ | |||
15 | .text | 15 | .text |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * Do an IO access in AS1 | ||
19 | */ | ||
20 | _GLOBAL(as1_readb) | ||
21 | mfmsr r7 | ||
22 | ori r0,r7,MSR_DS | ||
23 | sync | ||
24 | mtmsr r0 | ||
25 | sync | ||
26 | isync | ||
27 | lbz r3,0(r3) | ||
28 | sync | ||
29 | mtmsr r7 | ||
30 | sync | ||
31 | isync | ||
32 | blr | ||
33 | |||
34 | _GLOBAL(as1_writeb) | ||
35 | mfmsr r7 | ||
36 | ori r0,r7,MSR_DS | ||
37 | sync | ||
38 | mtmsr r0 | ||
39 | sync | ||
40 | isync | ||
41 | stb r3,0(r4) | ||
42 | sync | ||
43 | mtmsr r7 | ||
44 | sync | ||
45 | isync | ||
46 | blr | ||
47 | |||
48 | /* | ||
18 | * void ppc44x_reset_system(char *cmd) | 49 | * void ppc44x_reset_system(char *cmd) |
19 | * | 50 | * |
20 | * At present, this routine just applies a system reset. | 51 | * At present, this routine just applies a system reset. |