[rtems commit] bsps/m68k: Move libcpu content to bsps

Sebastian Huber sebh at rtems.org
Mon Mar 26 13:33:40 UTC 2018


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar 26 12:10:15 2018 +0200

bsps/m68k: Move libcpu content to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

---

 bsps/m68k/csb360/start/idle-mcf5272.c              | 27 ++++++++++++++++++++++
 .../shared/misc => bsps/m68k/shared}/m68kidle.c    |  7 ------
 .../shared/misc => bsps/m68k/shared}/memProbe.c    |  0
 c/src/lib/libbsp/m68k/av5282/Makefile.am           |  5 ++--
 c/src/lib/libbsp/m68k/csb360/Makefile.am           |  4 ++--
 c/src/lib/libbsp/m68k/gen68340/Makefile.am         |  5 ++--
 c/src/lib/libbsp/m68k/gen68360/Makefile.am         |  6 ++---
 c/src/lib/libbsp/m68k/genmcf548x/Makefile.am       |  6 ++---
 c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am     |  4 ++--
 c/src/lib/libbsp/m68k/mcf52235/Makefile.am         |  5 ++--
 c/src/lib/libbsp/m68k/mcf5225x/Makefile.am         |  5 ++--
 c/src/lib/libbsp/m68k/mcf5235/Makefile.am          |  5 ++--
 c/src/lib/libbsp/m68k/mcf5329/Makefile.am          |  5 ++--
 c/src/lib/libbsp/m68k/mrm332/Makefile.am           |  5 ++--
 c/src/lib/libbsp/m68k/mvme147/Makefile.am          |  5 ++--
 c/src/lib/libbsp/m68k/mvme147s/Makefile.am         |  5 ++--
 c/src/lib/libbsp/m68k/mvme162/Makefile.am          |  6 ++---
 c/src/lib/libbsp/m68k/mvme167/Makefile.am          |  3 ++-
 c/src/lib/libbsp/m68k/uC5282/Makefile.am           |  4 ++--
 c/src/lib/libcpu/m68k/Makefile.am                  | 14 -----------
 20 files changed, 62 insertions(+), 64 deletions(-)

diff --git a/bsps/m68k/csb360/start/idle-mcf5272.c b/bsps/m68k/csb360/start/idle-mcf5272.c
new file mode 100644
index 0000000..c645b28
--- /dev/null
+++ b/bsps/m68k/csb360/start/idle-mcf5272.c
@@ -0,0 +1,27 @@
+/*
+ *  Motorola MC68xxx Dependent Idle Body Source
+ *
+ *  This kernel routine is the idle thread.  The idle thread runs any time
+ *  no other thread is ready to run.  This thread loops forever with
+ *  interrupts enabled.
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2002.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.org/license/LICENSE.
+ */
+
+#include <rtems/system.h>
+#include <rtems/score/thread.h>
+
+void *_CPU_Thread_Idle_body( uintptr_t ignored )
+{
+  for( ; ; ) {
+    __asm__ volatile( "nop" );
+    __asm__ volatile( "nop" );
+  }
+}
diff --git a/c/src/lib/libcpu/m68k/shared/misc/m68kidle.c b/bsps/m68k/shared/m68kidle.c
similarity index 85%
rename from c/src/lib/libcpu/m68k/shared/misc/m68kidle.c
rename to bsps/m68k/shared/m68kidle.c
index 96e1288..f43651f 100644
--- a/c/src/lib/libcpu/m68k/shared/misc/m68kidle.c
+++ b/bsps/m68k/shared/m68kidle.c
@@ -20,15 +20,8 @@
 
 void *_CPU_Thread_Idle_body( uintptr_t ignored )
 {
-#if defined(mcf5272)
-  for( ; ; ) {
-    __asm__ volatile( "nop" );
-    __asm__ volatile( "nop" );
-  }
-#else
   for( ; ; ) {
     /* supervisor mode, all interrupts on */
     __asm__ volatile( "stop #0x3000":::"cc" );
   }
-#endif
 }
diff --git a/c/src/lib/libcpu/m68k/shared/misc/memProbe.c b/bsps/m68k/shared/memProbe.c
similarity index 100%
rename from c/src/lib/libcpu/m68k/shared/misc/memProbe.c
rename to bsps/m68k/shared/memProbe.c
diff --git a/c/src/lib/libbsp/m68k/av5282/Makefile.am b/c/src/lib/libbsp/m68k/av5282/Makefile.am
index c41571a..527d05ae 100644
--- a/c/src/lib/libbsp/m68k/av5282/Makefile.am
+++ b/c/src/lib/libbsp/m68k/av5282/Makefile.am
@@ -41,9 +41,8 @@ libbsp_a_SOURCES += network/network.c
 endif
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache-mcf5282.c
-
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 include $(top_srcdir)/../../../../automake/local.am
 include $(srcdir)/../../../../../../bsps/m68k/av5282/headers.am
diff --git a/c/src/lib/libbsp/m68k/csb360/Makefile.am b/c/src/lib/libbsp/m68k/csb360/Makefile.am
index f445882..6670638 100644
--- a/c/src/lib/libbsp/m68k/csb360/Makefile.am
+++ b/c/src/lib/libbsp/m68k/csb360/Makefile.am
@@ -33,11 +33,11 @@ libbsp_a_SOURCES += ../../shared/bspreset.c
 # console
 libbsp_a_SOURCES += console/console-io.c ../../shared/console-polled.c
 
-# Cache
 libbsp_a_SOURCES += ../../../../../../bsps/shared/cache/nocache.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/csb360/start/idle-mcf5272.c
 
 libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel \
     ../../../libcpu/@RTEMS_CPU@/mcf5272/clock.rel \
     ../../../libcpu/@RTEMS_CPU@/mcf5272/timer.rel
 
diff --git a/c/src/lib/libbsp/m68k/gen68340/Makefile.am b/c/src/lib/libbsp/m68k/gen68340/Makefile.am
index 69467e1..275e90b 100644
--- a/c/src/lib/libbsp/m68k/gen68340/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68340/Makefile.am
@@ -38,9 +38,8 @@ libbsp_a_SOURCES += console/console.c console/m340uart.c \
 libbsp_a_SOURCES += timer/timer.c
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache.c
-
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 include $(top_srcdir)/../../../../automake/local.am
 include $(srcdir)/../../../../../../bsps/m68k/gen68340/headers.am
diff --git a/c/src/lib/libbsp/m68k/gen68360/Makefile.am b/c/src/lib/libbsp/m68k/gen68360/Makefile.am
index daf6719..a26a894 100644
--- a/c/src/lib/libbsp/m68k/gen68360/Makefile.am
+++ b/c/src/lib/libbsp/m68k/gen68360/Makefile.am
@@ -43,11 +43,11 @@ libbsp_a_SOURCES += network/network.c
 endif
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
 if HAS_FPSP
-libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/fpsp.rel
+libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/fpsp.rel
 endif
 
 include $(top_srcdir)/../../../../automake/local.am
diff --git a/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am b/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am
index 111e6d2..72fb216 100644
--- a/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am
+++ b/c/src/lib/libbsp/m68k/genmcf548x/Makefile.am
@@ -48,15 +48,15 @@ libbsp_a_SOURCES += ../../shared/src/irq-shell.c
 libbsp_a_SOURCES += irq/irq.c
 libbsp_a_SOURCES += irq/intc-icr-init-values.c
 
-# Cache
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/genmcf548x/start/cache.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 if HAS_NETWORKING
 libbsp_a_SOURCES += network/network.c
 endif
 
-libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/misc.rel \
-                  ../../../libcpu/@RTEMS_CPU@/mcf548x/mcdma.rel
+libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/mcf548x/mcdma.rel
 
 include $(top_srcdir)/../../../../automake/local.am
 include $(srcdir)/../../../../../../bsps/m68k/genmcf548x/headers.am
diff --git a/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am b/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am
index 2e0dbb7..eeee5ad 100644
--- a/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mcf5206elite/Makefile.am
@@ -43,11 +43,11 @@ libbsp_a_SOURCES += tod/ds1307.c tod/todcfg.c ../../shared/tod.c
 # nvram
 libbsp_a_SOURCES += nvram/nvram.c
 
-# Cache
 libbsp_a_SOURCES += ../../../../../../bsps/shared/cache/nocache.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel \
     ../../../libcpu/@RTEMS_CPU@/mcf5206/clock.rel \
     ../../../libcpu/@RTEMS_CPU@/mcf5206/mcfuart.rel \
     ../../../libcpu/@RTEMS_CPU@/mcf5206/timer.rel \
diff --git a/c/src/lib/libbsp/m68k/mcf52235/Makefile.am b/c/src/lib/libbsp/m68k/mcf52235/Makefile.am
index 95eb6e5..1fe068e 100644
--- a/c/src/lib/libbsp/m68k/mcf52235/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mcf52235/Makefile.am
@@ -39,9 +39,8 @@ libbsp_a_SOURCES += console/debugio.c
 libbsp_a_SOURCES += timer/timer.c
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache-mcf5223x.c
-
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 include $(top_srcdir)/../../../../automake/local.am
 include $(srcdir)/../../../../../../bsps/m68k/mcf52235/headers.am
diff --git a/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am b/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am
index 8688f23..ca45a99 100644
--- a/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mcf5225x/Makefile.am
@@ -34,9 +34,8 @@ libbsp_a_SOURCES += console/debugio.c
 libbsp_a_SOURCES += timer/timer.c
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache-mcf5225x.c
-
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 include $(top_srcdir)/../../../../automake/local.am
 include $(srcdir)/../../../../../../bsps/m68k/mcf5225x/headers.am
diff --git a/c/src/lib/libbsp/m68k/mcf5235/Makefile.am b/c/src/lib/libbsp/m68k/mcf5235/Makefile.am
index f673c1a..813afcc 100644
--- a/c/src/lib/libbsp/m68k/mcf5235/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mcf5235/Makefile.am
@@ -43,9 +43,8 @@ libbsp_a_SOURCES += network/network.c
 endif
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache-mcf5235.c
-
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 include $(top_srcdir)/../../../../automake/local.am
 include $(srcdir)/../../../../../../bsps/m68k/mcf5235/headers.am
diff --git a/c/src/lib/libbsp/m68k/mcf5329/Makefile.am b/c/src/lib/libbsp/m68k/mcf5329/Makefile.am
index a26f549..64eda51 100644
--- a/c/src/lib/libbsp/m68k/mcf5329/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mcf5329/Makefile.am
@@ -42,9 +42,8 @@ libbsp_a_SOURCES += network/network.c
 endif
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache-mcf532x.c
-
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 include $(top_srcdir)/../../../../automake/local.am
 include $(srcdir)/../../../../../../bsps/m68k/mcf5329/headers.am
diff --git a/c/src/lib/libbsp/m68k/mrm332/Makefile.am b/c/src/lib/libbsp/m68k/mrm332/Makefile.am
index 7afb990..8fadb44 100644
--- a/c/src/lib/libbsp/m68k/mrm332/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mrm332/Makefile.am
@@ -39,9 +39,8 @@ libbsp_a_SOURCES += spurious/spinit.c
 libbsp_a_SOURCES += timer/timer.c
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache.c
-
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 include $(top_srcdir)/../../../../automake/local.am
 include $(srcdir)/../../../../../../bsps/m68k/mrm332/headers.am
diff --git a/c/src/lib/libbsp/m68k/mvme147/Makefile.am b/c/src/lib/libbsp/m68k/mvme147/Makefile.am
index 13b39c4..4d221dc 100644
--- a/c/src/lib/libbsp/m68k/mvme147/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147/Makefile.am
@@ -38,9 +38,8 @@ libbsp_a_SOURCES += console/console.c ../../shared/dummy_printk_support.c
 libbsp_a_SOURCES += timer/timer.c timer/timerisr.S
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache.c
-
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 EXTRA_DIST += times
 
diff --git a/c/src/lib/libbsp/m68k/mvme147s/Makefile.am b/c/src/lib/libbsp/m68k/mvme147s/Makefile.am
index a0af237..dc7137f 100644
--- a/c/src/lib/libbsp/m68k/mvme147s/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme147s/Makefile.am
@@ -46,9 +46,8 @@ libbsp_a_SOURCES += shmsupp/addrconv.c shmsupp/getcfg.c shmsupp/lock.c \
 endif
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache.c
-
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 EXTRA_DIST += times
 
diff --git a/c/src/lib/libbsp/m68k/mvme162/Makefile.am b/c/src/lib/libbsp/m68k/mvme162/Makefile.am
index 2c0031f..1ef0c30 100644
--- a/c/src/lib/libbsp/m68k/mvme162/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme162/Makefile.am
@@ -45,11 +45,11 @@ libbsp_a_SOURCES += ../mvme167/network/network.c
 endif
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
-libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
 if HAS_FPSP
-libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/fpsp.rel
+libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/fpsp.rel
 endif
 
 EXTRA_DIST += times
diff --git a/c/src/lib/libbsp/m68k/mvme167/Makefile.am b/c/src/lib/libbsp/m68k/mvme167/Makefile.am
index 8c8288c..5cedf79 100644
--- a/c/src/lib/libbsp/m68k/mvme167/Makefile.am
+++ b/c/src/lib/libbsp/m68k/mvme167/Makefile.am
@@ -42,9 +42,10 @@ libbsp_a_SOURCES += network/network.c
 endif
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 libbsp_a_LIBADD = \
-    ../../../libcpu/@RTEMS_CPU@/shared/misc.rel \
     ../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/fpsp.rel
 
 EXTRA_DIST += times
diff --git a/c/src/lib/libbsp/m68k/uC5282/Makefile.am b/c/src/lib/libbsp/m68k/uC5282/Makefile.am
index e382fe4..c4b90c5 100644
--- a/c/src/lib/libbsp/m68k/uC5282/Makefile.am
+++ b/c/src/lib/libbsp/m68k/uC5282/Makefile.am
@@ -40,8 +40,8 @@ libbsp_a_SOURCES += network/network.c
 endif
 
 libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/cache/cache-mcf5282.c
-
-libbsp_a_LIBADD = ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/m68kidle.c
+libbsp_a_SOURCES += ../../../../../../bsps/m68k/shared/memProbe.c
 
 include $(top_srcdir)/../../../../automake/local.am
 include $(srcdir)/../../../../../../bsps/m68k/uC5282/headers.am
diff --git a/c/src/lib/libcpu/m68k/Makefile.am b/c/src/lib/libcpu/m68k/Makefile.am
index f012d5d..b0bbc36 100644
--- a/c/src/lib/libcpu/m68k/Makefile.am
+++ b/c/src/lib/libcpu/m68k/Makefile.am
@@ -4,20 +4,6 @@ include $(top_srcdir)/../../../automake/compile.am
 
 noinst_PROGRAMS =
 
-if shared
-
-## shared/misc
-
-if mcf5272
-M68K_CPPFLAGS = -Dmcf5272
-endif
-
-noinst_PROGRAMS += shared/misc.rel
-shared_misc_rel_SOURCES = shared/misc/m68kidle.c shared/misc/memProbe.c
-shared_misc_rel_CPPFLAGS = $(AM_CPPFLAGS) $(M68K_CPPFLAGS)
-shared_misc_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
-endif
-
 if m68040
 ## m68040/fpsp
 noinst_PROGRAMS += m68040/fpsp.rel




More information about the vc mailing list