From f14c3e06f47b8147e806c5671e6079f9f46e6c91 Mon Sep 17 00:00:00 2001 From: Laurentiu Mihalcea Date: Tue, 16 Jan 2024 12:15:49 +0200 Subject: [PATCH] xtensa: nxp_adsp: common: Remove soc.c The soc.c interrupt-related definitions are supposed to provide support for multi-level interrupts. At the moment, the way the functions work is they only process the LEVEL 1 interrupt from the encoded INTID and treats the provided INTID as if it were simply a LEVEL 1 interrupt, which is wrong. Another issue with soc.c is the fact that the definitions from it clash with the ones provided by the IRQSTEER driver. To fix this, remove the soc.c file altogether and change the corresponding CMakeLists.txt to only contain the necessary statements. Signed-off-by: Laurentiu Mihalcea --- soc/xtensa/nxp_adsp/common/CMakeLists.txt | 12 ------ soc/xtensa/nxp_adsp/common/soc.c | 47 ----------------------- 2 files changed, 59 deletions(-) delete mode 100644 soc/xtensa/nxp_adsp/common/soc.c diff --git a/soc/xtensa/nxp_adsp/common/CMakeLists.txt b/soc/xtensa/nxp_adsp/common/CMakeLists.txt index 02c2ef503e3..5c53c771f08 100644 --- a/soc/xtensa/nxp_adsp/common/CMakeLists.txt +++ b/soc/xtensa/nxp_adsp/common/CMakeLists.txt @@ -4,15 +4,3 @@ # SPDX-License-Identifier: Apache-2.0 zephyr_include_directories(include) - -zephyr_interface_library_named(NXP_ADSP_COMMON) - -zephyr_library_named(nxp_adsp_common) -zephyr_library_include_directories(${ZEPHYR_BASE}/drivers) - -zephyr_library_sources(soc.c) - -zephyr_library_link_libraries(NXP_ADSP_COMMON) - -target_include_directories(NXP_ADSP_COMMON INTERFACE include) -target_link_libraries(NXP_ADSP_COMMON INTERFACE nxp_adsp_common) diff --git a/soc/xtensa/nxp_adsp/common/soc.c b/soc/xtensa/nxp_adsp/common/soc.c deleted file mode 100644 index 903dd8e7805..00000000000 --- a/soc/xtensa/nxp_adsp/common/soc.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2021 NXP - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include -#include -#include -#include - -#include "soc.h" - -#ifdef CONFIG_DYNAMIC_INTERRUPTS -#include -#endif -#define LOG_LEVEL CONFIG_SOC_LOG_LEVEL -#include -LOG_MODULE_REGISTER(soc); - -void z_soc_irq_enable(uint32_t irq) -{ - /* - * enable core interrupt - */ - xtensa_irq_enable(XTENSA_IRQ_NUMBER(irq)); -} - -void z_soc_irq_disable(uint32_t irq) -{ - /* - * disable the interrupt in interrupt controller - */ - xtensa_irq_disable(XTENSA_IRQ_NUMBER(irq)); -} - -int z_soc_irq_is_enabled(unsigned int irq) -{ - int ret = 0; - - /* regular interrupt */ - ret = xtensa_irq_is_enabled(XTENSA_IRQ_NUMBER(irq)); - - return ret; -}