Skip to content

Commit b482346

Browse files
andrew-mtklgirdwood
authored andcommitted
platform: mtk: add mt8365 memory layout and register definitions
Add memory layout and register addresses for mt8365. [Cache] I-Cache: 32KB, 4-way Associativity D-Cache: 32KB, 4-way Associativity [Memory] DRAM: DSP can access DRAM shared with CPU Signed-off-by: Andrew Perepech <andrew.perepech@mediatek.com>
1 parent 23068f3 commit b482346

2 files changed

Lines changed: 381 additions & 0 deletions

File tree

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/* SPDX-License-Identifier: BSD-3-Clause */
2+
/*
3+
* Copyright(c) 2024 MediaTek. All rights reserved.
4+
*
5+
* Author: Andrew Perepech <andrew.perepech@mediatek.com>
6+
*/
7+
8+
#ifndef MT_REG_BASE_H
9+
#define MT_REG_BASE_H
10+
11+
#define DSP_REG_BASE (0x1D062000) /* DSPCFG base */
12+
#define DSP_TIMER_BASE (0x1D060000)
13+
#define DSP_UART0_BASE (0x1D061000)
14+
#define DSP_WDT_BASE (0x1D062400)
15+
#define DSP_IRQ_BASE (0x1D063000)
16+
#define DSP_D_TCM (CFG_HIFI4_DTCM_ADDRESS)
17+
#define DSP_I_TCM (CFG_HIFI4_ITCM_ADDRESS)
18+
#define DSP_DRAM_BASE (CFG_HIFI4_DRAM_ADDRESS)
19+
20+
#define DSP_AUDIO_SRAM_BASE (0x11221000)
21+
#define DSP_AUDIO_SRAM_SIZE (0xA000)
22+
#define DSP_REG_REMAP_BASE (0x1D060000)
23+
#define DSP_REG_REMAP_SIZE (0x8000)
24+
#define DSP_SYS_REG_BASE (0x10000000)
25+
#define DSP_SYS_REG_SIZE (0x1221000)
26+
#define DSP_VER_REG_BASE (0x08000000)
27+
#define DSP_VER_REG_SIZE (0x1000)
28+
29+
30+
#define DSP_JTAGMUX (DSP_REG_BASE + 0x0000)
31+
#define DSP_ALTRESETVEC (DSP_REG_BASE + 0x0004)
32+
#define DSP_PDEBUGDATA (DSP_REG_BASE + 0x0008)
33+
#define DSP_PDEBUGBUS0 (DSP_REG_BASE + 0x000c)
34+
#define DSP_PDEBUGBUS1 (DSP_REG_BASE + 0x0010)
35+
#define DSP_PDEBUGINST (DSP_REG_BASE + 0x0014)
36+
#define DSP_PDEBUGLS0STAT (DSP_REG_BASE + 0x0018)
37+
#define DSP_PDEBUGLS1STAT (DSP_REG_BASE + 0x001c)
38+
#define DSP_PDEBUGPC (DSP_REG_BASE + 0x0020)
39+
#define DSP_RESET_SW (DSP_REG_BASE + 0x0024)
40+
#define DSP_PFAULTBUS (DSP_REG_BASE + 0x0028)
41+
#define DSP_PFAULTINFO (DSP_REG_BASE + 0x002c)
42+
#define DSP_GPR00 (DSP_REG_BASE + 0x0030)
43+
#define DSP_GPR01 (DSP_REG_BASE + 0x0034)
44+
#define DSP_GPR02 (DSP_REG_BASE + 0x0038)
45+
#define DSP_GPR03 (DSP_REG_BASE + 0x003c)
46+
#define DSP_GPR04 (DSP_REG_BASE + 0x0040)
47+
#define DSP_GPR05 (DSP_REG_BASE + 0x0044)
48+
#define DSP_GPR06 (DSP_REG_BASE + 0x0048)
49+
#define DSP_GPR07 (DSP_REG_BASE + 0x004c)
50+
#define DSP_GPR08 (DSP_REG_BASE + 0x0050)
51+
#define DSP_GPR09 (DSP_REG_BASE + 0x0054)
52+
#define DSP_GPR0A (DSP_REG_BASE + 0x0058)
53+
#define DSP_GPR0B (DSP_REG_BASE + 0x005c)
54+
#define DSP_GPR0C (DSP_REG_BASE + 0x0060)
55+
#define DSP_GPR0D (DSP_REG_BASE + 0x0064)
56+
#define DSP_GPR0E (DSP_REG_BASE + 0x0068)
57+
#define DSP_GPR0F (DSP_REG_BASE + 0x006c)
58+
#define DSP_GPR10 (DSP_REG_BASE + 0x0070)
59+
#define DSP_GPR11 (DSP_REG_BASE + 0x0074)
60+
#define DSP_GPR12 (DSP_REG_BASE + 0x0078)
61+
#define DSP_GPR13 (DSP_REG_BASE + 0x007c)
62+
#define DSP_GPR14 (DSP_REG_BASE + 0x0080)
63+
#define DSP_GPR15 (DSP_REG_BASE + 0x0084)
64+
#define DSP_GPR16 (DSP_REG_BASE + 0x0088)
65+
#define DSP_GPR17 (DSP_REG_BASE + 0x008c)
66+
#define DSP_GPR18 (DSP_REG_BASE + 0x0090)
67+
#define DSP_GPR19 (DSP_REG_BASE + 0x0094)
68+
#define DSP_GPR1A (DSP_REG_BASE + 0x0098)
69+
#define DSP_GPR1B (DSP_REG_BASE + 0x009c)
70+
#define DSP_GPR1C (DSP_REG_BASE + 0x00a0)
71+
#define DSP_GPR1D (DSP_REG_BASE + 0x00a4)
72+
#define DSP_GPR1E (DSP_REG_BASE + 0x00a8)
73+
#define DSP_GPR1F (DSP_REG_BASE + 0x00ac)
74+
#define DSP_TCM_OFFSET (DSP_REG_BASE + 0x00b0) /* not used */
75+
#define DSP_DDR_OFFSET (DSP_REG_BASE + 0x00b4) /* not used */
76+
#define DSP_INTFDSP (DSP_REG_BASE + 0x00d0)
77+
#define DSP_INTFDSP_CLR (DSP_REG_BASE + 0x00d4)
78+
#define DSP_SRAM_PD_SW1 (DSP_REG_BASE + 0x00d8)
79+
#define DSP_SRAM_PD_SW2 (DSP_REG_BASE + 0x00dc)
80+
#define DSP_OCD (DSP_REG_BASE + 0x00e0)
81+
#define DSP_RG_DSP_IRQ_POL (DSP_REG_BASE + 0x00f0) /* not used */
82+
#define DSP_DSP_IRQ_EN (DSP_REG_BASE + 0x00f4) /* not used */
83+
#define DSP_DSP_IRQ_LEVEL (DSP_REG_BASE + 0x00f8) /* not used */
84+
#define DSP_DSP_IRQ_STATUS (DSP_REG_BASE + 0x00fc) /* not used */
85+
#define DSP_RG_INT2CIRQ (DSP_REG_BASE + 0x0114)
86+
#define DSP_RG_INT_POL_CTL0 (DSP_REG_BASE + 0x0120)
87+
#define DSP_RG_INT_EN_CTL0 (DSP_REG_BASE + 0x0130)
88+
#define DSP_RG_INT_LV_CTL0 (DSP_REG_BASE + 0x0140)
89+
#define DSP_RG_INT_STATUS0 (DSP_REG_BASE + 0x0150)
90+
#define DSP_PDEBUGSTATUS0 (DSP_REG_BASE + 0x0200)
91+
#define DSP_PDEBUGSTATUS1 (DSP_REG_BASE + 0x0204)
92+
#define DSP_PDEBUGSTATUS2 (DSP_REG_BASE + 0x0208)
93+
#define DSP_PDEBUGSTATUS3 (DSP_REG_BASE + 0x020c)
94+
#define DSP_PDEBUGSTATUS4 (DSP_REG_BASE + 0x0210)
95+
#define DSP_PDEBUGSTATUS5 (DSP_REG_BASE + 0x0214)
96+
#define DSP_PDEBUGSTATUS6 (DSP_REG_BASE + 0x0218)
97+
#define DSP_PDEBUGSTATUS7 (DSP_REG_BASE + 0x021c)
98+
#define DSP_DSP2PSRAM_PRIORITY (DSP_REG_BASE + 0x0220) /* not used */
99+
#define DSP_AUDIO_DSP2SPM_INT (DSP_REG_BASE + 0x0224)
100+
#define DSP_AUDIO_DSP2SPM_INT_ACK (DSP_REG_BASE + 0x0228)
101+
#define DSP_AUDIO_DSP_DEBUG_SEL (DSP_REG_BASE + 0x022C)
102+
#define DSP_AUDIO_DSP_EMI_BASE_ADDR (DSP_REG_BASE + 0x02E0) /* not used */
103+
#define DSP_AUDIO_DSP_SHARED_IRAM (DSP_REG_BASE + 0x02E4)
104+
#define DSP_AUDIO_DSP_CKCTRL_P2P_CK_CON (DSP_REG_BASE + 0x02F0)
105+
#define DSP_RG_SEMAPHORE00 (DSP_REG_BASE + 0x0300)
106+
#define DSP_RG_SEMAPHORE01 (DSP_REG_BASE + 0x0304)
107+
#define DSP_RG_SEMAPHORE02 (DSP_REG_BASE + 0x0308)
108+
#define DSP_RG_SEMAPHORE03 (DSP_REG_BASE + 0x030C)
109+
#define DSP_RG_SEMAPHORE04 (DSP_REG_BASE + 0x0310)
110+
#define DSP_RG_SEMAPHORE05 (DSP_REG_BASE + 0x0314)
111+
#define DSP_RG_SEMAPHORE06 (DSP_REG_BASE + 0x0318)
112+
#define DSP_RG_SEMAPHORE07 (DSP_REG_BASE + 0x031C)
113+
#define DSP_RESERVED_0 (DSP_REG_BASE + 0x03F0)
114+
#define DSP_RESERVED_1 (DSP_REG_BASE + 0x03F4) /* use for tickless status */
115+
116+
/* Redefinition for using Special registers */
117+
#define TICKLESS_STATUS_REG (DSP_RESERVED_1)
118+
119+
/* WDT CONFIGS */
120+
#define ADSP_WDT_MODE (DSP_REG_BASE + 0x400 + 0x00)
121+
#define ADSP_WDT_LENGTH (DSP_REG_BASE + 0x400 + 0x04)
122+
#define ADSP_WDT_RESTART (DSP_REG_BASE + 0x400 + 0x08)
123+
#define ADSP_WDT_STA (DSP_REG_BASE + 0x400 + 0x0C)
124+
#define ADSP_WDT_SWRST (DSP_REG_BASE + 0x400 + 0x14)
125+
126+
#define ADSP_WDT_SWRST_KEY 0x1209
127+
#define ADSP_WDT_RESTART_RELOAD 0x1971
128+
#define ADSP_WDT_LENGTH_KEY 0x8
129+
130+
#define WDT_LENGTH_TIMEOUT(n) ((n) << 5)
131+
132+
/* DSP IPI IRQ */
133+
#define CPU2DSP_IRQ BIT(0)
134+
#define DSP2CPU_IRQ BIT(1)
135+
#define DSP2SPM_IRQ_B BIT(2)
136+
137+
#endif /* MT_REG_BASE_H */
138+
Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
/* SPDX-License-Identifier: BSD-3-Clause */
2+
/*
3+
* Copyright(c) 2024 MediaTek. All rights reserved.
4+
*
5+
* Author: Andrew Perepech <andrew.perepech@mediatek.com>
6+
*/
7+
8+
#ifdef __SOF_LIB_MEMORY_H__
9+
10+
#ifndef __PLATFORM_LIB_MEMORY_H__
11+
#define __PLATFORM_LIB_MEMORY_H__
12+
13+
#include <rtos/cache.h>
14+
#include <xtensa/config/core-isa.h>
15+
16+
#define BOOT_WITH_DRAM /*Use DRAM as SRAM1 for heap related*/
17+
/* data cache line alignment */
18+
#define PLATFORM_DCACHE_ALIGN sizeof(void *)
19+
20+
/*
21+
* +-----------------------------------+-----------------------------+
22+
* | | AUDIO_DSP_SHARED_DRAM |
23+
* +------------+----------------------+---------+---------+---------+
24+
* | DSP | Sys | Size | 00b | 01b *** | 11b |
25+
* +------------+------------+---------+---------+---------+---------+
26+
* | 0x40000000 | 0x1e100000 | 0x8000 | iram0_0 | iram0_0 | iram0_0 |
27+
* | 0x40008000 | 0x1e108000 | 0x8000 | iram0_1 | iram0_1 | --- |
28+
* | 0x40010000 | 0x1e110000 | 0x8000 | iram1 | --- | --- |
29+
* +------------+------------+---------+---------+---------+---------+
30+
* | 0x1e000000 | 0x1e000000 | 0x40000 | dram0 | dram0 | dram0 |
31+
* | 0x1e040000 | 0x1e040000 | 0x20000 | dram1 | dram1 | dram1 |
32+
* | 0x1e060000 | 0x1e060000 | 0x8000 | --- | iram1 | iram1 |
33+
* | 0x1e068000 | 0x1e068000 | 0x8000 | --- | --- | iram0_1 |
34+
* +------------+------------+---------+---------+---------+---------+
35+
*/
36+
37+
/* BOOT_WITH_DRAM ONLY */
38+
/* physical DSP addresses */
39+
#define DRAM_BASE 0x60000000
40+
#define DRAM_AUDIO_SHARED_SIZE 0x280000
41+
#define DRAM_SIZE 0x1000000 /*DRAM Size : 16M , need to sync with Host side*/
42+
43+
#define SRAM_TOTAL_SIZE 0x40000 /*256KB DSP SRAM*/
44+
#define VECTOR_SIZE 0x628
45+
46+
#define SRAM0_BASE DRAM_BASE
47+
#define SRAM0_SIZE (DRAM_SIZE >> 1)
48+
#define SRAM1_BASE (DRAM_BASE + SRAM0_SIZE)
49+
#define SRAM1_SIZE \
50+
(DRAM_SIZE - SRAM0_SIZE - DRAM_AUDIO_SHARED_SIZE - UUID_ENTRY_ELF_SIZE - \
51+
LOG_ENTRY_ELF_SIZE - EXT_MANIFEST_ELF_SIZE)
52+
53+
#define DMA_SIZE 0x100000
54+
55+
#define UUID_ENTRY_ELF_SIZE 0x6000
56+
#define LOG_ENTRY_ELF_SIZE 0x200000
57+
#define EXT_MANIFEST_ELF_SIZE 0x100000
58+
59+
#define UUID_ENTRY_ELF_BASE (SRAM1_BASE + SRAM1_SIZE)
60+
#define LOG_ENTRY_ELF_BASE (UUID_ENTRY_ELF_BASE + UUID_ENTRY_ELF_SIZE)
61+
#define EXT_MANIFEST_ELF_BASE (LOG_ENTRY_ELF_BASE + LOG_ENTRY_ELF_SIZE)
62+
63+
/*
64+
* The Memory Layout on MT8365 are organised like this :-
65+
*
66+
* +--------------------------------------------------------------------------+
67+
* | Offset | Region | Size |
68+
* +---------------------+----------------+-----------------------------------+
69+
* | XCHAL_RESET_VECTOR0 | DSP Vectors | VECTOR_SIZE |
70+
* +---------------------+----------------+-----------------------------------+
71+
* | SRAM0_BASE | fw_ready | SRAM0_SIZE |
72+
* | | RO Data | |
73+
* | | module_init | |
74+
* | | Text | |
75+
* | | Data | |
76+
* | | BSS | |
77+
* +---------------------+----------------+-----------------------------------+
78+
* | SRAM1_BASE | MAILBOX | SOF_MAILBOX_SIZE |
79+
* +---------------------+----------------+-----------------------------------+
80+
* | HEAP_SYSTEM_BASE | System Heap | HEAP_SYSTEM_SIZE |
81+
* +---------------------+----------------+-----------------------------------+
82+
* | HEAP_RUNTIME_BASE | Runtime Heap | HEAP_RUNTIME_SIZE |
83+
* +---------------------+----------------+-----------------------------------+
84+
* | HEAP_BUFFER_BASE | Module Buffers | HEAP_BUFFER_SIZE |
85+
* +---------------------+----------------+-----------------------------------+
86+
* | SOF_STACK_END | Stack | SOF_STACK_SIZE |
87+
* +---------------------+----------------+-----------------------------------+
88+
* | SOF_STACK_BASE | | |
89+
* +---------------------+----------------+-----------------------------------+
90+
*/
91+
92+
/* Mailbox configuration */
93+
#define SRAM_OUTBOX_BASE SRAM1_BASE
94+
#define SRAM_OUTBOX_SIZE 0x1000
95+
#define SRAM_OUTBOX_OFFSET 0
96+
97+
#define SRAM_INBOX_BASE (SRAM_OUTBOX_BASE + SRAM_OUTBOX_SIZE)
98+
#define SRAM_INBOX_SIZE 0x1000
99+
#define SRAM_INBOX_OFFSET SRAM_OUTBOX_SIZE
100+
101+
#define SRAM_DEBUG_BASE (SRAM_INBOX_BASE + SRAM_INBOX_SIZE)
102+
#define SRAM_DEBUG_SIZE 0x800
103+
#define SRAM_DEBUG_OFFSET (SRAM_INBOX_OFFSET + SRAM_INBOX_SIZE)
104+
105+
#define SRAM_EXCEPT_BASE (SRAM_DEBUG_BASE + SRAM_DEBUG_SIZE)
106+
#define SRAM_EXCEPT_SIZE 0x800
107+
#define SRAM_EXCEPT_OFFSET (SRAM_DEBUG_OFFSET + SRAM_DEBUG_SIZE)
108+
109+
#define SRAM_STREAM_BASE (SRAM_EXCEPT_BASE + SRAM_EXCEPT_SIZE)
110+
#define SRAM_STREAM_SIZE 0x1000
111+
#define SRAM_STREAM_OFFSET (SRAM_EXCEPT_OFFSET + SRAM_EXCEPT_SIZE)
112+
113+
#define SRAM_TRACE_BASE (SRAM_STREAM_BASE + SRAM_STREAM_SIZE)
114+
#define SRAM_TRACE_SIZE 0x1000
115+
#define SRAM_TRACE_OFFSET (SRAM_STREAM_OFFSET + SRAM_STREAM_SIZE)
116+
117+
/*4K + 4K +2K + 2K + 4K + 4K = 20KB*/
118+
#define SOF_MAILBOX_SIZE \
119+
(SRAM_INBOX_SIZE + SRAM_OUTBOX_SIZE + SRAM_DEBUG_SIZE + SRAM_EXCEPT_SIZE + \
120+
SRAM_STREAM_SIZE + SRAM_TRACE_SIZE)
121+
122+
/* Heap section sizes for module pool */
123+
#define HEAP_RT_COUNT8 0
124+
#define HEAP_RT_COUNT16 48
125+
#define HEAP_RT_COUNT32 48
126+
#define HEAP_RT_COUNT64 32
127+
#define HEAP_RT_COUNT128 32
128+
#define HEAP_RT_COUNT256 32
129+
#define HEAP_RT_COUNT512 32
130+
#define HEAP_RT_COUNT1024 4
131+
#define HEAP_RT_COUNT2048 2
132+
#define HEAP_RT_COUNT4096 2
133+
134+
/* Heap section sizes for system runtime heap */
135+
#define HEAP_SYS_RT_COUNT64 128
136+
#define HEAP_SYS_RT_COUNT512 16
137+
#define HEAP_SYS_RT_COUNT1024 8
138+
139+
/* Heap configuration */
140+
141+
#define HEAP_SYSTEM_BASE (SRAM1_BASE + SOF_MAILBOX_SIZE)
142+
#define HEAP_SYSTEM_SIZE 0x6000
143+
144+
#define HEAP_SYSTEM_0_BASE HEAP_SYSTEM_BASE
145+
146+
#define HEAP_SYS_RUNTIME_BASE (HEAP_SYSTEM_BASE + HEAP_SYSTEM_SIZE)
147+
/*24KB*/
148+
#define HEAP_SYS_RUNTIME_SIZE \
149+
(HEAP_SYS_RT_COUNT64 * 64 + HEAP_SYS_RT_COUNT512 * 512 + HEAP_SYS_RT_COUNT1024 * 1024)
150+
151+
#define HEAP_RUNTIME_BASE (HEAP_SYS_RUNTIME_BASE + HEAP_SYS_RUNTIME_SIZE)
152+
/*48*(16 +32) + 32*(64 128+256) + 4*(512+1024) + 1*2048 = 24832 = 24.25KB*/
153+
#define HEAP_RUNTIME_SIZE \
154+
(HEAP_RT_COUNT8 * 8 + HEAP_RT_COUNT16 * 16 + HEAP_RT_COUNT32 * 32 + HEAP_RT_COUNT64 * 64 + \
155+
HEAP_RT_COUNT128 * 128 + HEAP_RT_COUNT256 * 256 + HEAP_RT_COUNT512 * 512 + \
156+
HEAP_RT_COUNT1024 * 1024 + HEAP_RT_COUNT2048 * 2048 + HEAP_RT_COUNT4096 * 4096)
157+
158+
#define HEAP_BUFFER_BASE (HEAP_RUNTIME_BASE + HEAP_RUNTIME_SIZE)
159+
#define HEAP_BUFFER_SIZE \
160+
(SRAM1_SIZE - SOF_MAILBOX_SIZE - HEAP_RUNTIME_SIZE - SOF_STACK_TOTAL_SIZE - \
161+
HEAP_SYS_RUNTIME_SIZE - HEAP_SYSTEM_SIZE)
162+
163+
#define HEAP_BUFFER_BLOCK_SIZE 0x100
164+
#define HEAP_BUFFER_COUNT (HEAP_BUFFER_SIZE / HEAP_BUFFER_BLOCK_SIZE)
165+
166+
#define PLATFORM_HEAP_SYSTEM 1 /* one per core */
167+
#define PLATFORM_HEAP_SYSTEM_RUNTIME 1 /* one per core */
168+
#define PLATFORM_HEAP_RUNTIME 1
169+
#define PLATFORM_HEAP_BUFFER 1
170+
171+
/* Stack configuration */
172+
#define SOF_STACK_SIZE 0x8000
173+
#define SOF_STACK_TOTAL_SIZE SOF_STACK_SIZE /*4KB*/
174+
#define SOF_STACK_BASE (SRAM1_BASE + SRAM1_SIZE)
175+
#define SOF_STACK_END (SOF_STACK_BASE - SOF_STACK_TOTAL_SIZE)
176+
177+
/* Vector and literal sizes - not in core-isa.h */
178+
#define SOF_MEM_VECT_LIT_SIZE 0x4
179+
#define SOF_MEM_VECT_TEXT_SIZE 0x1c
180+
#define SOF_MEM_VECT_SIZE (SOF_MEM_VECT_TEXT_SIZE + SOF_MEM_VECT_LIT_SIZE)
181+
182+
#define SOF_MEM_RESET_TEXT_SIZE 0x2e0
183+
#define SOF_MEM_RESET_LIT_SIZE 0x120
184+
#define SOF_MEM_VECBASE_LIT_SIZE 0x178
185+
186+
#define SOF_MEM_RO_SIZE 0x8
187+
188+
#define HEAP_BUF_ALIGNMENT DCACHE_LINE_SIZE
189+
190+
/** \brief EDF task's default stack size in bytes. */
191+
#ifdef CONFIG_COMP_GOOGLE_RTC_AUDIO_PROCESSING
192+
#define PLATFORM_TASK_DEFAULT_STACK_SIZE (12 * 1024)
193+
#else
194+
#define PLATFORM_TASK_DEFAULT_STACK_SIZE 3072
195+
#endif
196+
197+
#if !defined(__ASSEMBLER__) && !defined(LINKER)
198+
199+
struct sof;
200+
201+
/**
202+
* \brief Data shared between different cores.
203+
* Does nothing, since mt8195 doesn't support SMP.
204+
*/
205+
#define SHARED_DATA
206+
207+
void platform_init_memmap(struct sof *sof);
208+
209+
static inline void *platform_shared_get(void *ptr, int bytes)
210+
{
211+
return ptr;
212+
}
213+
214+
#define uncache_to_cache(address) address
215+
#define cache_to_uncache(address) address
216+
#define cache_to_uncache_init(address) address
217+
#define is_uncached(address) 0
218+
219+
/**
220+
* \brief Function for keeping shared data synchronized.
221+
* It's used after usage of data shared by different cores.
222+
* Such data is either statically marked with SHARED_DATA
223+
* or dynamically allocated with SOF_MEM_FLAG_SHARED flag.
224+
* Does nothing, since mt8195 doesn't support SMP.
225+
*/
226+
227+
static inline void *platform_rfree_prepare(void *ptr)
228+
{
229+
return ptr;
230+
}
231+
232+
#endif
233+
234+
#define host_to_local(addr) (addr)
235+
#define local_to_host(addr) (addr)
236+
237+
#endif /* __PLATFORM_LIB_MEMORY_H__ */
238+
239+
#else
240+
241+
#error "This file shouldn't be included from outside of sof/lib/memory.h"
242+
243+
#endif /* __SOF_LIB_MEMORY_H__ */

0 commit comments

Comments
 (0)