Skip to content

Commit c4adc87

Browse files
authored
Merge pull request #442 from thesofproject/topic/suecreek
Add initial support for Intel S1000 aka Suecreek
2 parents 4dd67d5 + eded228 commit c4adc87

48 files changed

Lines changed: 4542 additions & 32 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.o
22
*.Po
3+
*.so*
34
*~
45
*.a
56
*.la

configure.ac

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,24 @@ case "$with_platform" in
296296
AC_DEFINE([CONFIG_IRQ_MAP], [1], [Configure IRQ maps])
297297
AC_DEFINE([CONFIG_DMA_GW], [1], [Configure DMA Gateway])
298298
;;
299+
suecreek*)
300+
301+
PLATFORM_LDSCRIPT="suecreek.x"
302+
AC_SUBST(PLATFORM_LDSCRIPT)
303+
304+
PLATFORM="suecreek"
305+
AC_SUBST(PLATFORM)
306+
307+
FW_NAME="sue"
308+
AC_SUBST(FW_NAME)
309+
310+
XTENSA_CORE="hifi4_std"
311+
AC_SUBST(XTENSA_CORE)
312+
313+
AC_DEFINE([CONFIG_SUECREEK], [1], [Configure for Suecreek])
314+
AC_DEFINE([CONFIG_BOOT_LOADER], [1], [Configure Boot Loader])
315+
AC_DEFINE([CONFIG_IRQ_MAP], [1], [Configure IRQ maps])
316+
;;
299317
icelake*)
300318

301319
PLATFORM_LDSCRIPT="icelake.x"
@@ -333,11 +351,12 @@ AM_CONDITIONAL(BUILD_HASWELL, test "$FW_NAME" = "hsw")
333351
AM_CONDITIONAL(BUILD_BROADWELL, test "$FW_NAME" = "bdw")
334352
AM_CONDITIONAL(BUILD_APOLLOLAKE, test "$FW_NAME" = "apl")
335353
AM_CONDITIONAL(BUILD_CANNONLAKE, test "$FW_NAME" = "cnl")
354+
AM_CONDITIONAL(BUILD_SUECREEK, test "$FW_NAME" = "sue")
336355
AM_CONDITIONAL(BUILD_ICELAKE, test "$FW_NAME" = "icl")
337-
AM_CONDITIONAL(BUILD_BOOTLOADER, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl")
338-
AM_CONDITIONAL(BUILD_CAVS, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl")
339-
AM_CONDITIONAL(BUILD_MODULE, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl")
340-
AM_CONDITIONAL(BUILD_APL_SSP, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl")
356+
AM_CONDITIONAL(BUILD_BOOTLOADER, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl" -o "$FW_NAME" = "sue")
357+
AM_CONDITIONAL(BUILD_CAVS, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl" -o "$FW_NAME" = "sue")
358+
AM_CONDITIONAL(BUILD_MODULE, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl" -o "$FW_NAME" = "sue")
359+
AM_CONDITIONAL(BUILD_APL_SSP, test "$FW_NAME" = "apl" -o "$FW_NAME" = "cnl" -o "$FW_NAME" = "icl" -o "$FW_NAME" = "sue")
341360

342361
# DSP core support (Optional)
343362
AC_ARG_WITH([dsp-core],
@@ -533,6 +552,12 @@ AC_CONFIG_FILES([
533552
src/platform/cannonlake/include/arch/xtensa/Makefile
534553
src/platform/cannonlake/include/arch/xtensa/config/Makefile
535554
src/platform/cannonlake/include/platform/Makefile
555+
src/platform/suecreek/Makefile
556+
src/platform/suecreek/include/Makefile
557+
src/platform/suecreek/include/arch/Makefile
558+
src/platform/suecreek/include/arch/xtensa/Makefile
559+
src/platform/suecreek/include/arch/xtensa/config/Makefile
560+
src/platform/suecreek/include/platform/Makefile
536561
src/platform/icelake/Makefile
537562
src/platform/icelake/include/Makefile
538563
src/platform/icelake/include/arch/Makefile

rimage/manifest.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,11 @@ static int man_write_fw_meu(struct image *image)
828828
#define CNL_DSP_IMR_BASE_ENTRY 0xb0038000
829829
#define CNL_DSP_HP_BASE_ENTRY 0xbe040000
830830

831+
#define ADSP_SUE_DSP_ROM_BASE 0xBEFE0000
832+
#define ADSP_SUE_DSP_ROM_SIZE 0x00002000
833+
#define SUE_DSP_IMR_BASE_ENTRY 0xb0038000
834+
#define SUE_DSP_HP_BASE_ENTRY 0xbe000000
835+
831836
#define ADSP_ICL_DSP_ROM_BASE 0xBEFE0000
832837
#define ADSP_ICL_DSP_ROM_SIZE 0x00002000
833838
#define ICL_DSP_IMR_BASE_ENTRY 0xb0038000
@@ -879,3 +884,19 @@ const struct adsp machine_icl = {
879884
.write_firmware_meu = man_write_fw_meu,
880885
.man = &cnl_manifest, // use the same as CNL
881886
};
887+
888+
const struct adsp machine_sue = {
889+
.name = "sue",
890+
.rom_base = ADSP_SUE_DSP_ROM_BASE,
891+
.rom_size = ADSP_SUE_DSP_ROM_SIZE,
892+
.imr_base = SUE_DSP_IMR_BASE_ENTRY,
893+
.imr_size = 0x100000,
894+
.sram_base = SUE_DSP_HP_BASE_ENTRY,
895+
.sram_size = 0x100000,
896+
.image_size = 0x100000,
897+
.dram_offset = 0,
898+
.machine_id = MACHINE_SUECREEK,
899+
.write_firmware = man_write_fw,
900+
.write_firmware_meu = man_write_fw_meu,
901+
.man = &cnl_manifest,
902+
};

rimage/rimage.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ static const struct adsp *machine[] = {
3232
&machine_apl,
3333
&machine_cnl,
3434
&machine_icl,
35+
&machine_sue,
3536
};
3637

3738
static void usage(char *name)

rimage/rimage.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ enum machine_id {
4141
MACHINE_APOLLOLAKE,
4242
MACHINE_CANNONLAKE,
4343
MACHINE_ICELAKE,
44+
MACHINE_SUECREEK,
4445
MACHINE_MAX
4546
};
4647

@@ -177,5 +178,6 @@ extern const struct adsp machine_bdw;
177178
extern const struct adsp machine_apl;
178179
extern const struct adsp machine_cnl;
179180
extern const struct adsp machine_icl;
181+
extern const struct adsp machine_sue;
180182

181183
#endif

scripts/xtensa-build-all.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl icl)
3+
SUPPORTED_PLATFORMS=(byt cht bdw hsw apl cnl sue icl)
44
if [ "$#" -eq 0 ]
55
then
66
PLATFORMS=${SUPPORTED_PLATFORMS[@]}
@@ -116,6 +116,14 @@ do
116116
HOST="xtensa-cnl-elf"
117117
XTENSA_TOOLS_VERSION="RF-2016.4-linux"
118118
fi
119+
if [ $j == "sue" ]
120+
then
121+
PLATFORM="suecreek"
122+
XTENSA_CORE="X6H3CNL_2016_4_linux"
123+
ROOT="$pwd/../xtensa-root/xtensa-cnl-elf"
124+
HOST="xtensa-cnl-elf"
125+
XTENSA_TOOLS_VERSION="RF-2016.4-linux"
126+
fi
119127
if [ $j == "icl" ]
120128
then
121129
PLATFORM="icelake"

src/arch/xtensa/boot_entry.S

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ l2_cache_pref:
6868
sof_stack_base:
6969
.word SOF_STACK_BASE
7070

71+
#if !defined CONFIG_SUECREEK
7172
wnd0_base:
7273
.word DMWBA(0)
7374

@@ -85,6 +86,7 @@ wnd0_status_address:
8586

8687
wnd0_error_address:
8788
.word HP_SRAM_WIN0_BASE | 0x4
89+
#endif
8890

8991
fw_loaded_status_value:
9092
.word 0x00000005
@@ -112,6 +114,7 @@ boot_init:
112114
l32r a3, sof_stack_base
113115
mov sp, a3
114116

117+
#if !defined CONFIG_SUECREEK
115118
/* set status register to 0x00000005 in wnd0 */
116119
l32r a3, fw_loaded_status_value
117120
l32r a5, wnd0_status_address
@@ -132,6 +135,7 @@ boot_init:
132135
l32r a5, wnd0_base_val
133136
s32i a5, a3, 0
134137
memw
138+
#endif
135139

136140
#if (XCHAL_DCACHE_IS_COHERENT || XCHAL_LOOP_BUFFER_SIZE) && \
137141
XCHAL_HW_MIN_VERSION >= XTENSA_HWVERSION_RE_2012_0

src/arch/xtensa/boot_loader.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
#include <platform/platform.h>
3737
#include <platform/memory.h>
3838

39+
#if defined CONFIG_SUECREEK
40+
#define MANIFEST_BASE BOOT_LDR_MANIFEST_BASE
41+
#else
42+
#define MANIFEST_BASE IMR_BOOT_LDR_MANIFEST_BASE
43+
#endif
44+
3945
/* entry point to main firmware */
4046
extern void _ResetVector(void);
4147

@@ -105,7 +111,7 @@ static void parse_module(struct sof_man_fw_header *hdr,
105111
static void parse_manifest(void)
106112
{
107113
struct sof_man_fw_desc *desc =
108-
(struct sof_man_fw_desc *)IMR_BOOT_LDR_MANIFEST_BASE;
114+
(struct sof_man_fw_desc *)MANIFEST_BASE;
109115
struct sof_man_fw_header *hdr = &desc->header;
110116
struct sof_man_module *mod;
111117
int i;
@@ -121,7 +127,8 @@ static void parse_manifest(void)
121127
#endif
122128

123129
/* power on HPSRAM */
124-
#if defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE)
130+
#if defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE) \
131+
|| defined(CONFIG_SUECREEK)
125132
static int32_t hp_sram_init(void)
126133
{
127134
int delay_count = 256;

src/arch/xtensa/smp/hal/Makefile.am

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,15 @@ PLATFORM_DEFS = \
204204
$(CACHE_DEFS)
205205
endif
206206

207+
if BUILD_SUECREEK
208+
PLATFORM_DEFS = \
209+
$(STATE_DEFS_CNL) \
210+
$(DISASS_DEFS) \
211+
$(MISC_DEFS) \
212+
$(INTERRUPTS_DEFS) \
213+
$(CACHE_DEFS)
214+
endif
215+
207216
noinst_LIBRARIES = libhal.a
208217

209218
libhal_a_SOURCES = \

src/arch/xtensa/smp/xtos/Makefile.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ noinst_LIBRARIES += libxlevel6.a
5858
VECTOR_DEFS += -D__SPLIT__level6
5959
endif
6060

61+
if BUILD_SUECREEK
62+
PLATFORM_DEFS = $(VECTOR_DEFS)
63+
noinst_LIBRARIES += libxlevel6.a
64+
VECTOR_DEFS += -D__SPLIT__level6
65+
endif
66+
6167
LEVEL_SRC = \
6268
int-handler.S \
6369
int-vector.S \

0 commit comments

Comments
 (0)