Skip to content

Commit b971739

Browse files
authored
Merge pull request #493 from mmaka1/cfg-mem-wnd
Cfg mem wnd
2 parents 3fcdb15 + 62f6742 commit b971739

2 files changed

Lines changed: 11 additions & 25 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 & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@
5858
#include <string.h>
5959
#include <version.h>
6060

61-
#if defined(CONFIG_APOLLOLAKE)
62-
#define SSP_CLOCK_FREQUENCY 19200000
63-
#elif defined(CONFIG_CANNONLAKE) || defined(CONFIG_SUECREEK)
64-
#define SSP_CLOCK_FREQUENCY 24000000
65-
#elif defined(CONFIG_ICELAKE)
66-
#define SSP_CLOCK_FREQUENCY 38400000
67-
#endif
68-
6961
static const struct sof_ipc_fw_ready ready = {
7062
.hdr = {
7163
.cmd = SOF_IPC_FW_READY,
@@ -82,7 +74,7 @@ static const struct sof_ipc_fw_ready ready = {
8274
},
8375
};
8476

85-
#if !defined(CONFIG_SUECREEK)
77+
#if defined(CONFIG_MEM_WND)
8678
#define SRAM_WINDOW_HOST_OFFSET(x) (0x80000 + x * 0x20000)
8779

8880
#define NUM_WINDOWS 7
@@ -202,39 +194,30 @@ struct work_queue_timesource platform_generic_queue[] = {
202194
struct timer *platform_timer =
203195
&platform_generic_queue[PLATFORM_MASTER_CORE_ID].timer;
204196

205-
#if defined(CONFIG_SUECREEK)
206-
int platform_boot_complete(uint32_t boot_message)
207-
{
208-
mailbox_dspbox_write(0, &ready, sizeof(ready));
209-
return 0;
210-
}
211-
212-
#else
213-
214197
int platform_boot_complete(uint32_t boot_message)
215198
{
216199
mailbox_dspbox_write(0, &ready, sizeof(ready));
200+
#if defined(CONFIG_MEM_WND)
217201
mailbox_dspbox_write(sizeof(ready), &sram_window,
218202
sram_window.ext_hdr.hdr.size);
203+
#endif // defined(CONFIG_MEM_WND)
219204

220-
#if defined(CONFIG_APOLLOLAKE)
205+
#if defined(CONFIG_APOLLOLAKE)
221206
/* boot now complete so we can relax the CPU */
222207
clock_set_freq(CLK_CPU(cpu_get_id()), CLK_DEFAULT_CPU_HZ);
223208

224209
/* tell host we are ready */
225210
ipc_write(IPC_DIPCIE, SRAM_WINDOW_HOST_OFFSET(0) >> 12);
226211
ipc_write(IPC_DIPCI, 0x80000000 | SOF_IPC_FW_READY);
227-
#elif defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE)
212+
#elif defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE)
228213
/* tell host we are ready */
229214
ipc_write(IPC_DIPCIDD, SRAM_WINDOW_HOST_OFFSET(0) >> 12);
230215
ipc_write(IPC_DIPCIDR, 0x80000000 | SOF_IPC_FW_READY);
231-
#endif
232-
216+
#endif
233217
return 0;
234218
}
235-
#endif
236219

237-
#if !defined(CONFIG_SUECREEK)
220+
#if defined(CONFIG_MEM_WND)
238221
static void platform_memory_windows_init(void)
239222
{
240223
/* window0, for fw status & outbox/uplink mbox */
@@ -304,7 +287,7 @@ int platform_init(struct sof *sof)
304287

305288
trace_point(TRACE_BOOT_PLATFORM_MBOX);
306289

307-
#if !defined(CONFIG_SUECREEK)
290+
#if defined(CONFIG_MEM_WND)
308291
platform_memory_windows_init();
309292
#endif
310293
trace_point(TRACE_BOOT_PLATFORM_SHIM);

0 commit comments

Comments
 (0)