host: replace CONFIG_HOST and CONFIG_LIB with CONFIG_LIBRARY

We don't need 3 symbols - they all are used in the same case.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
This commit is contained in:
Janusz Jankowski 2019-04-25 15:05:56 +02:00
parent c80d288ea2
commit 3a65b78f5f
10 changed files with 12 additions and 14 deletions

View File

@ -7,8 +7,7 @@ target_include_directories(sof_options INTERFACE ${PROJECT_SOURCE_DIR}/src/platf
target_include_directories(sof_options INTERFACE ${GENERATED_DIRECTORY}/include)
# TODO: add Kconfig support also for testbench when it'll be decoupled from fw
set(CONFIG_HOST 1)
set(CONFIG_LIB 1)
set(CONFIG_LIBRARY 1)
set(CONFIG_COMP_VOLUME 1)
set(CONFIG_COMP_SRC 1)
set(CONFIG_COMP_FIR 1)

View File

@ -1,5 +1,4 @@
#define CONFIG_HOST @CONFIG_HOST@
#define CONFIG_LIB @CONFIG_LIB@
#define CONFIG_LIBRARY @CONFIG_LIBRARY@
#define CONFIG_COMP_VOLUME @CONFIG_COMP_VOLUME@
#define CONFIG_COMP_SRC @CONFIG_COMP_SRC@
#define CONFIG_COMP_FIR @CONFIG_COMP_FIR@

View File

@ -72,7 +72,7 @@ static inline int arch_memcpy_s(void *dest, size_t dest_size,
return -EINVAL;
/* can't be use until full context switch will be supported */
/* #if __XCC__ && !CONFIG_HOST
/* #if __XCC__ && !CONFIG_LIBRARY
* __vec_memcpy(dest, src, src_size);
* #else
*/
@ -91,7 +91,7 @@ static inline int arch_memset_s(void *dest, size_t dest_size,
if (count > dest_size)
return -EINVAL;
#if __XCC__ && !CONFIG_HOST
#if __XCC__ && !CONFIG_LIBRARY
if (!__vec_memset(dest, data, count))
return -ENOMEM;
#else

View File

@ -66,7 +66,7 @@
#endif
#else
/* GCC */
#if defined(CONFIG_HOST)
#if defined(CONFIG_LIBRARY)
#define SRC_SHORT 0 /* Use high quality 32 bit filter coefficients */
#else
#define SRC_SHORT 1 /* Use 16 bit filter coefficients for speed */

View File

@ -35,7 +35,7 @@
#include <config.h>
#include <sof/bit.h>
#if CONFIG_LIB
#if CONFIG_LIBRARY
static inline uint32_t io_reg_read(uint32_t reg) {return 0;}
static inline void io_reg_write(uint32_t reg, uint32_t val) {}

View File

@ -65,7 +65,7 @@ struct sa;
*/
#ifdef UNIT_TEST
#define DECLARE_MODULE(init)
#elif CONFIG_HOST
#elif CONFIG_LIBRARY
/* In case of shared libs components are initialised in dlopen */
#define DECLARE_MODULE(init) __attribute__((constructor)) \
static void _module_init(void) { init(); }

View File

@ -116,7 +116,7 @@
#define TRACE_CLASS_SOUNDWIRE (32 << 24)
#define TRACE_CLASS_KEYWORD (33 << 24)
#ifdef CONFIG_HOST
#ifdef CONFIG_LIBRARY
extern int test_bench_trace;
char *get_trace_class(uint32_t trace_class);
#define _log_message(mbox, atomic, level, comp_class, id_0, id_1, \
@ -301,7 +301,7 @@ void trace_init(struct sof *sof);
#define trace_error_value_atomic(x) trace_value_atomic(x)
#endif
#ifndef CONFIG_HOST
#ifndef CONFIG_LIBRARY
#define _DECLARE_LOG_ENTRY(lvl, format, comp_class, params, ids)\
__attribute__((section(".static_log." #lvl))) \
static const struct { \

View File

@ -59,7 +59,7 @@ void cmemcpy(void *dest, void *src, size_t size)
}
#endif
#if !CONFIG_HOST
#if !CONFIG_LIBRARY
/* used by gcc - but uses arch_memcpy internally */
void *memcpy(void *dest, const void *src, size_t n)
{

View File

@ -39,7 +39,7 @@
TRACE_IMPL()
#if !CONFIG_HOST
#if !CONFIG_LIBRARY
void *rzalloc(int zone, uint32_t caps, size_t bytes)
{

View File

@ -39,7 +39,7 @@
TRACE_IMPL()
#if !CONFIG_HOST
#if !CONFIG_LIBRARY
void *rzalloc(int zone, uint32_t caps, size_t bytes)
{