Skip to content

Commit

Permalink
soc: nxp_adsp: Prepare Kconfig files for RT595 ADSP
Browse files Browse the repository at this point in the history
Refactor Kconfig files to prepare for RT595 ADSP:
- consolidate common config parameters in top level Kconfig.defconfig
- remove config parameters that are set to default (SMP, KERNEL_ENTRY,
  MULTI_LEVEL_INTERRUPTS, 2ND_LEVEL_INTERRUPTS)

Signed-off-by: Dmitry Lukyantsev <dmitrylu@google.com>
  • Loading branch information
Dmitry Lukyantsev committed Aug 10, 2023
1 parent 352ece1 commit e7079a1
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 59 deletions.
26 changes: 14 additions & 12 deletions soc/xtensa/nxp_adsp/CMakeLists.txt
@@ -1,20 +1,22 @@
# NXP i.MX8 SoC family CMake file
# NXP i.MX8/RT SoC family CMake file
#
# Copyright (c) 2021 NXP
# SPDX-License-Identifier: Apache-2.0

add_subdirectory(common)

# west sign
if(CONFIG_NXP_ADSP_SIGN_IMAGE)
# west sign

# See detailed comments in soc/xtensa/intel_adsp/common/CMakeLists.txt
add_custom_target(zephyr.ri ALL
DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
)
# See detailed comments in soc/xtensa/intel_adsp/common/CMakeLists.txt
add_custom_target(zephyr.ri ALL
DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
)

add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
COMMENT "west sign --if-tool-available --tool rimage ..."
COMMAND west sign --if-tool-available --tool rimage --build-dir ${CMAKE_BINARY_DIR} ${WEST_SIGN_OPTS}
DEPENDS ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}
)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
COMMENT "west sign --if-tool-available --tool rimage ..."
COMMAND west sign --if-tool-available --tool rimage --build-dir ${CMAKE_BINARY_DIR} ${WEST_SIGN_OPTS}
DEPENDS ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}
)
endif()
6 changes: 5 additions & 1 deletion soc/xtensa/nxp_adsp/Kconfig
@@ -1,4 +1,4 @@
# NXP i.MX8 SoC family configuration options
# NXP i.MX8/RT SoC family configuration options
#
# Copyright (c) 2021 NXP
# SPDX-License-Identifier: Apache-2.0
Expand All @@ -14,6 +14,10 @@ config SOC_FAMILY
string
default "nxp_adsp"

config NXP_ADSP_SIGN_IMAGE
bool "Sign DSP image with rimage"
default y

# Select SoC Part No. and configuration options
source "soc/xtensa/nxp_adsp/*/Kconfig.soc"

Expand Down
12 changes: 10 additions & 2 deletions soc/xtensa/nxp_adsp/Kconfig.defconfig
@@ -1,9 +1,17 @@
# NXP i.MX8 SoC family default configuration options
# NXP i.MX8/RT SoC family default configuration options
#
# Copyright (c) 2021 NXP
# SPDX-License-Identifier: Apache-2.0

source "soc/xtensa/nxp_adsp/*/Kconfig.defconfig.series"

config CACHE_MANAGEMENT
def_bool y
default y

config XTENSA_TIMER
default y

# To prevent test uses TEST_LOGGING_MINIMAL
config TEST_LOGGING_DEFAULTS
default n
depends on TEST
20 changes: 0 additions & 20 deletions soc/xtensa/nxp_adsp/imx8/Kconfig.defconfig.series
Expand Up @@ -15,36 +15,16 @@ config SOC
string
default "nxp_imx8"

config SMP
default n

config XTENSA_TIMER
default y

config SYS_CLOCK_HW_CYCLES_PER_SEC
default 666000000 if XTENSA_TIMER

config SYS_CLOCK_TICKS_PER_SEC
default 50000

config KERNEL_ENTRY
default "__start"

config MULTI_LEVEL_INTERRUPTS
default n

config 2ND_LEVEL_INTERRUPTS
default n

config DYNAMIC_INTERRUPTS
default y

config LOG
default y

# To prevent test uses TEST_LOGGING_MINIMAL
config TEST_LOGGING_DEFAULTS
default n
depends on TEST

endif # SOC_SERIES_NXP_IMX8
24 changes: 0 additions & 24 deletions soc/xtensa/nxp_adsp/imx8m/Kconfig.defconfig.series
Expand Up @@ -11,44 +11,20 @@ config SOC_TOOLCHAIN_NAME
string
default "nxp_imx8m_adsp"

# if SOC_MIMX8M_ADSP

config SOC
string
default "mimx8ml8"

config SMP
default n

config XTENSA_TIMER
default y

config SYS_CLOCK_HW_CYCLES_PER_SEC
default 800000000 if XTENSA_TIMER

config SYS_CLOCK_TICKS_PER_SEC
default 50000

config KERNEL_ENTRY
default "__start"

config MULTI_LEVEL_INTERRUPTS
default n

config 2ND_LEVEL_INTERRUPTS
default n

config DYNAMIC_INTERRUPTS
default y

config LOG
default y

# To prevent test uses TEST_LOGGING_MINIMAL
config TEST_LOGGING_DEFAULTS
default n
depends on TEST

# endif # SOC_MIMX8M_ADSP

endif # SOC_SERIES_NXP_IMX8M

0 comments on commit e7079a1

Please sign in to comment.