Move Mongoose-V specific devices into BSP.

Putting the duart in libcpu was very optimistic and presumptuous.
It has never been used again on another SoC and is BSP specific.
This commit is contained in:
Joel Sherrill
2014-10-08 15:06:52 -05:00
parent 037b57ae0c
commit 8536b67bab
15 changed files with 85 additions and 45 deletions

View File

@@ -16,6 +16,11 @@ include_bsp_HEADERS += include/irq.h
nodist_include_HEADERS = include/bspopts.h
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
nodist_include_bsp_HEADERS += include/lr33000.h
nodist_include_bsp_HEADERS += include/lr333x0.h
nodist_include_bsp_HEADERS += include/mongoose-v.h
nodist_include_bsp_HEADERS += include/r3000.h
nodist_include_bsp_HEADERS += console/mg5uart.h
DISTCLEANFILES = include/bspopts.h
noinst_PROGRAMS =
@@ -47,6 +52,7 @@ libbsp_a_SOURCES += clock/clockdrv.c
libbsp_a_SOURCES += ../../shared/clockdrv_shell.h
# console
libbsp_a_SOURCES += console/conscfg.c
libbsp_a_SOURCES += console/mg5uart.c
libbsp_a_SOURCES += ../../shared/console.c
libbsp_a_SOURCES += ../../shared/console_select.c
libbsp_a_SOURCES += ../../shared/console_control.c
@@ -75,7 +81,6 @@ gdbstub_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/cache.rel
libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/interrupts.rel
libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/mongoosev/duart.rel
include $(srcdir)/preinstall.am
include $(top_srcdir)/../../../../automake/local.am

View File

@@ -1,6 +1,56 @@
BSP supporting the on-CPU capabilities of the Synova Mongoose-V.
This BSP assumes that basic HW initialization is performed by
PMON.
The Synova Mongoose-V is a radiation hardened derivative of the
LSI 33K with on-CPU peripherals.
This BSP assumes that basic HW initialization is performed by PMON.
Status
======
Per-task floating point enable/disable is supported for both immediate
and deferred FPU context swaps.
Interrupt Levels are adapted reasonably well to the MIPS interrupt
model. Bit 0 of the int level is a global enable/disable, corresponding
to bit 0 of the processor's SR register. Bits 1 thru 6 are configured
as masks for the Int0 thru Int5 interrupts. The 2 software interrupt
bits are always enabled by default. Each task maintains its own
Interrupt Level setting, reconfiguring the SR register's interrupt bits
whenever scheduled in. The software ints, though not addressable via
the various Interrupt Level functions, are maintained on a per-task
basis, so if software manipulates them directly, things should behave as
expected. At the time of these udpates, the Interrupt Level was only 8
bits, and completely supporting the global enable, software ints and the
hardware ints would require 9 bits. When more than 8 bits are
available, there is no reason the software interrupts could not be added
to the Interrupt Level.
While supporting the Int0 thru Int5 bits in this way doesn't seem
wonderfully useful, it does increase the level of compliance with the
RTEMS spec.
Interrupt Level 0 corresponds to interrupts globally enabled, software
ints enabled and Int0 thru Int5 enabled. If values other than 0 are
supplied, they should be formulated to impose the desired bitmask.
Interrupt priority is not a strong concept on this bsp, it is provided
only by the order in which interrupts are checked.
If during the vectoring of an interrupt, others arrive, they will all be
processed in accordance with their ordering in SR & the peripheral
register. For example, if while we're vectoring Int4, Int3 and Int5 are
asserted, Int3 will be serviced before Int5. The peripheral interrupts
are individually vectored as a consequence of Int5 being asserted,
however Int5 is not itself vectored. Within the set of peripheral
interrupts, bit 0 is vectored first, 31 is last.
Interrupts are not nested for MIPS1 or MIPS3 processors, but are
processed serially as possible. On an unloaded 50 task RTEMS program,
runnning on a 12mhz MIPS1 processor, worst-case latencies of 100us were
observed, the average being down at 60us or below.
These features are principally a consequence of fixes and tweaks to the
MIPS1 and MIPS3 processor support, and should be equally effective on
both levels of MIPS processors for any of their bsp's.
Address Map
===========

View File

@@ -21,7 +21,7 @@
#include <bsp/irq.h>
#include <libchip/serial.h>
#include <libchip/mg5uart.h>
#include <bsp/mg5uart.h>
/* #define CONSOLE_USE_INTERRUPTS */

View File

@@ -20,9 +20,9 @@
#include <stdlib.h>
#include <libchip/serial.h>
#include <libchip/mg5uart.h>
#include <libchip/sersupp.h>
#include <libcpu/mongoose-v.h>
#include <bsp/mg5uart.h>
#include <bsp/mongoose-v.h>
#include <bsp/irq.h>
#include <bsp.h>

View File

@@ -28,7 +28,7 @@ extern "C" {
#include <rtems/iosupp.h>
#include <rtems/console.h>
#include <rtems/clockdrv.h>
#include <libcpu/mongoose-v.h>
#include <bsp/mongoose-v.h>
#define BSP_FEATURE_IRQ_EXTENSION
#define BSP_SHARED_HANDLER_SUPPORT 1

View File

@@ -15,7 +15,7 @@
#include <rtems.h>
#include <stdlib.h>
#include <libcpu/mongoose-v.h>
#include <bsp/mongoose-v.h>
#include <rtems/mips/iregdef.h>
#include <rtems/mips/idtcpu.h>

View File

@@ -69,6 +69,26 @@ $(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INC
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h
$(PROJECT_INCLUDE)/bsp/lr33000.h: include/lr33000.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/lr33000.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/lr33000.h
$(PROJECT_INCLUDE)/bsp/lr333x0.h: include/lr333x0.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/lr333x0.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/lr333x0.h
$(PROJECT_INCLUDE)/bsp/mongoose-v.h: include/mongoose-v.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/mongoose-v.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/mongoose-v.h
$(PROJECT_INCLUDE)/bsp/r3000.h: include/r3000.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/r3000.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/r3000.h
$(PROJECT_INCLUDE)/bsp/mg5uart.h: console/mg5uart.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/mg5uart.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/mg5uart.h
$(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h

View File

@@ -23,7 +23,7 @@
#include <string.h>
#include <bsp.h>
#include <libcpu/mongoose-v.h>
#include <bsp/mongoose-v.h>
#include <libcpu/isr_entries.h>
#include <bsp/irq-generic.h>

View File

@@ -11,7 +11,7 @@
#include <rtems.h>
#include <rtems/bspIo.h>
#include <libcpu/mongoose-v.h>
#include <bsp/mongoose-v.h>
#include "gdb_if.h"
#include <rtems/libio.h>

View File

@@ -31,10 +31,6 @@ if tx49
interrupts_CPPFLAGS = -DTX49
endif
if mongoosev
interrupts_CPPFLAGS = -DMONGOOSEV
endif
noinst_PROGRAMS += shared/interrupts.rel
shared_interrupts_rel_SOURCES = shared/interrupts/installisrentries.c \
shared/interrupts/isr_entries.S shared/interrupts/isr_entries.h
@@ -42,23 +38,6 @@ shared_interrupts_rel_CPPFLAGS = $(AM_CPPFLAGS) $(interrupts_CPPFLAGS)
shared_interrupts_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
include_libcpu_HEADERS += shared/interrupts/isr_entries.h
EXTRA_DIST += mongoosev/README
EXTRA_DIST += mongoosev/duart/README.mguart
if mongoosev
include_libcpu_HEADERS += mongoosev/include/mongoose-v.h
## mongoosev/duart
include_libchipdir = $(includedir)/libchip
include_libchip_HEADERS = mongoosev/duart/mg5uart.h
noinst_PROGRAMS += mongoosev/duart.rel
mongoosev_duart_rel_SOURCES = mongoosev/duart/mg5uart.c \
mongoosev/duart/mg5uart.h mongoosev/duart/mg5uart_reg.c
mongoosev_duart_rel_CPPFLAGS = $(AM_CPPFLAGS)
mongoosev_duart_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
endif
if tx39
include_libcpu_HEADERS += tx39/include/tx3904.h
endif

View File

@@ -26,20 +26,6 @@ $(PROJECT_INCLUDE)/libcpu/isr_entries.h: shared/interrupts/isr_entries.h $(PROJE
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/isr_entries.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/isr_entries.h
if mongoosev
$(PROJECT_INCLUDE)/libcpu/mongoose-v.h: mongoosev/include/mongoose-v.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/mongoose-v.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libcpu/mongoose-v.h
$(PROJECT_INCLUDE)/libchip/$(dirstamp):
@$(MKDIR_P) $(PROJECT_INCLUDE)/libchip
@: > $(PROJECT_INCLUDE)/libchip/$(dirstamp)
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/libchip/$(dirstamp)
$(PROJECT_INCLUDE)/libchip/mg5uart.h: mongoosev/duart/mg5uart.h $(PROJECT_INCLUDE)/libchip/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libchip/mg5uart.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/libchip/mg5uart.h
endif
if tx39
$(PROJECT_INCLUDE)/libcpu/tx3904.h: tx39/include/tx3904.h $(PROJECT_INCLUDE)/libcpu/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/libcpu/tx3904.h