From cb77aa26927b485f871f8e84e8572536411a37c0 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 21 Nov 2024 21:44:20 +0200 Subject: [PATCH] drivers: intel: remove remaining references to MN driver The Zephyr SSP driver has had dependency to CONFIG_INTEL_NM defined in SOF, so this has not been removed before. This is now cleaned up on Zephyr side, so we can proceed to remove the remaining bits of the Intel MN driver on SOF side. Signed-off-by: Kai Vehmanen --- src/drivers/Kconfig | 2 - src/drivers/intel/Kconfig | 10 ----- src/include/sof/drivers/mn.h | 87 ------------------------------------ src/platform/Kconfig | 1 - 4 files changed, 100 deletions(-) delete mode 100644 src/drivers/intel/Kconfig delete mode 100644 src/include/sof/drivers/mn.h diff --git a/src/drivers/Kconfig b/src/drivers/Kconfig index ad3be8d1a564..43fdc40023cd 100644 --- a/src/drivers/Kconfig +++ b/src/drivers/Kconfig @@ -2,8 +2,6 @@ menu "Drivers" -rsource "intel/Kconfig" - rsource "dw/Kconfig" rsource "imx/Kconfig" diff --git a/src/drivers/intel/Kconfig b/src/drivers/intel/Kconfig deleted file mode 100644 index b7e465758ec2..000000000000 --- a/src/drivers/intel/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause - -# TODO: to be removed once Zephyr SSP driver has been updated -# not to depend on this -config INTEL_MN - bool - depends on CAVS - default n - help - Select this if the platform supports M/N dividers. diff --git a/src/include/sof/drivers/mn.h b/src/include/sof/drivers/mn.h deleted file mode 100644 index 004d907bfad9..000000000000 --- a/src/include/sof/drivers/mn.h +++ /dev/null @@ -1,87 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * - * Copyright(c) 2020 Intel Corporation. All rights reserved. - * - * Author: Janusz Jankowski - */ - -#ifndef __SOF_DRIVERS_MN_H__ -#define __SOF_DRIVERS_MN_H__ - -#include -#include - -#include -#include - -/** - * \brief Initializes MN driver. - */ -void mn_init(struct sof *sof); - -/** - * \brief Finds and sets valid combination of MCLK source and divider to - * achieve requested MCLK rate. - * User should release clock when it is no longer needed to allow - * driver to change MCLK M/N source when user count drops to 0. - * M value of M/N is not supported for MCLK, only divider can be used. - * \param[in] mclk_id id of main clock for which rate should be set. - * \param[in] mclk_rate main clock frequency. - * \return 0 on success otherwise a negative error code. - */ -int mn_set_mclk(uint16_t mclk_id, uint32_t mclk_rate); - -/** - * \brief set mclk according to blob setting - * \param[in] mdivc mclk control setting. - * \param[in] mdivr mclk divider setting. - * \return 0 on success otherwise a negative error code. - */ -int mn_set_mclk_blob(uint32_t mdivc, uint32_t mdivr); - -/** - * \brief Release previously requested MCLK for given MCLK ID. - * \param[in] mclk_id id of main clock. - */ -void mn_release_mclk(uint32_t mclk_id); - -#if CONFIG_INTEL_MN -/** - * \brief Finds and sets valid combination of BCLK source and M/N to - * achieve requested BCLK rate. - * User should release clock when it is no longer needed to allow - * driver to change M/N source when user count drops to 0. - * \param[in] dai_index DAI index (SSP port). - * \param[in] bclk_rate Bit clock frequency. - * \param[out] out_scr_div SCR divisor that should be set by caller to achieve - * requested BCLK rate. - * \param[out] out_need_ecs If set to true, the caller should configure ECS. - * \return 0 on success otherwise a negative error code. - * \see mn_release_bclk() - */ -int mn_set_bclk(uint32_t dai_index, uint32_t bclk_rate, - uint32_t *out_scr_div, bool *out_need_ecs); - -/** - * \brief Release previously requested BCLK for given DAI. - * \param[in] dai_index DAI index (SSP port). - */ -void mn_release_bclk(uint32_t dai_index); - -/** - * \brief Resets M & N values of M/N divider for given DAI index. - * \param[in] dai_index DAI index (SSP port). - */ -void mn_reset_bclk_divider(uint32_t dai_index); -#endif - -/** - * \brief Retrieves M/N dividers structure. - * \return Pointer to M/N dividers structure. - */ -static inline struct mn *mn_get(void) -{ - return sof_get()->mn; -} - -#endif /* __SOF_DRIVERS_MN_H__ */ diff --git a/src/platform/Kconfig b/src/platform/Kconfig index 68633616a7d8..24017f98f688 100644 --- a/src/platform/Kconfig +++ b/src/platform/Kconfig @@ -341,7 +341,6 @@ config CAVS select INTEL select XT_INTERRUPT_LEVEL_2 select XT_INTERRUPT_LEVEL_5 - select INTEL_MN select WAKEUP_HOOK select SCHEDULE_DMA_SINGLE_CHANNEL