From e2e48eebb67a980330514201a18cecde66024bca Mon Sep 17 00:00:00 2001 From: Mohan Kumar Date: Mon, 20 Mar 2023 22:57:35 +0530 Subject: [PATCH] ASoC: tegra: Migrate to upstream ICC Migrate the ahub bandwidth management driver to align with upstream ICC apis. Bug 3997304 Change-Id: Ifaf25030b8cc4f467cdc737e034e0215413acf38 Signed-off-by: Mohan Kumar Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2873866 Reviewed-by: svcacv Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-cert Reviewed-by: Sumit Gupta Reviewed-by: Sharad Gupta GVS: Gerrit_Virtual_Submit --- sound/soc/tegra/tegra_isomgr_bw.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sound/soc/tegra/tegra_isomgr_bw.c b/sound/soc/tegra/tegra_isomgr_bw.c index c9fbe76e..514882e6 100644 --- a/sound/soc/tegra/tegra_isomgr_bw.c +++ b/sound/soc/tegra/tegra_isomgr_bw.c @@ -1,7 +1,7 @@ /* * tegra_isomgr_bw.c - ADMA bandwidth calculation * - * Copyright (c) 2016-2021 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2023 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -21,7 +21,6 @@ #include #include "tegra_isomgr_bw.h" #include -#include #define MAX_BW 393216 /*Maximum KiloByte*/ #define MAX_DEV_NUM 256 @@ -88,8 +87,7 @@ void tegra_isomgr_adma_setbw(struct snd_pcm_substream *substream, } if (adma->icc_path_handle) - icc_set_bw(adma->icc_path_handle, adma->current_bandwidth, - adma->current_bandwidth); + icc_set_bw(adma->icc_path_handle, adma->current_bandwidth, MAX_BW); } EXPORT_SYMBOL(tegra_isomgr_adma_setbw); @@ -108,9 +106,7 @@ void tegra_isomgr_adma_register(struct device *dev) mutex_init(&adma->mutex); - adma->icc_path_handle = icc_get(dev, TEGRA_ICC_APEDMA, - TEGRA_ICC_PRIMARY); - + adma->icc_path_handle = devm_of_icc_get(dev, "write"); if (IS_ERR(adma->icc_path_handle)) { pr_err("%s: Failed to register Interconnect. err=%ld\n", __func__, PTR_ERR(adma->icc_path_handle));