[PATCH 111/111] MCTRL: fix build warnings in MCTRL driver

Daniel Hellstrom daniel at gaisler.com
Thu Feb 26 16:39:53 UTC 2015


---
 c/src/lib/libbsp/sparc/leon2/Makefile.am      |    1 +
 c/src/lib/libbsp/sparc/leon2/preinstall.am    |    4 +++
 c/src/lib/libbsp/sparc/leon3/Makefile.am      |    1 +
 c/src/lib/libbsp/sparc/leon3/preinstall.am    |    4 +++
 c/src/lib/libbsp/sparc/shared/include/mctrl.h |   26 +++++++++++++++++++++++++
 c/src/lib/libbsp/sparc/shared/mem/mctrl.c     |    2 +
 6 files changed, 38 insertions(+), 0 deletions(-)
 create mode 100644 c/src/lib/libbsp/sparc/shared/include/mctrl.h

diff --git a/c/src/lib/libbsp/sparc/leon2/Makefile.am b/c/src/lib/libbsp/sparc/leon2/Makefile.am
index 32ca8aa..79f2d6a 100644
--- a/c/src/lib/libbsp/sparc/leon2/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon2/Makefile.am
@@ -186,6 +186,7 @@ libbsp_a_SOURCES += ../../sparc/shared/analog/gradcdac.c
 
 # Memory controllers
 libbsp_a_SOURCES += ../../sparc/shared/mem/mctrl.c
+include_HEADERS += ../../sparc/shared/include/mctrl.h
 
 # timer
 libbsp_a_SOURCES += timer/timer.c
diff --git a/c/src/lib/libbsp/sparc/leon2/preinstall.am b/c/src/lib/libbsp/sparc/leon2/preinstall.am
index 3240720..5b72841 100644
--- a/c/src/lib/libbsp/sparc/leon2/preinstall.am
+++ b/c/src/lib/libbsp/sparc/leon2/preinstall.am
@@ -241,6 +241,10 @@ $(PROJECT_INCLUDE)/gradcdac.h: ../../sparc/shared/include/gradcdac.h $(PROJECT_I
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/gradcdac.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/gradcdac.h
 
+$(PROJECT_INCLUDE)/mctrl.h: ../../sparc/shared/include/mctrl.h $(PROJECT_INCLUDE)/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mctrl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/mctrl.h
+
 $(PROJECT_INCLUDE)/grtc.h: ../../sparc/shared/include/grtc.h $(PROJECT_INCLUDE)/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/grtc.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/grtc.h
diff --git a/c/src/lib/libbsp/sparc/leon3/Makefile.am b/c/src/lib/libbsp/sparc/leon3/Makefile.am
index 5fa2d5a..587d4d1 100644
--- a/c/src/lib/libbsp/sparc/leon3/Makefile.am
+++ b/c/src/lib/libbsp/sparc/leon3/Makefile.am
@@ -200,6 +200,7 @@ libbsp_a_SOURCES += ../../sparc/shared/analog/gradcdac.c
 
 # Memory controllers
 libbsp_a_SOURCES += ../../sparc/shared/mem/mctrl.c
+include_HEADERS += ../../sparc/shared/include/mctrl.h
 
 # timer
 libbsp_a_SOURCES += timer/timer.c
diff --git a/c/src/lib/libbsp/sparc/leon3/preinstall.am b/c/src/lib/libbsp/sparc/leon3/preinstall.am
index 98d94ab..fe9b99b 100644
--- a/c/src/lib/libbsp/sparc/leon3/preinstall.am
+++ b/c/src/lib/libbsp/sparc/leon3/preinstall.am
@@ -269,6 +269,10 @@ $(PROJECT_INCLUDE)/gradcdac.h: ../../sparc/shared/include/gradcdac.h $(PROJECT_I
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/gradcdac.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/gradcdac.h
 
+$(PROJECT_INCLUDE)/mctrl.h: ../../sparc/shared/include/mctrl.h $(PROJECT_INCLUDE)/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mctrl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/mctrl.h
+
 $(PROJECT_INCLUDE)/watchdog.h: include/watchdog.h $(PROJECT_INCLUDE)/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/watchdog.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/watchdog.h
diff --git a/c/src/lib/libbsp/sparc/shared/include/mctrl.h b/c/src/lib/libbsp/sparc/shared/include/mctrl.h
new file mode 100644
index 0000000..db449cb
--- /dev/null
+++ b/c/src/lib/libbsp/sparc/shared/include/mctrl.h
@@ -0,0 +1,26 @@
+/*
+ *  Memory Controller driver interface
+ *
+ *  COPYRIGHT (c) 2015.
+ *  Cobham Gaisler.
+ *
+ *  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.
+ */
+
+#ifndef __MCTRL_H__
+#define __MCTRL_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Register MEMCTRL driver to Driver manager */
+void mctrl_register_drv (void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/c/src/lib/libbsp/sparc/shared/mem/mctrl.c b/c/src/lib/libbsp/sparc/shared/mem/mctrl.c
index b61d218..a940735 100644
--- a/c/src/lib/libbsp/sparc/shared/mem/mctrl.c
+++ b/c/src/lib/libbsp/sparc/shared/mem/mctrl.c
@@ -20,6 +20,8 @@
 #include <drvmgr/drvmgr.h>
 #include <drvmgr/ambapp_bus.h>
 
+#include <mctrl.h>
+
 #define MEMSET(priv, start, c, length) memset((void *)start, c, length)
 
 #define DBG(args...)
-- 
1.7.0.4




More information about the devel mailing list