10#include "fsl_common.h"
16#ifndef FSL_COMPONENT_ID
17#define FSL_COMPONENT_ID "platform.drivers.memory"
20#define FSL_MEM_M4_TCM_BEGIN 0x1FFE0000U
22#define FSL_MEM_M4_TCM_END 0x2001FFFFU
24#define FSL_MEM_M4_TCM_OFFSET 0x220000U
26typedef enum _mem_direction
28 kMEMORY_Local2DMA = 0,
35#if defined(__cplusplus)
48static inline uint32_t MEMORY_ConvertMemoryMapAddress(uint32_t addr, mem_direction_t direction)
54 case kMEMORY_Local2DMA:
56 if ((addr >= FSL_MEM_M4_TCM_BEGIN) && (addr <= FSL_MEM_M4_TCM_END))
58 dest = addr + FSL_MEM_M4_TCM_OFFSET;
66 case kMEMORY_DMA2Local:
68 if ((addr >= (FSL_MEM_M4_TCM_BEGIN + FSL_MEM_M4_TCM_OFFSET)) &&
69 (addr <= (FSL_MEM_M4_TCM_END + FSL_MEM_M4_TCM_OFFSET)))
71 dest = addr - FSL_MEM_M4_TCM_OFFSET;
86#if defined(__cplusplus)