Skip to content

Commit d744719

Browse files
hakehuangcarlescufi
authored andcommitted
test: dma: fix dma code-data_relocation failure on nxp rt platforms
NXP RT series DMA need use buffer in nocached area, so only use memory region relocated is not enough. fixing: #67053 Signed-off-by: Hake Huang <[email protected]>
1 parent 4ce0555 commit d744719

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+217
-4
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_CODE_DATA_RELOCATION=y
2+
CONFIG_MEM_ATTR_HEAP=y
3+
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="ITCM"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
/*
22
* Copyright (c) 2022 Kumar Gala <[email protected]>
3+
* Copyright (c) 2024 NXP
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
67

8+
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
9+
10+
&itcm {
11+
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
12+
};
13+
714
test_dma0: &edma0 { };
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_CODE_DATA_RELOCATION=y
2+
CONFIG_MEM_ATTR_HEAP=y
3+
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="ITCM"
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
/*
2-
* Copyright 2023 NXP
2+
* Copyright (c) 2022 Kumar Gala <[email protected]>
3+
* Copyright (c) 2024 NXP
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
67

7-
test_dma0: &edma0 {};
8+
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
9+
10+
&itcm {
11+
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
12+
};
13+
14+
test_dma0: &edma0 { };
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_CODE_DATA_RELOCATION=y
2+
CONFIG_MEM_ATTR_HEAP=y
3+
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="DTCM"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
/*
22
* Copyright (c) 2022 Kumar Gala <[email protected]>
3+
* Copyright (c) 2024 NXP
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
67

8+
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
9+
10+
&dtcm {
11+
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
12+
};
13+
714
test_dma0: &edma0 { };
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_CODE_DATA_RELOCATION=y
2+
CONFIG_MEM_ATTR_HEAP=y
3+
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="ITCM"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
/*
22
* Copyright (c) 2022 Kumar Gala <[email protected]>
3+
* Copyright (c) 2024 NXP
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
67

8+
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
9+
10+
&itcm {
11+
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
12+
};
13+
714
test_dma0: &edma0 { };
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_CODE_DATA_RELOCATION=y
2+
CONFIG_MEM_ATTR_HEAP=y
3+
CONFIG_DMA_LOOP_TRANSFER_RELOCATE_SECTION="ITCM"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
/*
22
* Copyright (c) 2022 Kumar Gala <[email protected]>
3+
* Copyright (c) 2024 NXP
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
67

8+
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
9+
10+
&itcm {
11+
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
12+
};
13+
714
test_dma0: &edma0 { };

0 commit comments

Comments
 (0)