Skip to content

Commit 009cd7c

Browse files
dbalutalgirdwood
authored andcommitted
reset: xtos: Introduce HAVE_RESET_VECTOR_ROM config option
Apollolake+/i.MX have reset vector in ROM. So far we have used platform config symbols to tell which platforms have the reset vector in ROM. Anyhow, things are starting to get ugly here with more platforms to come so we add an internal config symbol which will be set by each each platform when needed. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
1 parent 92fc706 commit 009cd7c

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ config BOOT_LOADER
4040
bool
4141
default n
4242

43+
config HAVE_RESET_VECTOR_ROM
44+
bool
45+
default n
46+
help
47+
Select if your platform has the reset vector
48+
in ROM.
49+
4350
config IRQ_MAP
4451
bool
4552
default n

src/arch/xtensa/up/xtos/reset-vector.S

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,7 @@ _ResetVector:
8383
#endif
8484
#endif
8585

86-
/* Apollolake+ have reset vector in ROM */
87-
#if defined(CONFIG_BAYTRAIL) || defined(CONFIG_CHERRYTRAIL) \
88-
|| defined (CONFIG_HASWELL) || defined(CONFIG_BROADWELL) \
89-
|| defined(CONFIG_SKYLAKE) || defined(CONFIG_KABYLAKE) \
90-
|| defined(CONFIG_IMX8)
86+
#if defined(CONFIG_HAVE_RESET_VECTOR_ROM)
9187
j _ResetHandler
9288
#else
9389

src/platform/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ config BAYTRAIL
1313
select DMA_SUSPEND_DRAIN
1414
select DMA_FIFO_PARTITION
1515
select DW_DMA
16+
select HAVE_RESET_VECTOR_ROM
1617
help
1718
Select if your target platform is Baytrail-compatible
1819

@@ -25,6 +26,7 @@ config CHERRYTRAIL
2526
select DMA_SUSPEND_DRAIN
2627
select DMA_FIFO_PARTITION
2728
select DW_DMA
29+
select HAVE_RESET_VECTOR_ROM
2830
help
2931
Select if your target platform is Cherrytrail-compatible
3032

@@ -34,6 +36,7 @@ config HASWELL
3436
select TASK_HAVE_PRIORITY_LOW
3537
select DMA_AGGREGATED_IRQ
3638
select DW_DMA
39+
select HAVE_RESET_VECTOR_ROM
3740
help
3841
Select if your target platform is Haswell-compatible
3942

@@ -43,6 +46,7 @@ config BROADWELL
4346
select TASK_HAVE_PRIORITY_LOW
4447
select DMA_AGGREGATED_IRQ
4548
select DW_DMA
49+
select HAVE_RESET_VECTOR_ROM
4650
help
4751
Select if your target platform is Broadwell-compatible
4852

@@ -124,6 +128,7 @@ config LIBRARY
124128

125129
config IMX8
126130
bool "Build for NXP i.MX8"
131+
select HAVE_RESET_VECTOR_ROM
127132
help
128133
Select if your target platform is imx8-compatible
129134

0 commit comments

Comments
 (0)