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

* Makefile.am, configure.ac, console/uarts.c: Add initial support for
	Kit637 version of CSB637.
	* README.kit637_v6, make/custom/kit637_v6.cfg: New files.
This commit is contained in:
Joel Sherrill
2009-11-21 16:06:21 +00:00
parent 4eee8434e1
commit bb6ef07841
6 changed files with 219 additions and 14 deletions

View File

@@ -1,3 +1,9 @@
2009-11-21 Fernando Nicodemos <fgnicodemos@terra.com.br>
* Makefile.am, configure.ac, console/uarts.c: Add initial support for
Kit637 version of CSB637.
* README.kit637_v6, make/custom/kit637_v6.cfg: New files.
2009-11-03 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Add RTEMS_BSP_LINKCMDS.

View File

@@ -12,8 +12,11 @@ dist_project_lib_DATA = bsp_specs
include_HEADERS = include/bsp.h
include_HEADERS += ../../shared/include/tm27.h
if ENABLE_LCD
include_HEADERS += include/sed1356.h
endif
if ENABLE_UMON
include_umondir = $(includedir)/umon
include_umon_HEADERS = ../../shared/umon/cli.h
include_umon_HEADERS += ../../shared/umon/monlib.h
@@ -21,6 +24,7 @@ include_umon_HEADERS += ../../shared/umon/tfs.h
include_rtemsdir = $(includedir)/rtems
include_rtems_HEADERS = ../../shared/umon/umon.h
endif
nodist_include_HEADERS = include/bspopts.h
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
@@ -35,18 +39,20 @@ nodist_include_HEADERS += console/font8x16.h
endif
noinst_LIBRARIES = libbspstart.a
libbspstart_a_SOURCES = start/start.S
project_lib_DATA = start.$(OBJEXT)
project_lib_DATA += startup/linkcmds
EXTRA_DIST = startup/linkcmds.csb337
EXTRA_DIST += startup/linkcmds.csb637
EXTRA_DIST += README
EXTRA_DIST += README.kit637_v6
noinst_LIBRARIES += libbsp.a
libbsp_a_SOURCES =
# startup
libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \
libbsp_a_SOURCES = ../../shared/bsplibc.c ../../shared/bsppost.c \
../../shared/bsppredriverhook.c ../../shared/bspgetworkarea.c \
../../shared/bsppretaskinghook.c startup/bspstart.c \
../../shared/bspclean.c startup/bspreset.c \
@@ -60,9 +66,14 @@ endif
# abort
libbsp_a_SOURCES += ../shared/abort/abort.c
# umon
if ENABLE_UMON
libbsp_a_SOURCES += ../../shared/umon/umonrtemsglue.c \
../../shared/umon/monlib.c ../../shared/umon/tfsDriver.c \
../../shared/umon/umoncons.c startup/umonsupp.c
endif
if ENABLE_UMON_CONSOLE
libbsp_a_SOURCES += ../../shared/umon/umoncons.c
endif
if HAS_NETWORKING
network_CPPFLAGS = -D__INSIDE_RTEMS_BSD_TCPIP_STACK__
@@ -75,6 +86,7 @@ endif
libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/arm920.rel \
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/clock.rel \
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/dbgu.rel \
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/usart.rel \
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/timer.rel \
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/pmc.rel \
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/irq.rel

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
# Fernando Nicodemos <fgnicodemos@terra.com.br>
# from NCB - Sistemas Embarcados Ltda. (Brazil)
#
This is the BSP for Cogent Computer System's KIT637_V6. This is an
updated version of the CSB337 board with a number of optional peripheals.
This KIT is implemented by CSB637 single board computer using the
Atmel AT91RM9200 CPU and the CSB937 target main board. It uses an
Optrex LCD (T-51750AA, 640x480) and Touchscreen (not supported in this
BSP). The IDE and USB (host and device) interfaces are also not supported.
The SD and Compact Flash cards drivers are still under development.
The differences in the CSB637 single board computer are very slight but
important:
CSB337 CSB637
========== ==========
Clock speed ? ?
External memory 16MB SDRAM 64MB SDRAM
Flash memory ? ?
Video buffer 1MB 8MB
Video driver S1D13706 S1D13506
PHY Layer LXT971ALC BCM5221
?? Some GPIO or interrupts moved around.

View File

@@ -18,21 +18,51 @@ RTEMS_PROG_CCAS
RTEMS_CHECK_NETWORKING
AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
RTEMS_BSPOPTS_SET([csb637],[kit637_v6],[1])
RTEMS_BSPOPTS_SET([csb637],[csb637],[1])
RTEMS_BSPOPTS_SET([csb637],[*],[0])
RTEMS_BSPOPTS_HELP([csb637],
[If defined, this indicates that the BSP is being built for the
csb637 variant.])
RTEMS_BSPOPTS_SET([ENABLE_LCD],[kit637_v6],[0])
RTEMS_BSPOPTS_SET([ENABLE_LCD],[*],[0])
RTEMS_BSPOPTS_HELP([ENABLE_LCD],
[If defined, enable use of the SED1356 controller and LCD.])
AM_CONDITIONAL(ENABLE_LCD,test "$ENABLE_LCD" = "1")
RTEMS_BSPOPTS_SET([ENABLE_UMON],[*],[1])
RTEMS_BSPOPTS_HELP([ENABLE_UMON],
[If defined, enable use of the uMon console.])
AM_CONDITIONAL(ENABLE_UMON,test "$ENABLE_UMON" = "1")
RTEMS_BSPOPTS_SET([ENABLE_UMON_CONSOLE],[*],[1])
RTEMS_BSPOPTS_HELP([ENABLE_UMON_CONSOLE],
[If defined, enable use of the MicroMonitor console device.])
AM_CONDITIONAL(ENABLE_LCD,test "$ENABLE_UMON_CONSOLE" = "1")
AM_CONDITIONAL(ENABLE_UMON_CONSOLE,test "$ENABLE_UMON_CONSOLE" = "1")
## If ENABLE_UMON is 0 and ENABLE_UMON_CONSOLE is 1, then it is an error.
## TODO: Catch this error.
RTEMS_BSPOPTS_SET([ENABLE_USART0],[*],[1])
RTEMS_BSPOPTS_HELP([ENABLE_USART0],
[If defined, enable use of the USART 0.])
AM_CONDITIONAL(ENABLE_USART0,test "$ENABLE_USART0" = "1")
RTEMS_BSPOPTS_SET([ENABLE_USART1],[*],[1])
RTEMS_BSPOPTS_HELP([ENABLE_USART1],
[If defined, enable use of the USART 1.])
AM_CONDITIONAL(ENABLE_USART1,test "$ENABLE_USART1" = "1")
RTEMS_BSPOPTS_SET([ENABLE_USART2],[*],[1])
RTEMS_BSPOPTS_HELP([ENABLE_USART2],
[If defined, enable use of the USART 2.])
AM_CONDITIONAL(ENABLE_USART2,test "$ENABLE_USART2" = "1")
RTEMS_BSPOPTS_SET([ENABLE_USART3],[*],[1])
RTEMS_BSPOPTS_HELP([ENABLE_USART3],
[If defined, enable use of the USART 3.])
AM_CONDITIONAL(ENABLE_USART3,test "$ENABLE_USART3" = "1")
RTEMS_BSP_CLEANUP_OPTIONS(1, 1)
RTEMS_BSP_LINKCMDS

View File

@@ -1,5 +1,5 @@
/*
* Console driver for CSB337
* Console driver for for KIT637_V6 (CSB637)
*
* This driver uses the shared console driver in
* ...../libbsp/shared/console.c
@@ -7,14 +7,18 @@
* Copyright (c) 2003 by Cogent Computer Systems
* Written by Jay Monkman <jtm@lopingdog.com>
*
* 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.
*
* FrameBuffer Console Device Support added By Joel Sherrill, 2009.
* Modified and FrameBuffer Console Device Support added by
* Joel Sherrill, 2009.
*
* $Id$
*/
*/
#include <bsp.h>
#include <rtems/libio.h>
@@ -30,21 +34,52 @@
/* rtems console uses the following minor number */
rtems_device_minor_number Console_Port_Minor = 0;
extern console_fns dbgu_fns;
#if ENABLE_LCD
extern console_fns fbcons_fns;
#define LCD_DEVICE 1
#define LCD_DEV 1
#else
#define LCD_DEVICE 0
#define LCD_DEV 0
#endif
#if ENABLE_UMON_CONSOLE
#if (ENABLE_UMON && ENABLE_UMON_CONSOLE)
extern console_fns umoncons_fns;
#define UMON_CONSOLE_DEVICE 1
#define UMON_CONS_DEV 1
#else
#define UMON_CONSOLE_DEVICE 0
#define UMON_CONS_DEV 0
#endif
#define NUM_DEVS (1 + LCD_DEVICE + UMON_CONSOLE_DEVICE)
#if ENABLE_USART0 || ENABLE_USART1 || ENABLE_USART2 || ENABLE_USART3
extern console_fns usart_polling_fns;
#endif
#if ENABLE_USART0
#define USART0_DEV 1
#else
#define USART0_DEV 0
#endif
#if ENABLE_USART1
#define USART1_DEV 1
#else
#define USART1_DEV 0
#endif
#if ENABLE_USART2
#define USART2_DEV 1
#else
#define USART2_DEV 0
#endif
#if ENABLE_USART3
#define USART3_DEV 1
#else
#define USART3_DEV 0
#endif
#define NUM_DEVS \
(1 + LCD_DEV + UMON_CONS_DEV + \
USART0_DEV + USART1_DEV + USART2_DEV + USART3_DEV)
/* These are used by code in console.c */
unsigned long Console_Port_Count = NUM_DEVS;
@@ -100,7 +135,7 @@ console_tbl Console_Port_Tbl[] = {
0 /* ulIntVector - NOT USED */
},
#endif
#if ENABLE_UMON_CONSOLE
#if ENABLE_UMON
{
"/dev/umon", /* sDeviceName */
SERIAL_CUSTOM, /* deviceType */
@@ -119,11 +154,94 @@ console_tbl Console_Port_Tbl[] = {
NULL, /* setData - NOT USED */
0, /* ulClock - NOT USED */
0 /* ulIntVector - NOT USED */
},
#endif
#if ENABLE_USART0
{
"/dev/com1", /* sDeviceName */
SERIAL_CUSTOM, /* deviceType */
&usart_polling_fns,/* pDeviceFns */
NULL, /* deviceProbe */
NULL, /* pDeviceFlow */
0, /* ulMargin - NOT USED */
0, /* ulHysteresis - NOT USED */
NULL, /* pDeviceParams */
USART0_BASE, /* ulCtrlPort1 - Pointer to USART 0 regs */
0, /* ulCtrlPort2 - NOT USED */
0, /* ulDataPort - NOT USED */
NULL, /* getRegister - NOT USED */
NULL, /* setRegister - NOT USED */
NULL, /* getData - NOT USED */
NULL, /* setData - NOT USED */
0, /* ulClock - NOT USED */
0 /* ulIntVector - NOT USED */
},
#endif
#if ENABLE_USART1
{
"/dev/com2", /* sDeviceName */
SERIAL_CUSTOM, /* deviceType */
&usart_polling_fns,/* pDeviceFns */
NULL, /* deviceProbe */
NULL, /* pDeviceFlow */
0, /* ulMargin - NOT USED */
0, /* ulHysteresis - NOT USED */
NULL, /* pDeviceParams */
USART1_BASE, /* ulCtrlPort1 - Pointer to USART 1 regs */
0, /* ulCtrlPort2 - NOT USED */
0, /* ulDataPort - NOT USED */
NULL, /* getRegister - NOT USED */
NULL, /* setRegister - NOT USED */
NULL, /* getData - NOT USED */
NULL, /* setData - NOT USED */
0, /* ulClock - NOT USED */
0 /* ulIntVector - NOT USED */
},
#endif
#if ENABLE_USART2
{
"/dev/com3", /* sDeviceName */
SERIAL_CUSTOM, /* deviceType */
&usart_polling_fns,/* pDeviceFns */
NULL, /* deviceProbe */
NULL, /* pDeviceFlow */
0, /* ulMargin - NOT USED */
0, /* ulHysteresis - NOT USED */
NULL, /* pDeviceParams */
USART2_BASE, /* ulCtrlPort1 - Pointer to USART 2 regs */
0, /* ulCtrlPort2 - NOT USED */
0, /* ulDataPort - NOT USED */
NULL, /* getRegister - NOT USED */
NULL, /* setRegister - NOT USED */
NULL, /* getData - NOT USED */
NULL, /* setData - NOT USED */
0, /* ulClock - NOT USED */
0 /* ulIntVector - NOT USED */
},
#endif
#if ENABLE_USART3
{
"/dev/com4", /* sDeviceName */
SERIAL_CUSTOM, /* deviceType */
&usart_polling_fns,/* pDeviceFns */
NULL, /* deviceProbe */
NULL, /* pDeviceFlow */
0, /* ulMargin - NOT USED */
0, /* ulHysteresis - NOT USED */
NULL, /* pDeviceParams */
USART3_BASE, /* ulCtrlPort1 - Pointer to USART 3 regs */
0, /* ulCtrlPort2 - NOT USED */
0, /* ulDataPort - NOT USED */
NULL, /* getRegister - NOT USED */
NULL, /* setRegister - NOT USED */
NULL, /* getData - NOT USED */
NULL, /* setData - NOT USED */
0, /* ulClock - NOT USED */
0 /* ulIntVector - NOT USED */
}
#endif
};
console_tbl *BSP_get_uart_from_minor(int minor)
{
return &Console_Port_Tbl[minor];

View File

@@ -0,0 +1,9 @@
#
# Config file for Cogent KIT637_V6 (CSB637) - AT91RM9200 SBC
# As a KIT637, the package includes a number of peripherals
# not normally on a CSB637.
#
# $Id$
#
include $(RTEMS_ROOT)/make/custom/csb337.cfg