forked from Imagelibrary/rtems
2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
* Makefile.am, preinstall.am: Added generic interrupt support modules. * include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION. * startup/bspstart.c, network/network.c: Interrupt support changes. * console/uart.c: Fixed warnings.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* Makefile.am, preinstall.am: Added generic interrupt support modules.
|
||||
* include/bsp.h: Define BSP_FEATURE_IRQ_EXTENSION.
|
||||
* startup/bspstart.c, network/network.c: Interrupt support changes.
|
||||
* console/uart.c: Fixed warnings.
|
||||
|
||||
2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* make/custom/rtl22xx.cfg: Use VFP floating point model.
|
||||
|
||||
@@ -13,6 +13,8 @@ dist_project_lib_DATA = bsp_specs
|
||||
include_HEADERS = include/bsp.h
|
||||
include_HEADERS += ../../shared/include/tm27.h
|
||||
|
||||
include_bsp_HEADERS =
|
||||
|
||||
nodist_include_HEADERS = include/bspopts.h
|
||||
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
|
||||
DISTCLEANFILES = include/bspopts.h
|
||||
@@ -40,6 +42,14 @@ libbsp_a_SOURCES += ../../shared/bsplibc.c ../../shared/bsppost.c \
|
||||
../../shared/gnatinstallhandler.c
|
||||
# console
|
||||
libbsp_a_SOURCES += ../../shared/console.c
|
||||
# IRQ
|
||||
include_bsp_HEADERS += ../../shared/include/irq-generic.h \
|
||||
../../shared/include/irq-info.h
|
||||
libbsp_a_SOURCES += ../../shared/src/irq-generic.c \
|
||||
../../shared/src/irq-legacy.c \
|
||||
../../shared/src/irq-info.c \
|
||||
../../shared/src/irq-shell.c \
|
||||
../../shared/src/irq-server.c
|
||||
# simple_abort
|
||||
libbsp_a_SOURCES += ../shared/abort/simple_abort.c
|
||||
# debugio
|
||||
|
||||
@@ -39,7 +39,7 @@ int dbg_dly;
|
||||
static int uart_first_open(int major, int minor, void *arg);
|
||||
static int uart_last_close(int major, int minor, void *arg);
|
||||
static int uart_read(int minor);
|
||||
static int uart_write(int minor, const char *buf, int len);
|
||||
static ssize_t uart_write(int minor, const char *buf, size_t len);
|
||||
static void uart_init(int minor);
|
||||
static void uart_write_polled(int minor, char c);
|
||||
static int uart_set_attributes(int minor, const struct termios *t);
|
||||
@@ -180,9 +180,9 @@ static int uart_read(int minor)
|
||||
*
|
||||
* return 1 on success, -1 on error
|
||||
*/
|
||||
static int uart_write(int minor, const char *buf, int len)
|
||||
static ssize_t uart_write(int minor, const char *buf, size_t len)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
if (minor == 0) {
|
||||
for (i = 0; i < len; i++) {
|
||||
|
||||
@@ -25,6 +25,7 @@ extern "C" {
|
||||
#include <rtems/console.h>
|
||||
#include <rtems/clockdrv.h>
|
||||
|
||||
#define BSP_FEATURE_IRQ_EXTENSION
|
||||
|
||||
#define CONFIG_ARM_CLK 60000000L
|
||||
/* cclk=cco/(2*P) */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*Note: this file is copy from 7312 BSP, and untested yet*/
|
||||
#include <rtems.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <irq.h>
|
||||
#include <bsp/irq.h>
|
||||
#include <libchip/cs8900.h>
|
||||
|
||||
#define CS8900_BASE 0x20000300
|
||||
@@ -10,7 +10,7 @@ unsigned int bsp_cs8900_memory_base = 0;
|
||||
cs8900_device *g_cs;
|
||||
void cs8900_isr(rtems_irq_hdl_param unused);
|
||||
rtems_irq_connect_data cs8900_isr_data = {LPC22xx_INTERRUPT_EINT2,
|
||||
(rtems_irq_hdl)cs8900_isr,
|
||||
cs8900_isr,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
@@ -69,3 +69,11 @@ $(PROJECT_INCLUDE)/uart.h: ../../arm/shared/comm/uart.h $(PROJECT_INCLUDE)/$(dir
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/uart.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/uart.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/irq-generic.h: ../../shared/include/irq-generic.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-generic.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-generic.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/irq-info.h: ../../shared/include/irq-info.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq-info.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq-info.h
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/irq-generic.h>
|
||||
#include <lpc22xx.h>
|
||||
|
||||
/*
|
||||
* Function prototypes
|
||||
*/
|
||||
extern void rtems_irq_mngt_init(void);
|
||||
extern void rtems_exception_init_mngt(void);
|
||||
extern void UART0_Ini(void);
|
||||
extern void printi(unsigned long);
|
||||
@@ -77,15 +77,6 @@ void bsp_start_default( void )
|
||||
// MAMTIM = 3;
|
||||
//MAMCR = 2;
|
||||
|
||||
/* init VIC */
|
||||
VICIntEnClr = 0xffffffff;
|
||||
VICVectAddr = 0;
|
||||
VICIntSelect = 0;
|
||||
|
||||
/* disable interrupts */
|
||||
/* Setup interrupt controller.*/
|
||||
VICProtection = 0;
|
||||
|
||||
UART0_Ini();
|
||||
|
||||
/*
|
||||
@@ -96,7 +87,9 @@ void bsp_start_default( void )
|
||||
/*
|
||||
* Init rtems interrupt management
|
||||
*/
|
||||
rtems_irq_mngt_init();
|
||||
if (bsp_interrupt_initialize() != RTEMS_SUCCESSFUL) {
|
||||
_CPU_Fatal_halt(0xe);
|
||||
}
|
||||
} /* bsp_start */
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user