sys_log: replace old debug macros at SSS boot
The boot initialization and boot process of the sensor sub systems is now using the new system log macros and updated the Kconfig variable to be a level rather than a bool. Change-Id: I098143684f8e7077a525e7fcbc93b42b22d427ac Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
This commit is contained in:
parent
aaa66ee9f2
commit
e7f42e52c9
2 changed files with 23 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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 <misc/sys_log.h>
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -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) {
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue