aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/misc_32.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-12-20 23:39:26 -0500
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2007-12-23 14:13:03 -0500
commit9dae8afdf212d39bc7c25f1b1ca9b10f10f6beaa (patch)
tree12721945adf3a3fc01ba292e1756af4826a7eed3 /arch/powerpc/kernel/misc_32.S
parent69c0785112921a43739495a68f459fde88a9bbd8 (diff)
[POWERPC] 4xx: Add early udbg support for 40x processors
This adds some basic real mode based early udbg support for 40x in order to debug things more easily Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/kernel/misc_32.S')
-rw-r--r--arch/powerpc/kernel/misc_32.S39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index ea1137851a4a..be09f0d2d90b 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -206,6 +206,45 @@ _GLOBAL(_nmask_and_or_msr)
206 isync 206 isync
207 blr /* Done */ 207 blr /* Done */
208 208
209#ifdef CONFIG_40x
210
211/*
212 * Do an IO access in real mode
213 */
214_GLOBAL(real_readb)
215 mfmsr r7
216 ori r0,r7,MSR_DR
217 xori r0,r0,MSR_DR
218 sync
219 mtmsr r0
220 sync
221 isync
222 lbz r3,0(r3)
223 sync
224 mtmsr r7
225 sync
226 isync
227 blr
228
229 /*
230 * Do an IO access in real mode
231 */
232_GLOBAL(real_writeb)
233 mfmsr r7
234 ori r0,r7,MSR_DR
235 xori r0,r0,MSR_DR
236 sync
237 mtmsr r0
238 sync
239 isync
240 stb r3,0(r4)
241 sync
242 mtmsr r7
243 sync
244 isync
245 blr
246
247#endif /* CONFIG_40x */
209 248
210/* 249/*
211 * Flush MMU TLB 250 * Flush MMU TLB