From 537b0b321cffeba63d2392f5f4f048c501d99759 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Mon, 15 Apr 2024 15:42:22 +0300 Subject: [PATCH] platform: remove platform/drivers/idc.h for Intel platforms For Zephyr builds, only definition needed from platform/drivers/idc.h was prototype for idc_send_msg(). There's no need to keep the platform layer just for this, so add the definition to rtos/idc.h for Zephyr builds, and remove the platform/drivers/idc.h for all Intel platforms. Signed-off-by: Kai Vehmanen --- .../intel/ace/include/ace/drivers/idc.h | 25 ------------ .../intel/cavs/include/cavs/drivers/idc.h | 39 ------------------- .../lunarlake/include/platform/drivers/idc.h | 19 --------- .../meteorlake/include/platform/drivers/idc.h | 19 --------- .../tigerlake/include/platform/drivers/idc.h | 21 ---------- zephyr/include/rtos/idc.h | 5 ++- 6 files changed, 4 insertions(+), 124 deletions(-) delete mode 100644 src/platform/intel/ace/include/ace/drivers/idc.h delete mode 100644 src/platform/intel/cavs/include/cavs/drivers/idc.h delete mode 100644 src/platform/lunarlake/include/platform/drivers/idc.h delete mode 100644 src/platform/meteorlake/include/platform/drivers/idc.h delete mode 100644 src/platform/tigerlake/include/platform/drivers/idc.h diff --git a/src/platform/intel/ace/include/ace/drivers/idc.h b/src/platform/intel/ace/include/ace/drivers/idc.h deleted file mode 100644 index a62bda4f82be..000000000000 --- a/src/platform/intel/ace/include/ace/drivers/idc.h +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2022 Intel Corporation. All rights reserved. - */ - -#ifdef __PLATFORM_DRIVERS_IDC_H__ - -#ifndef __ACE_DRIVERS_IDC_H__ -#define __ACE_DRIVERS_IDC_H__ - -#include - -struct idc_msg; - -int idc_send_msg(struct idc_msg *msg, uint32_t mode); - -int idc_init(void); - -#endif /* __ACE_DRIVERS_IDC_H__ */ - -#else - -#error "This file shouldn't be included from outside of platform/drivers/idc.h" - -#endif /* __PLATFORM_DRIVERS_IDC_H__ */ diff --git a/src/platform/intel/cavs/include/cavs/drivers/idc.h b/src/platform/intel/cavs/include/cavs/drivers/idc.h deleted file mode 100644 index 11d30d7f446b..000000000000 --- a/src/platform/intel/cavs/include/cavs/drivers/idc.h +++ /dev/null @@ -1,39 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2018 Intel Corporation. All rights reserved. - * - * Author: Tomasz Lauda - */ - -#ifdef __PLATFORM_DRIVERS_IDC_H__ - -#ifndef __CAVS_DRIVERS_IDC_H__ -#define __CAVS_DRIVERS_IDC_H__ - -#include - -struct idc_msg; - -#if CONFIG_MULTICORE - -int idc_send_msg(struct idc_msg *msg, uint32_t mode); - -int idc_init(void); - -int idc_restore(void); - -#else - -static inline int idc_send_msg(struct idc_msg *msg, uint32_t mode) { return 0; } - -static inline int idc_init(void) { return 0; } - -#endif - -#endif /* __CAVS_DRIVERS_IDC_H__ */ - -#else - -#error "This file shouldn't be included from outside of platform/drivers/idc.h" - -#endif /* __PLATFORM_DRIVERS_IDC_H__ */ diff --git a/src/platform/lunarlake/include/platform/drivers/idc.h b/src/platform/lunarlake/include/platform/drivers/idc.h deleted file mode 100644 index 4d3859729f14..000000000000 --- a/src/platform/lunarlake/include/platform/drivers/idc.h +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2023 Intel Corporation. All rights reserved. - */ - -#if defined(__XTOS_RTOS_IDC_H__) || defined(__ZEPHYR_RTOS_IDC_H__) - -#ifndef __PLATFORM_DRIVERS_IDC_H__ -#define __PLATFORM_DRIVERS_IDC_H__ - -#include - -#endif /* __PLATFORM_DRIVERS_IDC_H__ */ - -#else - -#error "This file shouldn't be included from outside of Zephyr/XTOS's rtos/idc.h" - -#endif diff --git a/src/platform/meteorlake/include/platform/drivers/idc.h b/src/platform/meteorlake/include/platform/drivers/idc.h deleted file mode 100644 index e63bfb0997f9..000000000000 --- a/src/platform/meteorlake/include/platform/drivers/idc.h +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2022 Intel Corporation. All rights reserved. - */ - -#if defined(__XTOS_RTOS_IDC_H__) || defined(__ZEPHYR_RTOS_IDC_H__) - -#ifndef __PLATFORM_DRIVERS_IDC_H__ -#define __PLATFORM_DRIVERS_IDC_H__ - -#include - -#endif /* __PLATFORM_DRIVERS_IDC_H__ */ - -#else - -#error "This file shouldn't be included from outside of Zephyr/XTOS's rtos/idc.h" - -#endif diff --git a/src/platform/tigerlake/include/platform/drivers/idc.h b/src/platform/tigerlake/include/platform/drivers/idc.h deleted file mode 100644 index 49d7e60f2cc4..000000000000 --- a/src/platform/tigerlake/include/platform/drivers/idc.h +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2018 Intel Corporation. All rights reserved. - * - * Author: Tomasz Lauda - */ - -#if defined(__XTOS_RTOS_IDC_H__) || defined(__ZEPHYR_RTOS_IDC_H__) - -#ifndef __PLATFORM_DRIVERS_IDC_H__ -#define __PLATFORM_DRIVERS_IDC_H__ - -#include - -#endif /* __PLATFORM_DRIVERS_IDC_H__ */ - -#else - -#error "This file shouldn't be included from outside of Zephyr/XTOS's rtos/idc.h" - -#endif diff --git a/zephyr/include/rtos/idc.h b/zephyr/include/rtos/idc.h index 30a4069f8863..178048eb0cbd 100644 --- a/zephyr/include/rtos/idc.h +++ b/zephyr/include/rtos/idc.h @@ -14,7 +14,6 @@ #ifndef __ZEPHYR_RTOS_IDC_H__ #define __ZEPHYR_RTOS_IDC_H__ -#include #include #include #include @@ -199,8 +198,12 @@ int idc_wait_in_blocking_mode(uint32_t target_core, bool (*cond)(int)); int idc_msg_status_get(uint32_t core); +int idc_init(void); + void idc_init_thread(void); +int idc_send_msg(struct idc_msg *msg, uint32_t mode); + struct idc **idc_get(void); #endif /* __ZEPHYR_RTOS_IDC_H__ */