[rtems commit] Move Mongoose-V specific devices into BSP.

Joel Sherrill joel at rtems.org
Fri Oct 10 15:08:38 UTC 2014


Module:    rtems
Branch:    master
Commit:    8536b67bab9886ea992f08fe23e35a84579df573
Changeset: http://git.rtems.org/rtems/commit/?id=8536b67bab9886ea992f08fe23e35a84579df573

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Wed Oct  8 15:06:52 2014 -0500

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.

---

 c/src/lib/libbsp/mips/genmongoosev/Makefile.am     |    7 ++-
 c/src/lib/libbsp/mips/genmongoosev/README          |   54 +++++++++++++++++++-
 .../mips/genmongoosev/console}/README.mguart       |    0
 .../lib/libbsp/mips/genmongoosev/console/conscfg.c |    2 +-
 .../mips/genmongoosev/console}/mg5uart.c           |    4 +-
 .../mips/genmongoosev/console}/mg5uart.h           |    0
 .../mips/genmongoosev/console}/mg5uart_reg.c       |    0
 c/src/lib/libbsp/mips/genmongoosev/include/bsp.h   |    2 +-
 .../mips/genmongoosev}/include/mongoose-v.h        |    0
 .../lib/libbsp/mips/genmongoosev/irq/vectorisrs.c  |    2 +-
 c/src/lib/libbsp/mips/genmongoosev/preinstall.am   |   20 +++++++
 .../libbsp/mips/genmongoosev/startup/bspstart.c    |    2 +-
 .../libbsp/mips/genmongoosev/startup/gdb-support.c |    2 +-
 c/src/lib/libcpu/mips/Makefile.am                  |   21 --------
 c/src/lib/libcpu/mips/preinstall.am                |   14 -----
 15 files changed, 85 insertions(+), 45 deletions(-)

diff --git a/c/src/lib/libbsp/mips/genmongoosev/Makefile.am b/c/src/lib/libbsp/mips/genmongoosev/Makefile.am
index fe21df4..a99fd56 100644
--- a/c/src/lib/libbsp/mips/genmongoosev/Makefile.am
+++ b/c/src/lib/libbsp/mips/genmongoosev/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/mips/genmongoosev/README b/c/src/lib/libbsp/mips/genmongoosev/README
index 97db696..d8b9bd5 100644
--- a/c/src/lib/libbsp/mips/genmongoosev/README
+++ b/c/src/lib/libbsp/mips/genmongoosev/README
@@ -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
 ===========
diff --git a/c/src/lib/libcpu/mips/mongoosev/duart/README.mguart b/c/src/lib/libbsp/mips/genmongoosev/console/README.mguart
similarity index 100%
rename from c/src/lib/libcpu/mips/mongoosev/duart/README.mguart
rename to c/src/lib/libbsp/mips/genmongoosev/console/README.mguart
diff --git a/c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c b/c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c
index 61ac56e..87df736 100644
--- a/c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c
+++ b/c/src/lib/libbsp/mips/genmongoosev/console/conscfg.c
@@ -21,7 +21,7 @@
 #include <bsp/irq.h>
 
 #include <libchip/serial.h>
-#include <libchip/mg5uart.h>
+#include <bsp/mg5uart.h>
 
 /* #define CONSOLE_USE_INTERRUPTS */
 
diff --git a/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.c b/c/src/lib/libbsp/mips/genmongoosev/console/mg5uart.c
similarity index 99%
rename from c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.c
rename to c/src/lib/libbsp/mips/genmongoosev/console/mg5uart.c
index 50f6586..e3243ad 100644
--- a/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.c
+++ b/c/src/lib/libbsp/mips/genmongoosev/console/mg5uart.c
@@ -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>
diff --git a/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.h b/c/src/lib/libbsp/mips/genmongoosev/console/mg5uart.h
similarity index 100%
rename from c/src/lib/libcpu/mips/mongoosev/duart/mg5uart.h
rename to c/src/lib/libbsp/mips/genmongoosev/console/mg5uart.h
diff --git a/c/src/lib/libcpu/mips/mongoosev/duart/mg5uart_reg.c b/c/src/lib/libbsp/mips/genmongoosev/console/mg5uart_reg.c
similarity index 100%
rename from c/src/lib/libcpu/mips/mongoosev/duart/mg5uart_reg.c
rename to c/src/lib/libbsp/mips/genmongoosev/console/mg5uart_reg.c
diff --git a/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h b/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h
index da4c198..5146b7f 100644
--- a/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h
+++ b/c/src/lib/libbsp/mips/genmongoosev/include/bsp.h
@@ -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
diff --git a/c/src/lib/libcpu/mips/mongoosev/include/mongoose-v.h b/c/src/lib/libbsp/mips/genmongoosev/include/mongoose-v.h
similarity index 100%
rename from c/src/lib/libcpu/mips/mongoosev/include/mongoose-v.h
rename to c/src/lib/libbsp/mips/genmongoosev/include/mongoose-v.h
diff --git a/c/src/lib/libbsp/mips/genmongoosev/irq/vectorisrs.c b/c/src/lib/libbsp/mips/genmongoosev/irq/vectorisrs.c
index 8a23643..b7210f7 100644
--- a/c/src/lib/libbsp/mips/genmongoosev/irq/vectorisrs.c
+++ b/c/src/lib/libbsp/mips/genmongoosev/irq/vectorisrs.c
@@ -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>
diff --git a/c/src/lib/libbsp/mips/genmongoosev/preinstall.am b/c/src/lib/libbsp/mips/genmongoosev/preinstall.am
index f11c87a..e5988a4 100644
--- a/c/src/lib/libbsp/mips/genmongoosev/preinstall.am
+++ b/c/src/lib/libbsp/mips/genmongoosev/preinstall.am
@@ -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
diff --git a/c/src/lib/libbsp/mips/genmongoosev/startup/bspstart.c b/c/src/lib/libbsp/mips/genmongoosev/startup/bspstart.c
index 744dd69..a8dd2cb 100644
--- a/c/src/lib/libbsp/mips/genmongoosev/startup/bspstart.c
+++ b/c/src/lib/libbsp/mips/genmongoosev/startup/bspstart.c
@@ -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>
 
diff --git a/c/src/lib/libbsp/mips/genmongoosev/startup/gdb-support.c b/c/src/lib/libbsp/mips/genmongoosev/startup/gdb-support.c
index 5f6ec0d..481774e 100644
--- a/c/src/lib/libbsp/mips/genmongoosev/startup/gdb-support.c
+++ b/c/src/lib/libbsp/mips/genmongoosev/startup/gdb-support.c
@@ -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>
diff --git a/c/src/lib/libcpu/mips/Makefile.am b/c/src/lib/libcpu/mips/Makefile.am
index 6dc6258..e4dd7ca 100644
--- a/c/src/lib/libcpu/mips/Makefile.am
+++ b/c/src/lib/libcpu/mips/Makefile.am
@@ -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
diff --git a/c/src/lib/libcpu/mips/preinstall.am b/c/src/lib/libcpu/mips/preinstall.am
index 4a83d60..85aec82 100644
--- a/c/src/lib/libcpu/mips/preinstall.am
+++ b/c/src/lib/libcpu/mips/preinstall.am
@@ -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



More information about the vc mailing list