diff mbox

[KEYSTONE2,05/15] linux-ks2: build only init part

Message ID 1426001473-14618-6-git-send-email-taras.kondratiuk@linaro.org
State New
Headers show

Commit Message

Taras Kondratiuk March 10, 2015, 3:31 p.m. UTC
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Signed-off-by: Taras Kondratiuk <taras@ti.com>
---
 platform/linux-keystone2/Makefile.am               | 15 ++-----
 platform/linux-keystone2/include/odp.h             | 47 ++++++++++++++++++++++
 platform/linux-keystone2/include/odp/plat/state.h  |  2 +-
 .../linux-keystone2/include/odp/plat/ti_mcsdk.h    |  2 +-
 platform/linux-keystone2/include/odp_internal.h    |  4 +-
 platform/linux-keystone2/odp_init.c                | 14 +++----
 6 files changed, 61 insertions(+), 23 deletions(-)
 create mode 100644 platform/linux-keystone2/include/odp.h
diff mbox

Patch

diff --git a/platform/linux-keystone2/Makefile.am b/platform/linux-keystone2/Makefile.am
index 505cb97..e302414 100644
--- a/platform/linux-keystone2/Makefile.am
+++ b/platform/linux-keystone2/Makefile.am
@@ -18,7 +18,7 @@  LIBS += $(KS2_LIBS)
 linux_generic_srcdir = $(top_srcdir)/platform/linux-generic
 
 include_HEADERS = \
-		  $(top_srcdir)/include/odp.h
+		  $(srcdir)/include/odp.h
 
 odpincludedir= $(includedir)/odp
 odpinclude_HEADERS = \
@@ -130,28 +130,19 @@  subdirheaders_HEADERS = \
 			$(top_srcdir)/helper/include/odp/helper/udp.h
 
 __LIB__libodp_la_SOURCES = \
-			   odp_buffer.c \
-			   odp_buffer_pool.c \
-			   odp_crypto.c \
 			   odp_init.c \
-			   odp_packet.c \
-			   odp_packet_io.c \
-			   odp_queue.c \
 			   mcsdk/mcsdk_init.c \
 			   mcsdk/mcsdk_navig.c \
 			   mcsdk/mcsdk_rmclient.c \
 			   mcsdk/sockutils.c \
 			   ../linux-generic/odp_barrier.c \
-			   ../linux-generic/odp_coremask.c \
+			   ../linux-generic/odp_cpumask.c \
 			   ../linux-generic/odp_linux.c \
-			   ../linux-generic/odp_packet_flags.c \
 			   ../linux-generic/odp_ring.c \
 			   ../linux-generic/odp_rwlock.c \
-			   ../linux-generic/odp_schedule.c \
 			   ../linux-generic/odp_shared_memory.c \
 			   ../linux-generic/odp_spinlock.c \
 			   ../linux-generic/odp_system_info.c \
 			   ../linux-generic/odp_thread.c \
 			   ../linux-generic/odp_ticketlock.c \
-			   ../linux-generic/odp_time.c \
-			   ../linux-generic/odp_timer.c
+			   ../linux-generic/odp_time.c
diff --git a/platform/linux-keystone2/include/odp.h b/platform/linux-keystone2/include/odp.h
new file mode 100644
index 0000000..6ab30a9
--- /dev/null
+++ b/platform/linux-keystone2/include/odp.h
@@ -0,0 +1,47 @@ 
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * The OpenDataPlane API
+ *
+ */
+
+#ifndef ODP_H_
+#define ODP_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/config.h>
+
+#include <odp/version.h>
+#include <odp/std_types.h>
+#include <odp/compiler.h>
+#include <odp/align.h>
+#include <odp/hints.h>
+#include <odp/debug.h>
+#include <odp/byteorder.h>
+#include <odp/cpumask.h>
+#include <odp/cpu.h>
+#include <odp/barrier.h>
+#include <odp/spinlock.h>
+#include <odp/atomic.h>
+#include <odp/init.h>
+#include <odp/system_info.h>
+#include <odp/thread.h>
+#include <odp/shared_memory.h>
+#include <odp/ticketlock.h>
+#include <odp/time.h>
+#include <odp/sync.h>
+#include <odp/rwlock.h>
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/platform/linux-keystone2/include/odp/plat/state.h b/platform/linux-keystone2/include/odp/plat/state.h
index 2406245..0b4b07f 100644
--- a/platform/linux-keystone2/include/odp/plat/state.h
+++ b/platform/linux-keystone2/include/odp/plat/state.h
@@ -13,7 +13,7 @@ 
 extern "C" {
 #endif
 
-#include <odp_ti_mcsdk.h>
+#include <odp/plat/ti_mcsdk.h>
 
 /**
  * @internal Global ODP state
diff --git a/platform/linux-keystone2/include/odp/plat/ti_mcsdk.h b/platform/linux-keystone2/include/odp/plat/ti_mcsdk.h
index aa7e64f..5ccc9e0 100644
--- a/platform/linux-keystone2/include/odp/plat/ti_mcsdk.h
+++ b/platform/linux-keystone2/include/odp/plat/ti_mcsdk.h
@@ -19,7 +19,7 @@  extern "C" {
 #include <ti/drv/nwal/nwal.h>
 #include <ti/drv/nwal/nwal_util.h>
 #include <ti/drv/nwal/nwal_osal.h>
-#include <mcsdk_tune.h>
+#include <odp/plat/mcsdk_tune.h>
 
 /** @internal McSDK initialization configuration */
 struct mcsdk_cfg_s {
diff --git a/platform/linux-keystone2/include/odp_internal.h b/platform/linux-keystone2/include/odp_internal.h
index 6cce2b5..7ebf567 100644
--- a/platform/linux-keystone2/include/odp_internal.h
+++ b/platform/linux-keystone2/include/odp_internal.h
@@ -19,8 +19,8 @@ 
 extern "C" {
 #endif
 
-#include <odp_state.h>
-#include <odp_thread.h>
+#include <odp/plat/state.h>
+#include <odp/thread.h>
 
 int odp_system_info_init(void);
 
diff --git a/platform/linux-keystone2/odp_init.c b/platform/linux-keystone2/odp_init.c
index 896ff11..4e9783d 100644
--- a/platform/linux-keystone2/odp_init.c
+++ b/platform/linux-keystone2/odp_init.c
@@ -6,11 +6,10 @@ 
  * SPDX-License-Identifier:     BSD-3-Clause
  */
 
-#include <odp_init.h>
+#include <odp/init.h>
+#include <odp/debug.h>
+#include <odp/config.h>
 #include <odp_internal.h>
-#include <odp_debug.h>
-#include <odp_config.h>
-#include <odp_packet_internal.h>
 
 struct odp_global_s *odp_global;
 struct odp_proc_s odp_proc;
@@ -35,7 +34,7 @@  int odp_init_global(odp_init_t *params ODP_UNUSED,
 		odp_pr_err("ODP McSDK init failed.\n");
 		return -1;
 	}
-
+#if 0
 	if (odp_buffer_pool_init_global()) {
 		odp_pr_err("ODP buffer pool init failed.\n");
 		return -1;
@@ -65,7 +64,7 @@  int odp_init_global(odp_init_t *params ODP_UNUSED,
 		odp_pr_err("ODP timer init failed.\n");
 		return -1;
 	}
-
+#endif
 	return 0;
 }
 
@@ -95,11 +94,12 @@  int odp_init_local(void)
 		odp_pr_dbg("Skipping local init McSDK\n");
 		return 0;
 	}
-
+#if 0
 	if (odp_schedule_init_local()) {
 		odp_pr_err("ODP schedule local init failed.\n");
 		return -1;
 	}
+#endif
 	return 0;
 }