Skip to content

Commit d6870e4

Browse files
Wayne Rennashif
authored andcommitted
board: emsk: fix the ddr related definitons
* add ddr fixup in dts_fixup.h * use DT_DDR_XXX in linker.ld Signed-off-by: Wayne Ren <[email protected]>
1 parent 195195a commit d6870e4

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

soc/arc/snps_emsk/dts_fixup.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
/* SoC level DTS fixup file */
22

33
/* CCM configuration */
4-
#define DT_DCCM_BASE_ADDRESS DT_ARC_DCCM_80000000_BASE_ADDRESS
5-
#define DT_DCCM_SIZE (DT_ARC_DCCM_80000000_SIZE >> 10)
4+
#define DT_DCCM_BASE_ADDRESS DT_ARC_DCCM_80000000_BASE_ADDRESS
5+
#define DT_DCCM_SIZE (DT_ARC_DCCM_80000000_SIZE >> 10)
66

7-
#define DT_ICCM_BASE_ADDRESS DT_ARC_ICCM_0_BASE_ADDRESS
8-
#define DT_ICCM_SIZE (DT_ARC_ICCM_0_SIZE >> 10)
7+
#define DT_ICCM_BASE_ADDRESS DT_ARC_ICCM_0_BASE_ADDRESS
8+
#define DT_ICCM_SIZE (DT_ARC_ICCM_0_SIZE >> 10)
9+
10+
#define DT_DDR_BASE_ADDRESS DT_MMIO_SRAM_10000000_BASE_ADDRESS
11+
#define DT_DDR_SIZE (DT_MMIO_SRAM_10000000_SIZE >> 10)
912

1013
/*
1114
* UART configuration

soc/arc/snps_emsk/linker.ld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* DRAM includes the exception vector table at reset, which is at
1818
* the beginning of the region.
1919
*/
20-
#if defined(DT_MMIO_SRAM_0_BASE_ADDRESS) && (DT_MMIO_SRAM_0_SIZE > 0)
21-
#define SRAM_START DT_MMIO_SRAM_0_BASE_ADDRESS
22-
#define SRAM_SIZE (DT_MMIO_SRAM_0_SIZE >> 10)
20+
#if defined(DT_DDR_BASE_ADDRESS) && (DT_DDR_SIZE > 0)
21+
#define SRAM_START DT_DDR_BASE_ADDRESS
22+
#define SRAM_SIZE DT_DDR_SIZE
2323
#endif
2424

2525
/* Instruction Closely Coupled Memory (ICCM) base address and size */

0 commit comments

Comments
 (0)