diff --git a/soc/xtensa/intel_apl_adsp/Kconfig.defconfig b/soc/xtensa/intel_apl_adsp/Kconfig.defconfig index 08907468e41..7d687ed95e8 100644 --- a/soc/xtensa/intel_apl_adsp/Kconfig.defconfig +++ b/soc/xtensa/intel_apl_adsp/Kconfig.defconfig @@ -42,13 +42,13 @@ if LOG config LOG_PRINTK default y -config LOG_BACKEND_ADSP +config LOG_BACKEND_RB default y -config LOG_BACKEND_ADSP_RINGBUF_BASE +config LOG_BACKEND_RB_MEM_BASE default "0xBE008000" -config LOG_BACKEND_ADSP_RINGBUF_SIZE +config LOG_BACKEND_RB_MEM_SIZE default "0x2000" endif # LOG diff --git a/subsys/logging/CMakeLists.txt b/subsys/logging/CMakeLists.txt index 763fc66869e..a1f8eedc57d 100644 --- a/subsys/logging/CMakeLists.txt +++ b/subsys/logging/CMakeLists.txt @@ -50,8 +50,8 @@ if(NOT CONFIG_LOG_MINIMAL) ) zephyr_sources_ifdef( - CONFIG_LOG_BACKEND_ADSP - log_backend_adsp.c + CONFIG_LOG_BACKEND_RB + log_backend_rb.c ) else() zephyr_sources(log_minimal.c) diff --git a/subsys/logging/Kconfig b/subsys/logging/Kconfig index 6c1b561390c..0b7aadbfcd4 100644 --- a/subsys/logging/Kconfig +++ b/subsys/logging/Kconfig @@ -497,26 +497,25 @@ config LOG_BACKEND_NET_SYST_ENABLE endif # LOG_BACKEND_NET -config LOG_BACKEND_ADSP - bool "Enable Intel ADSP backend" - depends on SOC_INTEL_APL_ADSP +config LOG_BACKEND_RB + bool "Enable memory ring buffer backend" select RING_BUFFER help - Enable backend in APL ADSP using memory mailbox + Enable backend in memory using ring buffer to keep messages. -if LOG_BACKEND_ADSP +if LOG_BACKEND_RB -config LOG_BACKEND_ADSP_RINGBUF_BASE - hex "Ringbuf base address" +config LOG_BACKEND_RB_MEM_BASE + hex "Ring buffer memory base address" help Address of the ring buffer in the memory. -config LOG_BACKEND_ADSP_RINGBUF_SIZE +config LOG_BACKEND_RB_MEM_SIZE hex "Size of the ring buffer" help Size of the ring buffer. -endif # LOG_BACKEND_ADSP +endif # LOG_BACKEND_RB config LOG_BACKEND_SHOW_COLOR bool "Enable colors in the backend" diff --git a/subsys/logging/log_backend_adsp.c b/subsys/logging/log_backend_rb.c similarity index 94% rename from subsys/logging/log_backend_adsp.c rename to subsys/logging/log_backend_rb.c index b52812d4ccf..4ad6c5db7bc 100644 --- a/subsys/logging/log_backend_adsp.c +++ b/subsys/logging/log_backend_rb.c @@ -12,7 +12,7 @@ #define BUF_SIZE 64 -BUILD_ASSERT(CONFIG_LOG_BACKEND_ADSP_RINGBUF_SIZE % BUF_SIZE == 0); +BUILD_ASSERT(CONFIG_LOG_BACKEND_RB_MEM_SIZE % BUF_SIZE == 0); static struct ring_buf ringbuf; @@ -25,8 +25,8 @@ static struct ring_buf ringbuf; static void init(void) { - ring_buf_init(&ringbuf, CONFIG_LOG_BACKEND_ADSP_RINGBUF_SIZE, - (void *)CONFIG_LOG_BACKEND_ADSP_RINGBUF_BASE); + ring_buf_init(&ringbuf, CONFIG_LOG_BACKEND_RB_MEM_SIZE, + (void *)CONFIG_LOG_BACKEND_RB_MEM_BASE); } static void trace(const u8_t *data, size_t length)