-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Move kernel/soc/arch/drivers to new logger #10029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nashif
merged 43 commits into
zephyrproject-rtos:master
from
nashif:move_kernel_to_new_logger
Oct 8, 2018
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
a632efc
kernel: move to new logger
nashif a8cbcc4
arch: setup logging using new logger
nashif 1b0bcbd
soc: logging: move soc tree to new logger
nashif 5212e46
kernel: move malloc handling to new logger
nashif 7cf7e87
drivers: entropy: remove unused logger kconfig
nashif 54fc929
drivers: adc: move to new logger
nashif f63787a
drivers: audio: move to new logger
nashif 7c8b432
drivers: can: move to new logger
nashif da9c484
drivers: clock_control: move to new logger
nashif 0197b44
drivers: crypto: move to new logger
nashif 7607bb4
drivers: i2c: move to new logger
nashif 77c4d19
drivers: dma: move to new logger
nashif b7f9a4c
drivers: watchdog: Migrate to new logging subsys
Olivier-ProGlove 4caf7cc
samples: fix prj.conf to use new logger
nashif c66918b
samples: crypto: move to new logger
nashif 6bd9e3e
samples: move crypto sample to new logger
nashif 20df920
driver: pwm: use new logger
nashif 92d2911
samples: led_lp5562: move to new logger
nashif 38c238b
samples: led_lp3943: move to new logger
nashif 1361205
samples: led_ws2812: move to new logger
nashif 6137558
samples: led_pca9633: move to new logger
nashif 512e33d
samples: led_lpd8806: move to new logger
nashif 80c424a
samples: flash_shell: move to new logger
nashif 3a15ca2
samples: led: fix default log level kconfig
nashif 7bff54c
driver: spi: use new logger
nashif ec2a9c8
tests: crypto: use printk instead of logging
nashif e9c5ed5
arch: nxp_mpu: fix types in log macro
nashif 141bdf8
drivers: spi_dw: remove debug message
nashif 859c7b9
drivers: display: define DISPLAY log level
nashif 6907794
samples: display: set log level correctly
nashif 1093bd5
tests: logging: disable default log modules
nashif 483498c
subsys: nvs: move to new logger
nashif b3a0f25
nvs: fix style
nashif ecc0040
drivers: gpio: Migrate to new logging subsys
Olivier-ProGlove f57c2fc
gpio_sch: fix log message
nashif f2d3b37
gpio: log: rename level variable
nashif 0d66664
subsys: dfu: Migrate to new logging subsys
Olivier-ProGlove 38eea4a
dfu: log: rename level variable
nashif 8965678
console: move to new logger
nashif 26ff99a
telnet_console: fix syntax
nashif eee86cf
websocket_console: fix syntax
nashif 99935e9
tests: crypto: use CONFIG_LOG
nashif 6c2ac92
ztest: remove unused include of sys_log.h
nashif File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,13 @@ | |
#include <soc.h> | ||
#include <arch/arm/cortex_m/cmsis.h> | ||
#include <arch/arm/cortex_m/mpu/nxp_mpu.h> | ||
#include <logging/sys_log.h> | ||
#include <misc/__assert.h> | ||
#include <linker/linker-defs.h> | ||
|
||
#define LOG_LEVEL CONFIG_MPU_LOG_LEVEL | ||
#include <logging/log.h> | ||
LOG_MODULE_DECLARE(mpu); | ||
|
||
/* NXP MPU Enabled state */ | ||
static u8_t nxp_mpu_enabled; | ||
|
||
|
@@ -92,11 +95,11 @@ static void _region_init(u32_t index, u32_t region_base, | |
SYSMPU->WORD[index][3] = SYSMPU_WORD_VLD_MASK; | ||
} | ||
|
||
SYS_LOG_DBG("[%d] 0x%08x 0x%08x 0x%08x 0x%08x", index, | ||
SYSMPU->WORD[index][0], | ||
SYSMPU->WORD[index][1], | ||
SYSMPU->WORD[index][2], | ||
SYSMPU->WORD[index][3]); | ||
LOG_DBG("[%d] 0x%08x 0x%08x 0x%08x 0x%08x", index, | ||
(u32_t)SYSMPU->WORD[index][0], | ||
(u32_t)SYSMPU->WORD[index][1], | ||
(u32_t)SYSMPU->WORD[index][2], | ||
(u32_t)SYSMPU->WORD[index][3]); | ||
} | ||
|
||
/** | ||
|
@@ -225,7 +228,7 @@ void arm_core_mpu_disable(void) | |
*/ | ||
void arm_core_mpu_configure(u8_t type, u32_t base, u32_t size) | ||
{ | ||
SYS_LOG_DBG("Region info: 0x%x 0x%x", base, size); | ||
LOG_DBG("Region info: 0x%x 0x%x", base, size); | ||
u32_t region_index = _get_region_index_by_type(type); | ||
u32_t region_attr = _get_region_attr_by_type(type); | ||
|
||
|
@@ -265,11 +268,11 @@ void arm_core_mpu_configure_mem_domain(struct k_mem_domain *mem_domain) | |
struct k_mem_partition *pparts; | ||
|
||
if (mem_domain) { | ||
SYS_LOG_DBG("configure domain: %p", mem_domain); | ||
LOG_DBG("configure domain: %p", mem_domain); | ||
num_partitions = mem_domain->num_partitions; | ||
pparts = mem_domain->partitions; | ||
} else { | ||
SYS_LOG_DBG("disable domain partition regions"); | ||
LOG_DBG("disable domain partition regions"); | ||
num_partitions = 0; | ||
pparts = NULL; | ||
} | ||
|
@@ -280,15 +283,15 @@ void arm_core_mpu_configure_mem_domain(struct k_mem_domain *mem_domain) | |
*/ | ||
for (; region_index < _get_num_usable_regions(); region_index++) { | ||
if (num_partitions && pparts->size) { | ||
SYS_LOG_DBG("set region 0x%x 0x%x 0x%x", | ||
LOG_DBG("set region 0x%x 0x%x 0x%x", | ||
region_index, pparts->start, pparts->size); | ||
region_attr = pparts->attr; | ||
_region_init(region_index, pparts->start, | ||
ENDADDR_ROUND(pparts->start+pparts->size), | ||
region_attr); | ||
num_partitions--; | ||
} else { | ||
SYS_LOG_DBG("disable region 0x%x", region_index); | ||
LOG_DBG("disable region 0x%x", region_index); | ||
/* Disable region */ | ||
SYSMPU->WORD[region_index][0] = 0; | ||
SYSMPU->WORD[region_index][1] = 0; | ||
|
@@ -312,17 +315,17 @@ void arm_core_mpu_configure_mem_partition(u32_t part_index, | |
_get_region_index_by_type(THREAD_DOMAIN_PARTITION_REGION); | ||
u32_t region_attr; | ||
|
||
SYS_LOG_DBG("configure partition index: %u", part_index); | ||
LOG_DBG("configure partition index: %u", part_index); | ||
|
||
if (part) { | ||
SYS_LOG_DBG("set region 0x%x 0x%x 0x%x", | ||
LOG_DBG("set region 0x%x 0x%x 0x%x", | ||
region_index + part_index, part->start, part->size); | ||
region_attr = part->attr; | ||
_region_init(region_index + part_index, part->start, | ||
ENDADDR_ROUND(part->start + part->size), | ||
region_attr); | ||
} else { | ||
SYS_LOG_DBG("disable region 0x%x", region_index); | ||
LOG_DBG("disable region 0x%x", region_index); | ||
/* Disable region */ | ||
SYSMPU->WORD[region_index + part_index][0] = 0; | ||
SYSMPU->WORD[region_index + part_index][1] = 0; | ||
|
@@ -341,7 +344,7 @@ void arm_core_mpu_mem_partition_remove(u32_t part_index) | |
u32_t region_index = | ||
_get_region_index_by_type(THREAD_DOMAIN_PARTITION_REGION); | ||
|
||
SYS_LOG_DBG("disable region 0x%x", region_index); | ||
LOG_DBG("disable region 0x%x", region_index); | ||
/* Disable region */ | ||
SYSMPU->WORD[region_index + part_index][0] = 0; | ||
SYSMPU->WORD[region_index + part_index][1] = 0; | ||
|
@@ -424,7 +427,7 @@ static void _nxp_mpu_config(void) | |
|
||
__ASSERT(mpu_config.num_regions <= _get_num_regions(), | ||
"too many static MPU regions defined"); | ||
SYS_LOG_DBG("total region count: %d", _get_num_regions()); | ||
LOG_DBG("total region count: %d", _get_num_regions()); | ||
|
||
/* Disable MPU */ | ||
SYSMPU->CESR &= ~SYSMPU_CESR_VLD_MASK; | ||
|
@@ -491,7 +494,7 @@ static int nxp_mpu_init(struct device *arg) | |
return 0; | ||
} | ||
|
||
#if defined(CONFIG_SYS_LOG) | ||
#if defined(CONFIG_LOG) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure is this is still valid. |
||
/* To have logging the driver needs to be initialized later */ | ||
SYS_INIT(nxp_mpu_init, POST_KERNEL, | ||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.