Add QEMU NSH configuration

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3358 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-03-10 04:13:44 +00:00
parent 177d69d212
commit 22b72b3ebe
2 changed files with 34 additions and 1 deletions

View File

@ -127,6 +127,12 @@ void up_lowsetup(void)
up_gdtinit();
/* Early serial driver initialization */
#ifdef CONFIG_USE_EARLYSERIALINIT
up_earlyserialinit();
#endif
/* Now perform board-specific initializations */
up_boardinitialize();

View File

@ -40,10 +40,18 @@
#include <nuttx/config.h>
#include <nuttx/arch.h>
#include <nuttx/uart_16550.h>
#include <arch/io.h>
#include "up_internal.h"
/* This is a "stub" file to suppport up_putc if no real serial driver is
* configured. Normally, drivers/serial/uart_16550.c provides the serial
* driver for this platform.
*/
#ifdef CONFIG_USE_SERIALDRIVER
#error "Serial driver support not initialized"
/****************************************************************************
* Pre-processor Definitions
@ -61,6 +69,25 @@
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: uart_getreg(), uart_putreg()
*
* Description:
* These functions must be provided by the processor-specific code in order
* to correctly access 16550 registers
*
****************************************************************************/
uart_datawidth_t uart_getreg(uart_addrwidth_t base, unsigned int offset)
{
return inb(base + offset);
}
void uart_putreg(uart_addrwidth_t base, unsigned int offset, uart_datawidth_t value)
{
outb(value, base + offset);
}
#else /* CONFIG_USE_SERIALDRIVER */
/****************************************************************************