2009-11-30 Fernando Nicodemos <fgnicodemos@terra.com.br>

* Makefile.am, preinstall.am, console/fbcons.c, console/font8x16.h,
	console/sed1356.c, console/uarts.c, include/sed1356.h,
	startup/bspstart.c, startup/linkcmds.csb337, startup/linkcmds.csb637,
	startup/memmap.c, startup/umonsupp.c: Update to match development
	version.
This commit is contained in:
Joel Sherrill
2009-11-30 22:00:36 +00:00
parent dbec22db45
commit 7b25525607
13 changed files with 661 additions and 552 deletions

View File

@@ -1,3 +1,11 @@
2009-11-30 Fernando Nicodemos <fgnicodemos@terra.com.br>
* Makefile.am, preinstall.am, console/fbcons.c, console/font8x16.h,
console/sed1356.c, console/uarts.c, include/sed1356.h,
startup/bspstart.c, startup/linkcmds.csb337, startup/linkcmds.csb637,
startup/memmap.c, startup/umonsupp.c: Update to match development
version.
2009-11-21 Fernando Nicodemos <fgnicodemos@terra.com.br>
* Makefile.am, configure.ac, console/uarts.c: Add initial support for

View File

@@ -57,7 +57,7 @@ libbsp_a_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
../../shared/bsppretaskinghook.c startup/bspstart.c \
../../shared/bspclean.c startup/bspreset.c \
startup/memmap.c ../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c startup/umonsupp.c
../../shared/gnatinstallhandler.c
# console
libbsp_a_SOURCES += ../../shared/console.c console/uarts.c
if ENABLE_LCD

View File

@@ -4,6 +4,9 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* Modified by Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
/*
* SED1356 Support
* SED1356 Support (for KIT637_V6 (CSB637)
*
* Based upon code from MicroMonitor 1.17 from http://www.umonfw.com/
* which includes this notice:
@@ -25,8 +25,10 @@
*
* Ed Sutter has been informed that this code is being used in RTEMS.
*
* The code has been reformatted to be more compliant with RTEMS
* coding standards and to eliminate C++ style comments.
* This code was reformatted by Joel Sherrill from OAR Corporation and
* Fernando Nicodemos <fgnicodemos@terra.com.br> from NCB - Sistemas
* Embarcados Ltda. (Brazil) to be more compliant with RTEMS coding
* standards and to eliminate C++ style comments.
*
* $Id$
*/

View File

@@ -135,7 +135,7 @@ console_tbl Console_Port_Tbl[] = {
0 /* ulIntVector - NOT USED */
},
#endif
#if ENABLE_UMON
#if (ENABLE_UMON && ENABLE_UMON_CONSOLE)
{
"/dev/umon", /* sDeviceName */
SERIAL_CUSTOM, /* deviceType */

View File

@@ -1,9 +1,12 @@
/*
* Public Interface for SED Video Controller Operations
* Public Interface for SED Video Controller Operations
*
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* Modified by Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.

View File

@@ -45,10 +45,12 @@ $(PROJECT_INCLUDE)/tm27.h: ../../shared/include/tm27.h $(PROJECT_INCLUDE)/$(dirs
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
if ENABLE_LCD
$(PROJECT_INCLUDE)/sed1356.h: include/sed1356.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/sed1356.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/sed1356.h
endif
if ENABLE_UMON
$(PROJECT_INCLUDE)/umon/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)/umon
@: > $(PROJECT_INCLUDE)/umon/$(dirstamp)
@@ -74,7 +76,7 @@ PREINSTALL_DIRS += $(PROJECT_INCLUDE)/rtems/$(dirstamp)
$(PROJECT_INCLUDE)/rtems/umon.h: ../../shared/umon/umon.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/umon.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/umon.h
endif
$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h

View File

@@ -1,26 +1,33 @@
/*
* Cogent CSB337 - AT91RM9200 Startup code
* Cogent CSB337 - AT91RM9200 Startup Code
*
* Copyright (c) 2004 by Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
* Copyright (c) 2004 by Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* Modified by Joel Sherill
* from OAR Corporation and
* Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
* http://www.rtems.com/license/LICENSE.
*
*
* $Id$
*/
*/
#include <bsp.h>
#include <at91rm9200.h>
#include <at91rm9200_pmc.h>
#include <at91rm9200_emac.h>
#include <at91rm9200_gpio.h>
#include <at91rm9200_usart.h>
/* Function prototypes */
extern void rtems_irq_mngt_init(void);
void bsp_libc_init( void *, uint32_t, int );
static void fix_mac_addr(void);
void bsp_usart_init(void);
/*
* bsp_start_default - BSP initialization function
@@ -44,6 +51,11 @@ void bsp_start_default( void )
*/
fix_mac_addr();
/*
* Init rtems PIO configuration for USARTs
*/
bsp_usart_init();
/*
* Init rtems exceptions management
*/
@@ -85,6 +97,67 @@ static void fix_mac_addr(void)
}
}
/*
*
* NAME: bsp_usart_init - Function to setup the PIO in USART mode
* before startup
*
* DESCRIPTION:
* This function is called before usart driver is initialized and is
* used to setup the proper mode of PIO operation for USART.
*
* NOTES:
* The initialization could be done smarter by programming only the
* bits you need to program for each USART when the port is ENABLED.
*
*/
void bsp_usart_init(void)
{
/*
* Configure shared pins for USARTs.
* Disables the PIO from controlling the corresponding pin.
*/
PIOA_REG(PIO_PDR) |= ( BIT5 | /* USART3 TXD3 */
BIT6 | /* USART3 RXD3 */
BIT17 | /* USART0 TXD0 */
BIT18 | /* USART0 RXD0 */
BIT22 | /* USART2 RXD2 */
BIT23 ); /* USART2 TXD2 */
PIOB_REG(PIO_PDR) |= ( BIT20 | /* USART1 TXD1 */
BIT21 ); /* USART1 RXD1 */
/**** PIO Controller A - Pins you want in mode B ****/
PIOA_REG(PIO_BSR) |= ( BIT5 | /* USART3 TXD3 */ /* add */
BIT6 ); /* USART3 RXD3 */
PIOA_REG(PIO_ASR) &= ~( BIT5 | /* USART3 TXD3 */
BIT6 ); /* USART3 RXD3 */
/**** PIO Controller A - Pins you want in mode A ****/
PIOA_REG(PIO_ASR) |= ( BIT17 | /* USART0 TXD0 */
BIT18 | /* USART0 RXD0 */
BIT22 | /* USART2 RXD2 */
BIT23 ); /* USART2 TXD2 */
PIOA_REG(PIO_BSR) &= ~( BIT17 | /* USART0 TXD0 */ /* add */
BIT18 | /* USART0 RXD0 */
BIT22 | /* USART2 RXD2 */
BIT23 ); /* USART2 TXD2 */
/**** PIO Controller B - Pins you want in mode A ****/
PIOB_REG(PIO_ASR) |= ( BIT20 | /* USART1 TXD1 */
BIT21 ); /* USART1 RXD1 */
PIOB_REG(PIO_BSR) &= ~( BIT20 | /* USART1 TXD1 */
BIT21 ); /* USART1 RXD1 */
/**** PIO Controller B - Pins you want in mode B ****/
/**** none ****/
/* Enable the clock to the USARTs */
PMC_REG(PMC_PCER) |= ( PMC_PCR_PID_US0 | /* USART 0 Peripheral Clock */
PMC_PCR_PID_US1 | /* USART 1 Peripheral Clock */
PMC_PCR_PID_US2 | /* USART 2 Peripheral Clock */
PMC_PCR_PID_US3 ); /* USART 3 Peripheral Clock */
}
/*
* By making this a weak alias for bsp_start_default, a brave soul

View File

@@ -1,14 +1,12 @@
/*
* Cogent CSB337 Linker script
* Cogent CSB337 Linker script
*
* Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
* Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
* http://www.rtems.com/license/LICENSE.
*
*
* $Id$
*/

View File

@@ -1,14 +1,18 @@
/*
* Cogent CSB337 Linker script
* Cogent CSB637 linker script
*
* Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
*
* Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
* File from the old CSB337 RTEMS BSP
*
* Modified by Joel Sherill
* from OAR Corporation and
* Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
*
* http://www.rtems.com/license/LICENSE.
*
*
* $Id$
*/

View File

@@ -1,11 +1,21 @@
/*
* CSB337 Memory Map
* CSB337 and CSB637 Memory map
*
* Copyright (c) 2004 by Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
* Copyright (c) 2004 by Jay Monkman <jtm@lopingdog.com>
* File from the old CSB337 RTEMS BSP
*
* Modified by Joel Sherill
* from OAR Corporation and
* Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#include <rtems.h>
#include <libcpu/mmu.h>
@@ -19,13 +29,15 @@ mmu_sect_map_t mem_map[] = {
{0x00200000, 0x00000000, 1, MMU_CACHE_NONE}, /* SRAM */
{0x00200000, 0x00200000, 1, MMU_CACHE_NONE}, /* SRAM */
{0x10000000, 0x10000000, 8, MMU_CACHE_NONE}, /* FLASH */
#if csb637
#if csb637 /* CSB637 or KIT637_V6 */
{0x20000000, 0x20000000, 64, MMU_CACHE_WTHROUGH}, /* SDRAM */
#elif kit637_v6
{0x20000000, 0x20000000, 64, MMU_CACHE_WTHROUGH}, /* SDRAM */
#else /* CSB337 */
{0x20000000, 0x20000000, 32, MMU_CACHE_WTHROUGH}, /* SDRAM */
#endif
#if ENABLE_LCD
{0x30000000, 0x30000000, 8, MMU_CACHE_NONE}, /* video */
{0x30000000, 0x30000000, 8, MMU_CACHE_NONE}, /* Video buffer - 8MB */
#endif
{0x40000000, 0x40000000, 1, MMU_CACHE_NONE}, /* Expansion CS0 */
{0x50000000, 0x50000000, 1, MMU_CACHE_NONE}, /* CF CE 1 */

View File

@@ -2,6 +2,9 @@
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* Modified by Fernando Nicodemos <fgnicodemos@terra.com.br>
* from NCB - Sistemas Embarcados Ltda. (Brazil)
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.