summaryrefslogtreecommitdiff
path: root/cpu/at91rm9200/cpu.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-09-21 23:33:32 +0000
committerwdenk <wdenk>2004-09-21 23:33:32 +0000
commit4734cb78d8e57dbac4e9f23d91edd624484b0092 (patch)
treea7b622ef272424ba73dadc36119f331764b099ab /cpu/at91rm9200/cpu.c
parenta9c37d561d79fc9b11980853db1e1d4b15c76ba5 (diff)
Patch by Gary Jennejohn, 09 Sep 2004:
allow to use USART1 as console port on at91rm9200dk boards
Diffstat (limited to 'cpu/at91rm9200/cpu.c')
-rw-r--r--cpu/at91rm9200/cpu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpu/at91rm9200/cpu.c b/cpu/at91rm9200/cpu.c
index 02507297e1..c006d9c7e6 100644
--- a/cpu/at91rm9200/cpu.c
+++ b/cpu/at91rm9200/cpu.c
@@ -35,6 +35,10 @@
#include <asm/io.h>
#include <asm/arch/hardware.h>
+#if !defined(CONFIG_DBGU) && !defined(CONFIG_USART1)
+#error must define one of CONFIG_DBGU or CONFIG_USART1
+#endif
+
/* read co-processor 15, register #1 (control register) */
static unsigned long read_p15_c1(void)
{
@@ -116,7 +120,12 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
disable_interrupts();
reset_cpu(0);
#else
+#ifdef CONFIG_DBGU
+ AT91PS_USART us = AT91C_BASE_DBGU;
+#endif
+#ifdef CONFIG_USART1
AT91PS_USART us = AT91C_BASE_US1;
+#endif
AT91PS_PIO pio = AT91C_BASE_PIOA;
/*shutdown the console to avoid strange chars during reset */