diff --git a/arch/x86/soc/quark_se/Kconfig b/arch/x86/soc/quark_se/Kconfig index 3eba15b44b3..f839c66d1ad 100644 --- a/arch/x86/soc/quark_se/Kconfig +++ b/arch/x86/soc/quark_se/Kconfig @@ -38,13 +38,26 @@ config ARC_INIT help Allows x86 processor to kickoff the ARC slave processor. -config ARC_INIT_DEBUG - bool "Quark SE Sensor Subsystem Debug" - default n +config SYS_LOG_ARC_INIT_LEVEL + int + prompt "Quark SE Sensor Subsystem log level" + default 0 help - Debug the boot initialisation and boot process of the sensor + Sets log level for the boot initialization and boot process of the sensor sub-system. + Levels are: + + - 0 OFF, do not write + + - 1 ERROR, only write SYS_LOG_ERR + + - 2 WARNING, write SYS_LOG_WRN in adition to previous level + + - 3 INFO, write SYS_LOG_INF in adition to previous levels + + - 4 DEBUG, write SYS_LOG_DBG in adition to previous levels + config ARC_GDB_ENABLE bool "Allows the usage of GDB with the ARC processor." depends on ARC_INIT diff --git a/arch/x86/soc/quark_se/soc.c b/arch/x86/soc/quark_se/soc.c index 9cda608bc2d..6de3d126b54 100644 --- a/arch/x86/soc/quark_se/soc.c +++ b/arch/x86/soc/quark_se/soc.c @@ -36,11 +36,8 @@ #define SCSS_REG_VAL(offset) \ (*((volatile uint32_t *)(SCSS_REGISTER_BASE+offset))) -#ifdef CONFIG_ARC_INIT_DEBUG -#define arc_init_debug printk -#else -#define arc_init_debug(x...) do { } while (0) -#endif +#define SYS_LOG_LEVEL CONFIG_SYS_LOG_ARC_INIT_LEVEL +#include /** * @@ -66,12 +63,12 @@ static int arc_init(struct device *arg) * we read the value and stick it in shared_mem->arc_start which is * the beginning of the address space at 0xA8000000 */ reset_vector = (uint32_t *)RESET_VECTOR; - arc_init_debug("Reset vector address: %x\n", *reset_vector); + SYS_LOG_DBG("Reset vector address: %x", *reset_vector); shared_data->arc_start = *reset_vector; shared_data->flags = 0; if (!shared_data->arc_start) { /* Reset vector points to NULL => skip ARC init. */ - arc_init_debug("Reset vector is NULL, skipping ARC init.\n"); + SYS_LOG_DBG("Reset vector is NULL, skipping ARC init."); goto skip_arc_init; } @@ -80,14 +77,14 @@ static int arc_init(struct device *arg) SCSS_REG_VAL(SCSS_SS_CFG) |= ARC_RUN_REQ_A; #endif - arc_init_debug("Waiting for arc to start...\n"); + SYS_LOG_DBG("Waiting for arc to start..."); /* Block until the ARC core actually starts up */ while (SCSS_REG_VAL(SCSS_SS_STS) & 0x4000) { } /* Block until ARC's quark_se_init() sets a flag indicating it is ready, * if we get stuck here ARC has run but has exploded very early */ - arc_init_debug("Waiting for arc to init...\n"); + SYS_LOG_DBG("Waiting for arc to init..."); while (!shared_data->flags & ARC_READY) { }