aboutsummaryrefslogtreecommitdiff
path: root/arch/ppc/xmon/start.c
diff options
context:
space:
mode:
authorJosh Boyer <jdub@us.ibm.com>2006-09-07 13:27:58 -0500
committerPaul Mackerras <paulus@samba.org>2006-09-13 18:39:52 +1000
commitb7e89214aadf82fa5eaff28f50f2078fa6ae773c (patch)
tree877bfd9e81dcdb68a2a66080ee562fc4796b0975 /arch/ppc/xmon/start.c
parent477bcae4c289a60f2303fbd4a3a875dcca647cf8 (diff)
[POWERPC] PPC 4xx: Enable XMON on PPC 4xx boards
The following patch allows XMON to run on the 4xx platform. Tested on Walnut, Ebony, and Nova (440GX based) eval boards. 440EP, 440SP, and 440SPE boards should work as well. Patch is against 2.6.18-rc6. Signed-off-by: Josh Boyer <jdub@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/xmon/start.c')
-rw-r--r--arch/ppc/xmon/start.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/ppc/xmon/start.c b/arch/ppc/xmon/start.c
index f7e92986952..d74a883e5bd 100644
--- a/arch/ppc/xmon/start.c
+++ b/arch/ppc/xmon/start.c
@@ -15,6 +15,7 @@
#include <asm/processor.h>
#include <asm/delay.h>
#include <asm/btext.h>
+#include <asm/ibm4xx.h>
static volatile unsigned char *sccc, *sccd;
unsigned int TXRDY, RXRDY, DLAB;
@@ -57,23 +58,30 @@ static struct sysrq_key_op sysrq_xmon_op =
void
xmon_map_scc(void)
{
-#ifdef CONFIG_PPC_PREP
- volatile unsigned char *base;
-
-#elif defined(CONFIG_GEMINI)
+#if defined(CONFIG_GEMINI)
/* should already be mapped by the kernel boot */
- sccc = (volatile unsigned char *) 0xffeffb0d;
sccd = (volatile unsigned char *) 0xffeffb08;
- TXRDY = 0x20;
- RXRDY = 1;
- DLAB = 0x80;
#elif defined(CONFIG_405GP)
- sccc = (volatile unsigned char *)0xef600305;
sccd = (volatile unsigned char *)0xef600300;
+#elif defined(CONFIG_440EP)
+ sccd = (volatile unsigned char *) ioremap(PPC440EP_UART0_ADDR, 8);
+#elif defined(CONFIG_440SP)
+ sccd = (volatile unsigned char *) ioremap64(PPC440SP_UART0_ADDR, 8);
+#elif defined(CONFIG_440SPE)
+ sccd = (volatile unsigned char *) ioremap64(PPC440SPE_UART0_ADDR, 8);
+#elif defined(CONFIG_44x)
+ /* This is the default for 44x platforms. Any boards that have a
+ different UART address need to be put in cases before this or the
+ port will be mapped incorrectly */
+ sccd = (volatile unsigned char *) ioremap64(PPC440GP_UART0_ADDR, 8);
+#endif /* platform */
+
+#ifndef CONFIG_PPC_PREP
+ sccc = sccd + 5;
TXRDY = 0x20;
RXRDY = 1;
DLAB = 0x80;
-#endif /* platform */
+#endif
register_sysrq_key('x', &sysrq_xmon_op);
}