[PATCH] leon, grspw: for SMP use GRSPW Packet driver

Daniel Hellstrom daniel at gaisler.com
Fri Aug 25 11:51:20 UTC 2017


The GRSPW packet driver supports SMP and therefore the legacy GRSPW
driver is disabled for SMP builds.

Update #2355
---
 c/src/lib/libbsp/sparc/leon2/Makefile.am   | 6 +++++-
 c/src/lib/libbsp/sparc/leon2/preinstall.am | 5 +++++
 c/src/lib/libbsp/sparc/leon3/Makefile.am   | 4 +++-
 c/src/lib/libbsp/sparc/leon3/preinstall.am | 3 ++-
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/leon2/Makefile.am b/c/src/lib/libbsp/sparc/leon2/Makefile.am
index 969a278..8ec7306 100644
--- a/c/src/lib/libbsp/sparc/leon2/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon2/Makefile.am
@@ -150,9 +150,13 @@ libbsp_a_SOURCES += ../../sparc/shared/can/occan.c \
     ../../sparc/shared/can/grcan.c
 
 # SpaceWire
+if !HAS_SMP
 include_bsp_HEADERS += ../../sparc/shared/include/grspw.h
-include_bsp_HEADERS += ../../sparc/shared/include/grspw_router.h
 libbsp_a_SOURCES += ../../sparc/shared/spw/grspw.c
+endif
+include_bsp_HEADERS += ../../sparc/shared/include/grspw_pkt.h
+include_bsp_HEADERS += ../../sparc/shared/include/grspw_router.h
+libbsp_a_SOURCES += ../../sparc/shared/spw/grspw_pkt.c
 libbsp_a_SOURCES += ../../sparc/shared/spw/grspw_router.c
 
 # UART (RAW)
diff --git a/c/src/lib/libbsp/sparc/leon2/preinstall.am b/c/src/lib/libbsp/sparc/leon2/preinstall.am
index 0f1af00..0c7cd4e 100644
--- a/c/src/lib/libbsp/sparc/leon2/preinstall.am
+++ b/c/src/lib/libbsp/sparc/leon2/preinstall.am
@@ -213,9 +213,14 @@ $(PROJECT_INCLUDE)/bsp/grcan.h: ../../sparc/shared/include/grcan.h $(PROJECT_INC
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/grcan.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/grcan.h
 
+if !HAS_SMP
 $(PROJECT_INCLUDE)/bsp/grspw.h: ../../sparc/shared/include/grspw.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/grspw.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/grspw.h
+endif
+$(PROJECT_INCLUDE)/bsp/grspw_pkt.h: ../../sparc/shared/include/grspw_pkt.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/grspw_pkt.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/grspw_pkt.h
 
 $(PROJECT_INCLUDE)/bsp/grspw_router.h: ../../sparc/shared/include/grspw_router.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/grspw_router.h
diff --git a/c/src/lib/libbsp/sparc/leon3/Makefile.am b/c/src/lib/libbsp/sparc/leon3/Makefile.am
index cd591dd..667efb7 100644
--- a/c/src/lib/libbsp/sparc/leon3/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon3/Makefile.am
@@ -163,10 +163,12 @@ libbsp_a_SOURCES += ../../sparc/shared/can/occan.c \
     ../../sparc/shared/can/grcan.c
 
 # SpaceWire
+if !HAS_SMP
 include_bsp_HEADERS += ../../sparc/shared/include/grspw.h
+libbsp_a_SOURCES += ../../sparc/shared/spw/grspw.c
+endif
 include_bsp_HEADERS += ../../sparc/shared/include/grspw_pkt.h
 include_bsp_HEADERS += ../../sparc/shared/include/grspw_router.h
-libbsp_a_SOURCES += ../../sparc/shared/spw/grspw.c
 libbsp_a_SOURCES += ../../sparc/shared/spw/grspw_pkt.c
 libbsp_a_SOURCES += ../../sparc/shared/spw/grspw_router.c
 
diff --git a/c/src/lib/libbsp/sparc/leon3/preinstall.am b/c/src/lib/libbsp/sparc/leon3/preinstall.am
index 70d58c8..b3a396e 100644
--- a/c/src/lib/libbsp/sparc/leon3/preinstall.am
+++ b/c/src/lib/libbsp/sparc/leon3/preinstall.am
@@ -237,10 +237,11 @@ $(PROJECT_INCLUDE)/bsp/grcan.h: ../../sparc/shared/include/grcan.h $(PROJECT_INC
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/grcan.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/grcan.h
 
+if !HAS_SMP
 $(PROJECT_INCLUDE)/bsp/grspw.h: ../../sparc/shared/include/grspw.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/grspw.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/grspw.h
-
+endif
 $(PROJECT_INCLUDE)/bsp/grspw_pkt.h: ../../sparc/shared/include/grspw_pkt.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/grspw_pkt.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/grspw_pkt.h
-- 
2.7.4



More information about the devel mailing list