summaryrefslogtreecommitdiff
path: root/nuttx/arch/mips/src
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/mips/src')
-rw-r--r--nuttx/arch/mips/src/common/up_initialize.c8
-rwxr-xr-xnuttx/arch/mips/src/common/up_internal.h35
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-lowinit.c4
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-serial.c8
4 files changed, 38 insertions, 17 deletions
diff --git a/nuttx/arch/mips/src/common/up_initialize.c b/nuttx/arch/mips/src/common/up_initialize.c
index 15e242a6e..0a061990b 100644
--- a/nuttx/arch/mips/src/common/up_initialize.c
+++ b/nuttx/arch/mips/src/common/up_initialize.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/src/common/up_initialize.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -149,12 +149,14 @@ void up_initialize(void)
devnull_register(); /* Standard /dev/null */
#endif
- /* Initialize the serial device driver */
+ /* Initialize the console device driver */
-#ifdef CONFIG_USE_SERIALDRIVER
+#if defined(USE_SERIALDRIVER)
up_serialinit();
#elif defined(CONFIG_DEV_LOWCONSOLE)
lowconsole_init();
+#elif defined(CONFIG_RAMLOG_CONSOLE)
+ ramlog_consoleinit();
#endif
/* Initialize the netwok */
diff --git a/nuttx/arch/mips/src/common/up_internal.h b/nuttx/arch/mips/src/common/up_internal.h
index bca7656b8..25b5174a5 100755
--- a/nuttx/arch/mips/src/common/up_internal.h
+++ b/nuttx/arch/mips/src/common/up_internal.h
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/common/up_internal.h
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -62,13 +62,24 @@
/* Determine which (if any) console driver to use */
-#if CONFIG_NFILE_DESCRIPTORS == 0 || defined(CONFIG_DEV_LOWCONSOLE)
-# undef CONFIG_USE_SERIALDRIVER
-# undef CONFIG_USE_EARLYSERIALINIT
-#elif defined(CONFIG_DEV_CONSOLE) && CONFIG_NFILE_DESCRIPTORS > 0
-# define CONFIG_USE_SERIALDRIVER 1
-# define CONFIG_USE_EARLYSERIALINIT 1
-#endif
+#if !defined(CONFIG_DEV_CONSOLE) || CONFIG_NFILE_DESCRIPTORS <= 0
+# undef USE_SERIALDRIVER
+# undef USE_EARLYSERIALINIT
+# undef CONFIG_DEV_LOWCONSOLE
+# undef CONFIG_RAMLOG_CONSOLE
+#else
+# if defined(CONFIG_RAMLOG_CONSOLE)
+# undef USE_SERIALDRIVER
+# undef USE_EARLYSERIALINIT
+# undef CONFIG_DEV_LOWCONSOLE
+# elif defined(CONFIG_DEV_LOWCONSOLE)
+# undef USE_SERIALDRIVER
+# undef USE_EARLYSERIALINIT
+# else
+# define USE_SERIALDRIVER 1
+# define USE_EARLYSERIALINIT 1
+# endif
+#endig
/* Check if an interrupt stack size is configured */
@@ -177,6 +188,14 @@ extern void lowconsole_init(void);
# define lowconsole_init()
#endif
+/* Defined in drivers/ramlog.c */
+
+#ifdef CONFIG_RAMLOG_CONSOLE
+extern void ramlog_consoleinit(void);
+#else
+# define ramlog_consoleinit()
+#endif
+
/* Debug */
#ifdef CONFIG_ARCH_STACKDUMP
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-lowinit.c b/nuttx/arch/mips/src/pic32mx/pic32mx-lowinit.c
index 6000f7684..fd0c41552 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-lowinit.c
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-lowinit.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/src/pic32/pic32mx-lowinit.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -195,7 +195,7 @@ void pic32mx_lowinit(void)
* available as soon as possible).
*/
-#ifdef CONFIG_USE_EARLYSERIALINIT
+#ifdef USE_EARLYSERIALINIT
up_earlyserialinit();
#endif
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c b/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c
index 0646a0037..334c03d1c 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-serial.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/src/pic32mx/pic32mx-serial.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -77,7 +77,7 @@
* provide some minimal implementation of up_putc.
*/
-#ifdef CONFIG_USE_SERIALDRIVER
+#ifdef USE_SERIALDRIVER
/* Which UART with be tty0/console and which tty1? The console will always
* be ttyS0. If there is no console then will use the lowest numbered UART.
@@ -868,7 +868,7 @@ int up_putc(int ch)
return ch;
}
-#else /* CONFIG_USE_SERIALDRIVER */
+#else /* USE_SERIALDRIVER */
/****************************************************************************
* Name: up_putc
@@ -895,5 +895,5 @@ int up_putc(int ch)
return ch;
}
-#endif /* CONFIG_USE_SERIALDRIVER */
+#endif /* USE_SERIALDRIVER */