mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-11 18:13:10 +00:00
Added css_iface -- assumes ../include/dy_supplied.
This commit is contained in:
@@ -21,5 +21,5 @@ all: $(SRCS)
|
|||||||
|
|
||||||
# wrapup is the one that actually builds and installs the library
|
# wrapup is the one that actually builds and installs the library
|
||||||
# from the individual .rel files built in other directories
|
# from the individual .rel files built in other directories
|
||||||
SUB_DIRS=include clock console startup start timer \
|
SUB_DIRS=include clock console css_iface startup start timer \
|
||||||
tod $(KA9Q_DRIVER) wrapup
|
tod $(KA9Q_DRIVER) wrapup
|
||||||
|
|||||||
59
c/src/lib/libbsp/powerpc/dmv177/css_iface/Makefile.in
Normal file
59
c/src/lib/libbsp/powerpc/dmv177/css_iface/Makefile.in
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
#
|
||||||
|
# $Id$
|
||||||
|
#
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
VPATH = @srcdir@
|
||||||
|
RTEMS_ROOT = @top_srcdir@
|
||||||
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
|
PGM=${ARCH}/css_iface.rel
|
||||||
|
|
||||||
|
# C source names, if any, go here -- minus the .c
|
||||||
|
C_PIECES=
|
||||||
|
C_FILES=$(C_PIECES:%=%.c)
|
||||||
|
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
|
||||||
|
|
||||||
|
H_FILES=
|
||||||
|
|
||||||
|
# Assembly source names, if any, go here -- minus the .s
|
||||||
|
S_PIECES=
|
||||||
|
S_FILES=$(S_PIECES:%=%.s)
|
||||||
|
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
|
||||||
|
|
||||||
|
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
|
||||||
|
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
|
||||||
|
|
||||||
|
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
||||||
|
include $(RTEMS_ROOT)/make/leaf.cfg
|
||||||
|
|
||||||
|
#
|
||||||
|
# (OPTIONAL) Add local stuff here using +=
|
||||||
|
#
|
||||||
|
|
||||||
|
DEFINES +=
|
||||||
|
CPPFLAGS +=
|
||||||
|
CFLAGS +=
|
||||||
|
|
||||||
|
LD_PATHS +=
|
||||||
|
LD_LIBS +=
|
||||||
|
LDFLAGS +=
|
||||||
|
|
||||||
|
#
|
||||||
|
# Add your list of files to delete here. The config files
|
||||||
|
# already know how to delete some stuff, so you may want
|
||||||
|
# to just run 'make clean' first to see what gets missed.
|
||||||
|
# 'make clobber' already includes 'make clean'
|
||||||
|
#
|
||||||
|
|
||||||
|
CLEAN_ADDITIONS +=
|
||||||
|
CLOBBER_ADDITIONS +=
|
||||||
|
|
||||||
|
${PGM}: ${SRCS} ${OBJS}
|
||||||
|
$(make-rel)
|
||||||
|
|
||||||
|
all: ${ARCH} $(SRCS) $(PGM)
|
||||||
|
|
||||||
|
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
|
||||||
|
install: all
|
||||||
149
c/src/lib/libbsp/powerpc/dmv177/css_iface/css_iface.c
Normal file
149
c/src/lib/libbsp/powerpc/dmv177/css_iface/css_iface.c
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
#include <Css.h>
|
||||||
|
|
||||||
|
rtems_unsigned32 Css_Id(
|
||||||
|
rtems_vector_number vector /* vector number */
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_unsigned32 id;
|
||||||
|
|
||||||
|
switch ( vector ) {
|
||||||
|
case DMV170_DUART_IRQ:
|
||||||
|
case DMV170_ETHERNET_IRQ:
|
||||||
|
case DMV170_SCSI_IRQ:
|
||||||
|
case DMV170_SCC_IRQ:
|
||||||
|
id = CSS_DARF_INT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DMV170_MEZZANINE_IRQ:
|
||||||
|
id = CSS_MAXPACK_INT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DMV170_TICK_IRQ:
|
||||||
|
id = CSS_TICK_INT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DMV170_LOCATION_MON_IRQ:
|
||||||
|
id = CSS_LM_INT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DMV170_SCV64_IRQ:
|
||||||
|
id = CSS_SCV_VME_INT;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DMV170_RTC_IRQ:
|
||||||
|
id = CSS_RTC_INT;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
rtems_vector_number Vector_id(
|
||||||
|
rtems_unsigned32 id
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_vector_number vector;
|
||||||
|
|
||||||
|
switch ( id ) {
|
||||||
|
case CSS_ACFAIL_INT:
|
||||||
|
vector = DMV170_ACFAIL_IRQ;
|
||||||
|
break;
|
||||||
|
case CSS_SYSFAIL_INT:
|
||||||
|
vector = DMV170_SYSFAIL_IRQ;
|
||||||
|
break;
|
||||||
|
case CSS_WATCHDOG_INT:
|
||||||
|
vector = DMV170_WATCHDOG_IRQ;
|
||||||
|
break;
|
||||||
|
case CSS_BI_INT:
|
||||||
|
vector = DMV170_BI_IRQ;
|
||||||
|
break;
|
||||||
|
case CSS_LM_INT:
|
||||||
|
vector = DMV170_LOCATION_MON_IRQ;
|
||||||
|
break;
|
||||||
|
case CSS_TICK_INT:
|
||||||
|
vector = DMV170_TICK_IRQ;
|
||||||
|
break;
|
||||||
|
case CSS_DARF_INT:
|
||||||
|
vector = DMV170_DUART_IRQ;
|
||||||
|
break;
|
||||||
|
case CSS_RAM_PARITY_INT:
|
||||||
|
vector = DMV170_RAM_PARITY_IRQ;
|
||||||
|
break;
|
||||||
|
case CSS_DARF_BUS_ERROR:
|
||||||
|
vector = DMV170_DARF_BUS_ERROR_IRQ;
|
||||||
|
break;
|
||||||
|
case CSS_PERIPHERAL_INT:
|
||||||
|
vector = DMV170_PERIPHERAL_IRQ;
|
||||||
|
break;
|
||||||
|
case CSS_MAXPACK_INT:
|
||||||
|
vector = DMV170_MEZZANINE_IRQ_0;assert(0);
|
||||||
|
break;
|
||||||
|
case CSS_SCV_VME_INT:
|
||||||
|
vector = DMV170_MEZZANINE_IRQ_1;assert(0);
|
||||||
|
break;
|
||||||
|
case CSS_RTC_INT:
|
||||||
|
vector = DMV170_RTC_IRQ;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return vector;
|
||||||
|
}
|
||||||
|
|
||||||
|
void enable_card_interrupt(
|
||||||
|
rtems_vector_number vector /* vector number */
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_unsigned32 Id;
|
||||||
|
Id = Css_Id(vector);
|
||||||
|
|
||||||
|
Enable_int(Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
rtems_vector_number Get_interrupt()
|
||||||
|
{
|
||||||
|
rtems_vector_number vector;
|
||||||
|
rtems_unsigned32 id;
|
||||||
|
|
||||||
|
if ( Get_int_status(CSS_ACFAIL_INT) )
|
||||||
|
vector = DMV170_ACFAIL_IRQ;
|
||||||
|
else if ( Get_int_status( CSS_SYSFAIL_INT) )
|
||||||
|
vector = DMV170_SYSFAIL_IRQ;
|
||||||
|
else if ( Get_int_status( CSS_WATCHDOG_INT) )
|
||||||
|
vector = DMV170_WATCHDOG_IRQ;
|
||||||
|
else if ( Get_int_status( CSS_BI_INT) )
|
||||||
|
vector = DMV170_BI_IRQ;
|
||||||
|
else if ( Get_int_status( CSS_LM_INT) )
|
||||||
|
vector = DMV170_LOCATION_MON_IRQ;
|
||||||
|
else if ( Get_int_status( CSS_TICK_INT) )
|
||||||
|
vector = DMV170_TICK_IRQ;
|
||||||
|
else if ( Get_int_status( CSS_DARF_INT) )
|
||||||
|
vector = DMV170_DUART_IRQ;
|
||||||
|
else if ( Get_int_status( CSS_RAM_PARITY_INT) )
|
||||||
|
vector = DMV170_RAM_PARITY_IRQ;
|
||||||
|
else if ( Get_int_status( CSS_DARF_BUS_ERROR) )
|
||||||
|
vector = DMV170_DARF_BUS_ERROR_IRQ;
|
||||||
|
else if ( Get_int_status( CSS_PERIPHERAL_INT) )
|
||||||
|
vector = DMV170_PERIPHERAL_IRQ;
|
||||||
|
else if ( Get_int_status( CSS_MAXPACK_INT) ) {
|
||||||
|
vector = DMV170_MEZZANINE_IRQ_0;
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
|
else if ( Get_int_status( CSS_SCV_VME_INT) ) {
|
||||||
|
vector = DMV170_MEZZANINE_IRQ_1;
|
||||||
|
assert(0);
|
||||||
|
}
|
||||||
|
else if ( Get_int_status( CSS_RTC_INT) )
|
||||||
|
vector = DMV170_RTC_IRQ;
|
||||||
|
|
||||||
|
return vector;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Clear_interrupt(
|
||||||
|
rtems_vector_number vector
|
||||||
|
)
|
||||||
|
{
|
||||||
|
rtems_unsigned32 Id;
|
||||||
|
Id = Css_Id(vector);
|
||||||
|
|
||||||
|
Clear_int(Id);
|
||||||
|
}
|
||||||
@@ -13,7 +13,7 @@ KA9Q_DRIVER_yes_V = network
|
|||||||
KA9Q_DRIVER = $(KA9Q_DRIVER_$(HAS_KA9Q)_V)
|
KA9Q_DRIVER = $(KA9Q_DRIVER_$(HAS_KA9Q)_V)
|
||||||
|
|
||||||
# pieces specific to this BSP
|
# pieces specific to this BSP
|
||||||
BSP_PIECES=startup clock console timer tod $(KA9Q_DRIVER)
|
BSP_PIECES=startup clock console css_iface timer tod $(KA9Q_DRIVER)
|
||||||
|
|
||||||
# pieces to pick up out of libcpu/$(RTEMS_CPU)
|
# pieces to pick up out of libcpu/$(RTEMS_CPU)
|
||||||
CPU_PIECES=
|
CPU_PIECES=
|
||||||
|
|||||||
Reference in New Issue
Block a user