Skip to content

Commit 350fc41

Browse files
tmlemanlgirdwood
authored andcommitted
zephyr: ipc: stop selecting deprecated INTEL_ADSP_IPC Kconfig
The INTEL_ADSP_IPC Kconfig is deprecated upstream (it now only selects DEPRECATED and will be removed). SOF still relied on it both as an explicit selection and as a compile guard, which blocks its removal in Zephyr. Replace every usage with the correct non-deprecated symbol: - old-interface calls (intel_adsp_ipc_set_done_handler used by ipc_platform_wait_ack) are guarded by INTEL_ADSP_IPC_OLD_INTERFACE, - Intel-backend-specific code (host IPC suspend/resume handlers and the failed power-transition response) is guarded by IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC, moving ipc-zephyr.c a step closer to being backend agnostic, - the backend header include is split from the old-interface header, - the redundant explicit INTEL_ADSP_IPC selections in the board defconfig and the ptl_sim overlay are dropped (OLD_INTERFACE already selects it by default). No functional change: on all Intel ADSP targets OLD_INTERFACE and the host IPC backend are enabled by default, so the same code paths build. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
1 parent 5ec09c6 commit 350fc41

5 files changed

Lines changed: 12 additions & 15 deletions

File tree

app/boards/intel_adsp/Kconfig.defconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ config DAI_INTEL_DMIC
114114
config DAI_INTEL_SSP
115115
default y
116116

117-
config INTEL_ADSP_IPC
118-
default y
119-
120117
config INTEL_ADSP_TIMER
121118
default y
122119

app/boards/intel_adsp_ace30_ptl_sim.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ CONFIG_SOF_LOG_LEVEL_INF=n
3535
CONFIG_SOF_LOG_LEVEL_OFF=y
3636
CONFIG_ZEPHYR_LOG=n
3737

38-
CONFIG_INTEL_ADSP_IPC=y
39-
4038

4139
# Temporary disabled options
4240
CONFIG_PM_DEVICE_RUNTIME=n

src/include/sof/ipc/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ int ipc_dai_data_config(struct dai_data *dd, struct comp_dev *dev);
173173
*/
174174
void ipc_boot_complete_msg(struct ipc_cmd_hdr *header, uint32_t data);
175175

176-
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_INTEL_ADSP_IPC)
176+
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC)
177177
/**
178178
* @brief Send an IPC response to Host power transition request informing
179179
* that power transition failed.
@@ -186,7 +186,7 @@ void ipc_boot_complete_msg(struct ipc_cmd_hdr *header, uint32_t data);
186186
* IPC task but during power transition logic in the Idle thread.
187187
*/
188188
void ipc_send_failed_power_transition_response(void);
189-
#endif /* CONFIG_PM_DEVICE && CONFIG_INTEL_ADSP_IPC */
189+
#endif /* CONFIG_PM_DEVICE && CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC */
190190
/**
191191
* \brief Send a IPC notification that FW has hit
192192
* a DSP notification.

src/ipc/ipc-zephyr.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313

1414
#include <zephyr/kernel.h>
1515
#include <zephyr/ipc/ipc_service.h>
16-
#ifdef CONFIG_INTEL_ADSP_IPC
16+
#ifdef CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC
1717
#include <zephyr/ipc/backends/intel_adsp_host_ipc.h>
18+
#endif
19+
#ifdef CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE
1820
#include <intel_adsp_ipc.h>
1921
#endif
2022

@@ -97,7 +99,7 @@ static void sof_ipc_receive_cb(const void *data, size_t len, void *priv)
9799
k_spin_unlock(&ipc->lock, key);
98100
}
99101

100-
#ifdef CONFIG_PM_DEVICE
102+
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC)
101103
/**
102104
* @brief IPC device suspend handler callback function.
103105
* Checks whether device power state should be actually changed.
@@ -179,7 +181,7 @@ static int ipc_device_resume_handler(const struct device *dev, void *arg)
179181
#endif
180182
return 0;
181183
}
182-
#endif /* CONFIG_PM_DEVICE */
184+
#endif /* CONFIG_PM_DEVICE && CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC */
183185

184186
#if CONFIG_DEBUG_IPC_COUNTERS
185187

@@ -328,7 +330,7 @@ int platform_ipc_init(struct ipc *ipc)
328330
if (ret < 0)
329331
return ret;
330332

331-
#if defined(CONFIG_PM) && defined(CONFIG_INTEL_ADSP_IPC)
333+
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC)
332334
intel_adsp_ipc_set_suspend_handler(INTEL_ADSP_IPC_HOST_DEV,
333335
ipc_device_suspend_handler, ipc);
334336
intel_adsp_ipc_set_resume_handler(INTEL_ADSP_IPC_HOST_DEV,
@@ -338,7 +340,7 @@ int platform_ipc_init(struct ipc *ipc)
338340
return 0;
339341
}
340342

341-
#ifdef CONFIG_INTEL_ADSP_IPC
343+
#ifdef CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE
342344
static bool ipc_wait_complete(const struct device *dev, void *arg)
343345
{
344346
k_sem_give(arg);
@@ -358,4 +360,4 @@ void ipc_platform_wait_ack(struct ipc *ipc)
358360

359361
intel_adsp_ipc_set_done_handler(INTEL_ADSP_IPC_HOST_DEV, NULL, NULL);
360362
}
361-
#endif /* CONFIG_INTEL_ADSP_IPC */
363+
#endif /* CONFIG_INTEL_ADSP_IPC_OLD_INTERFACE */

src/ipc/ipc4/handler-kernel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ __cold void ipc_boot_complete_msg(struct ipc_cmd_hdr *header, uint32_t data)
443443
header->ext = 0;
444444
}
445445

446-
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_INTEL_ADSP_IPC)
446+
#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC)
447447
__cold void ipc_send_failed_power_transition_response(void)
448448
{
449449
struct ipc4_message_request *request = ipc_from_hdr(&msg_data.msg_in);
@@ -461,7 +461,7 @@ __cold void ipc_send_failed_power_transition_response(void)
461461

462462
ipc_msg_send_direct(&msg_reply, NULL);
463463
}
464-
#endif /* defined(CONFIG_PM_DEVICE) && defined(CONFIG_INTEL_ADSP_IPC) */
464+
#endif /* defined(CONFIG_PM_DEVICE) && defined(CONFIG_IPC_SERVICE_BACKEND_INTEL_ADSP_HOST_IPC) */
465465

466466
__cold void ipc_send_panic_notification(void)
467467
{

0 commit comments

Comments
 (0)