From 451503eeb584a42403048580cf5da24b3e7aed70 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 21 Mar 2007 23:06:29 +0000 Subject: [PATCH] Progress with DM320 git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@117 42af7a65-404d-4744-a932-0658087f49c3 --- arch/c5471/src/up_doirq.c | 1 - arch/dm320/defconfig | 5 ++--- arch/dm320/ld.script | 2 +- arch/dm320/src/up_allocateheap.c | 3 ++- arch/dm320/src/up_doirq.c | 1 - arch/dm320/src/up_internal.h | 2 +- arch/dm320/src/up_serial.c | 7 +++---- 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/arch/c5471/src/up_doirq.c b/arch/c5471/src/up_doirq.c index ab1b40d655..73d6f8a762 100644 --- a/arch/c5471/src/up_doirq.c +++ b/arch/c5471/src/up_doirq.c @@ -97,7 +97,6 @@ void up_doirq(int irq, uint32* regs) * disabled. */ - current_regs = NULL; up_enable_irq(irq); } up_ledoff(LED_INIRQ); diff --git a/arch/dm320/defconfig b/arch/dm320/defconfig index 4bf241ebe8..aaea0c3e58 100644 --- a/arch/dm320/defconfig +++ b/arch/dm320/defconfig @@ -38,13 +38,12 @@ # CONFIG_ARCH - identifies the arch subdirectory # CONFIG_ARCH_name - for use in C code # CONFIG_ROM_VECTORS - unique to dm320 -# CONFIG_DRAM_START/SIZE - Describes the installed DRAM. +# CONFIG_DRAM_SIZE - Describes the installed DRAM. # CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions # CONFIG_ARCH=dm320 CONFIG_ARCH_DM320=y CONFIG_ROM_VECTORS=n -CONFIG_DRAM_START=0x01000000 CONFIG_DRAM_SIZE=0x01000000 CONFIG_DRAM_NUTTXENTRY=0x01008000 CONFIG_ARCH_STACKDUMP=y @@ -117,7 +116,7 @@ CONFIG_START_YEAR=2007 CONFIG_START_MONTH=2 CONFIG_START_DAY=13 CONFIG_JULIAN_TIME=n -CONFIG_DEV_CONSOLE=n +CONFIG_DEV_CONSOLE=y # # The following can be used to disable categories of diff --git a/arch/dm320/ld.script b/arch/dm320/ld.script index 6ee7a5db3b..b048f088ac 100644 --- a/arch/dm320/ld.script +++ b/arch/dm320/ld.script @@ -39,7 +39,7 @@ SECTIONS { /* The OS entry point is here */ - . = 0x01008000; + . = 0x00008000; .text : { _stext = ABSOLUTE(.); *(.text) diff --git a/arch/dm320/src/up_allocateheap.c b/arch/dm320/src/up_allocateheap.c index 871637ce4d..697818e8de 100644 --- a/arch/dm320/src/up_allocateheap.c +++ b/arch/dm320/src/up_allocateheap.c @@ -41,6 +41,7 @@ #include #include #include +#include "dm320.h" #include "up_internal.h" /************************************************************ @@ -73,5 +74,5 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size) { *heap_start = (FAR void*)g_heapbase; - *heap_size = (CONFIG_DRAM_START + CONFIG_DRAM_SIZE) - g_heapbase; + *heap_size = (DM320_SDRAM_VADDR + CONFIG_DRAM_SIZE) - g_heapbase; } diff --git a/arch/dm320/src/up_doirq.c b/arch/dm320/src/up_doirq.c index c2981dd4e1..7f53f5eae7 100644 --- a/arch/dm320/src/up_doirq.c +++ b/arch/dm320/src/up_doirq.c @@ -96,7 +96,6 @@ void up_doirq(int irq, uint32* regs) * disabled. */ - current_regs = NULL; up_enable_irq(irq); } #endif diff --git a/arch/dm320/src/up_internal.h b/arch/dm320/src/up_internal.h index 7420d30535..58f341793d 100644 --- a/arch/dm320/src/up_internal.h +++ b/arch/dm320/src/up_internal.h @@ -53,7 +53,7 @@ #undef CONFIG_SUPPRESS_TIMER_INTS /* No timer */ #undef CONFIG_SUPPRESS_SERIAL_INTS /* Console will poll */ #undef CONFIG_SUPPRESS_UART_CONFIG /* Do not reconfig UART */ -#undef CONFIG_DUMP_ON_EXIT /* Dump task state on exit */ +#define CONFIG_DUMP_ON_EXIT 1 /* Dump task state on exit */ /************************************************************ * Public Types diff --git a/arch/dm320/src/up_serial.c b/arch/dm320/src/up_serial.c index fadc909581..c34e2bb2fa 100644 --- a/arch/dm320/src/up_serial.c +++ b/arch/dm320/src/up_serial.c @@ -281,7 +281,7 @@ static inline void up_enablebreaks(struct up_dev_s *priv, boolean enable) static int up_setup(struct uart_dev_s *dev) { #ifdef CONFIG_SUPPRESS_UART_CONFIG - struct up_dev_s *priv = (struct up_dev_s*)CONSOLE_DEV.priv; + struct up_dev_s *priv = (struct up_dev_s*)dev->priv; uint16 brsr; /* Clear fifos */ @@ -292,7 +292,7 @@ static int up_setup(struct uart_dev_s *dev) /* Set rx and tx triggers */ up_serialout(priv, UART_DM320_RFCR, UART_RFCR_RTL_1); - up_serialout(priv, UART_DM320_TFCR, UART_TFCR_TTL_1); + up_serialout(priv, UART_DM320_TFCR, UART_TFCR_TTL_16); /* Set up the MSR */ @@ -391,7 +391,7 @@ static int up_setup(struct uart_dev_s *dev) static void up_shutdown(struct uart_dev_s *dev) { - struct up_dev_s *priv = (struct up_dev_s*)CONSOLE_DEV.priv; + struct up_dev_s *priv = (struct up_dev_s*)dev->priv; up_disableuartint(priv, NULL); } @@ -414,7 +414,6 @@ static int up_interrupt(int irq, void *context) struct up_dev_s *priv; uint16 status; int passes; - if (g_uart1port.irq == irq) {