Skip to content

Commit eb8923d

Browse files
nordic-krchgmarull
authored andcommitted
[nrf fromtree] drivers: misc: coresight: nrf_etr: Use dmm API for the buffer declaration
Use DMM_MEMORY_SECTION instead of a custom macro. When file was created dmm was not present yet. Signed-off-by: Krzysztof Chruściński <[email protected]> (cherry picked from commit fe6c288)
1 parent 91b495f commit eb8923d

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

drivers/misc/coresight/nrf_etr.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <zephyr/linker/devicetree_regions.h>
1818
#include <zephyr/drivers/misc/coresight/nrf_etr.h>
1919
#include <zephyr/sys/printk.h>
20+
#include <dmm.h>
2021
#include <nrfx_tbm.h>
2122
#include <stdio.h>
2223
LOG_MODULE_REGISTER(cs_etr_tbm);
@@ -31,12 +32,6 @@ LOG_MODULE_REGISTER(cs_etr_tbm);
3132

3233
#define MIN_DATA (2 * CORESIGHT_TRACE_FRAME_SIZE32)
3334

34-
#define MEMORY_SECTION(node) \
35-
COND_CODE_1(DT_NODE_HAS_PROP(node, memory_regions), \
36-
(__attribute__((__section__( \
37-
LINKER_DT_NODE_REGION_NAME(DT_PHANDLE(node, memory_regions)))))), \
38-
())
39-
4035
/* Since ETR debug is a part of logging infrastructure, logging cannot be used
4136
* for debugging. Printk is used (assuming CONFIG_LOG_PRINTK=n)
4237
*/
@@ -86,8 +81,8 @@ static bool volatile use_async_uart;
8681

8782
static struct k_sem uart_sem;
8883
static const struct device *uart_dev = DEVICE_DT_GET(UART_NODE);
89-
static uint32_t frame_buf0[CORESIGHT_TRACE_FRAME_SIZE32] MEMORY_SECTION(UART_NODE);
90-
static uint32_t frame_buf1[CORESIGHT_TRACE_FRAME_SIZE32] MEMORY_SECTION(UART_NODE);
84+
static uint32_t frame_buf0[CORESIGHT_TRACE_FRAME_SIZE32] DMM_MEMORY_SECTION(UART_NODE);
85+
static uint32_t frame_buf1[CORESIGHT_TRACE_FRAME_SIZE32] DMM_MEMORY_SECTION(UART_NODE);
9186
static uint32_t frame_buf_decode[CORESIGHT_TRACE_FRAME_SIZE32];
9287
static uint32_t *frame_buf = IS_ENABLED(CONFIG_NRF_ETR_DECODE) ?
9388
frame_buf_decode : frame_buf0;

0 commit comments

Comments
 (0)