Skip to content

Commit 62f6742

Browse files
author
Marcin Maka
committed
make: cavs: make memory windows a configurable feature
Disabled for Sue configuration. Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
1 parent 101610e commit 62f6742

2 files changed

Lines changed: 11 additions & 17 deletions

File tree

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ case "$with_platform" in
242242
AC_DEFINE([CONFIG_BOOT_LOADER], [1], [Configure Boot Loader])
243243
AC_DEFINE([CONFIG_IRQ_MAP], [1], [Configure IRQ maps])
244244
AC_DEFINE([CONFIG_DMA_GW], [1], [Configure DMA Gateway])
245+
AC_DEFINE([CONFIG_MEM_WND], [1], [Configure Memory Windows])
245246
;;
246247
haswell*)
247248

@@ -295,6 +296,7 @@ case "$with_platform" in
295296
AC_DEFINE([CONFIG_BOOT_LOADER], [1], [Configure Boot Loader])
296297
AC_DEFINE([CONFIG_IRQ_MAP], [1], [Configure IRQ maps])
297298
AC_DEFINE([CONFIG_DMA_GW], [1], [Configure DMA Gateway])
299+
AC_DEFINE([CONFIG_MEM_WND], [1], [Configure Memory Windows])
298300
;;
299301
suecreek*)
300302

@@ -332,6 +334,7 @@ case "$with_platform" in
332334
AC_DEFINE([CONFIG_BOOT_LOADER], [1], [Configure Boot Loader])
333335
AC_DEFINE([CONFIG_IRQ_MAP], [1], [Configure IRQ maps])
334336
AC_DEFINE([CONFIG_DMA_GW], [1], [Configure DMA Gateway])
337+
AC_DEFINE([CONFIG_MEM_WND], [1], [Configure Memory Windows])
335338
;;
336339
*)
337340
if test "$have_rimage" = "no" && test "$have_doc" = "no"; then

src/platform/intel/cavs/platform.c

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static const struct sof_ipc_fw_ready ready = {
7474
},
7575
};
7676

77-
#if !defined(CONFIG_SUECREEK)
77+
#if defined(CONFIG_MEM_WND)
7878
#define SRAM_WINDOW_HOST_OFFSET(x) (0x80000 + x * 0x20000)
7979

8080
#define NUM_WINDOWS 7
@@ -194,39 +194,30 @@ struct work_queue_timesource platform_generic_queue[] = {
194194
struct timer *platform_timer =
195195
&platform_generic_queue[PLATFORM_MASTER_CORE_ID].timer;
196196

197-
#if defined(CONFIG_SUECREEK)
198-
int platform_boot_complete(uint32_t boot_message)
199-
{
200-
mailbox_dspbox_write(0, &ready, sizeof(ready));
201-
return 0;
202-
}
203-
204-
#else
205-
206197
int platform_boot_complete(uint32_t boot_message)
207198
{
208199
mailbox_dspbox_write(0, &ready, sizeof(ready));
200+
#if defined(CONFIG_MEM_WND)
209201
mailbox_dspbox_write(sizeof(ready), &sram_window,
210202
sram_window.ext_hdr.hdr.size);
203+
#endif // defined(CONFIG_MEM_WND)
211204

212-
#if defined(CONFIG_APOLLOLAKE)
205+
#if defined(CONFIG_APOLLOLAKE)
213206
/* boot now complete so we can relax the CPU */
214207
clock_set_freq(CLK_CPU(cpu_get_id()), CLK_DEFAULT_CPU_HZ);
215208

216209
/* tell host we are ready */
217210
ipc_write(IPC_DIPCIE, SRAM_WINDOW_HOST_OFFSET(0) >> 12);
218211
ipc_write(IPC_DIPCI, 0x80000000 | SOF_IPC_FW_READY);
219-
#elif defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE)
212+
#elif defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE)
220213
/* tell host we are ready */
221214
ipc_write(IPC_DIPCIDD, SRAM_WINDOW_HOST_OFFSET(0) >> 12);
222215
ipc_write(IPC_DIPCIDR, 0x80000000 | SOF_IPC_FW_READY);
223-
#endif
224-
216+
#endif
225217
return 0;
226218
}
227-
#endif
228219

229-
#if !defined(CONFIG_SUECREEK)
220+
#if defined(CONFIG_MEM_WND)
230221
static void platform_memory_windows_init(void)
231222
{
232223
/* window0, for fw status & outbox/uplink mbox */
@@ -296,7 +287,7 @@ int platform_init(struct sof *sof)
296287

297288
trace_point(TRACE_BOOT_PLATFORM_MBOX);
298289

299-
#if !defined(CONFIG_SUECREEK)
290+
#if defined(CONFIG_MEM_WND)
300291
platform_memory_windows_init();
301292
#endif
302293
trace_point(TRACE_BOOT_PLATFORM_SHIM);

0 commit comments

Comments
 (0)