From aede424970d7202b6cd9f9220dd7419b0aaf6bb4 Mon Sep 17 00:00:00 2001 From: Sameer Pujar Date: Thu, 5 Mar 2020 10:42:53 +0530 Subject: [PATCH] ASoC: tegra-alt: remove XBAR utils source file As part of upstream alignment all drivers are moved to "tegra" path and "utils/tegra210_xbar_utils_alt.c" is no more used now. Hence this patch removes this source file. The helper functions are already moved to AHUB driver. Currently there are other files related to ISO BW manager, ADSP audio and FPGA in "tegra-alt" path. These will be cleaned up in subsequent patches. Bug 2845498 Change-Id: Iee52eb71bbc3c1996ea75777d3806ef76652848c Signed-off-by: Sameer Pujar Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.4/+/2307646 Reviewed-by: automaticguardword Reviewed-by: Mohan Kumar D Reviewed-by: Sharad Gupta Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- .../tegra-alt/utils/tegra210_xbar_utils_alt.c | 104 ------------------ 1 file changed, 104 deletions(-) delete mode 100644 sound/soc/tegra-alt/utils/tegra210_xbar_utils_alt.c diff --git a/sound/soc/tegra-alt/utils/tegra210_xbar_utils_alt.c b/sound/soc/tegra-alt/utils/tegra210_xbar_utils_alt.c deleted file mode 100644 index 44cdb306..00000000 --- a/sound/soc/tegra-alt/utils/tegra210_xbar_utils_alt.c +++ /dev/null @@ -1,104 +0,0 @@ -/* - * tegra210_xbar_utils_alt.c - Tegra XBAR driver utils - * - * Copyright (c) 2017-2019 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, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "tegra210_xbar_alt.h" - -void tegra210_xbar_set_cif(struct regmap *regmap, unsigned int reg, - struct tegra210_xbar_cif_conf *conf) -{ - unsigned int value; - - value = (conf->threshold << - TEGRA210_AUDIOCIF_CTRL_FIFO_THRESHOLD_SHIFT) | - ((conf->audio_channels - 1) << - TEGRA210_AUDIOCIF_CTRL_AUDIO_CHANNELS_SHIFT) | - ((conf->client_channels - 1) << - TEGRA210_AUDIOCIF_CTRL_CLIENT_CHANNELS_SHIFT) | - (conf->audio_bits << - TEGRA210_AUDIOCIF_CTRL_AUDIO_BITS_SHIFT) | - (conf->client_bits << - TEGRA210_AUDIOCIF_CTRL_CLIENT_BITS_SHIFT) | - (conf->expand << - TEGRA210_AUDIOCIF_CTRL_EXPAND_SHIFT) | - (conf->stereo_conv << - TEGRA210_AUDIOCIF_CTRL_STEREO_CONV_SHIFT) | - (conf->replicate << - TEGRA210_AUDIOCIF_CTRL_REPLICATE_SHIFT) | - (conf->truncate << - TEGRA210_AUDIOCIF_CTRL_TRUNCATE_SHIFT) | - (conf->mono_conv << - TEGRA210_AUDIOCIF_CTRL_MONO_CONV_SHIFT); - - regmap_update_bits(regmap, reg, 0x3fffffff, value); -} -EXPORT_SYMBOL_GPL(tegra210_xbar_set_cif); - -void tegra210_xbar_write_ahubram(struct regmap *regmap, unsigned int reg_ctrl, - unsigned int reg_data, unsigned int ram_offset, - unsigned int *data, size_t size) -{ - unsigned int val = 0; - int i = 0; - - val = ram_offset & TEGRA210_AHUBRAMCTL_CTRL_RAM_ADDR_MASK; - val |= TEGRA210_AHUBRAMCTL_CTRL_ADDR_INIT_EN; - val |= TEGRA210_AHUBRAMCTL_CTRL_SEQ_ACCESS_EN; - val |= TEGRA210_AHUBRAMCTL_CTRL_RW_WRITE; - - regmap_write(regmap, reg_ctrl, val); - for (i = 0; i < size; i++) - regmap_write(regmap, reg_data, data[i]); - - return; -} -EXPORT_SYMBOL_GPL(tegra210_xbar_write_ahubram); - -void tegra210_xbar_read_ahubram(struct regmap *regmap, unsigned int reg_ctrl, - unsigned int reg_data, unsigned int ram_offset, - unsigned int *data, size_t size) -{ - unsigned int val = 0; - int i = 0; - - val = ram_offset & TEGRA210_AHUBRAMCTL_CTRL_RAM_ADDR_MASK; - val |= TEGRA210_AHUBRAMCTL_CTRL_ADDR_INIT_EN; - val |= TEGRA210_AHUBRAMCTL_CTRL_SEQ_ACCESS_EN; - val |= TEGRA210_AHUBRAMCTL_CTRL_RW_READ; - - regmap_write(regmap, reg_ctrl, val); - /* Since all ahub non-io modules work under same ahub clock it is not - necessary to check ahub read busy bit after every read */ - for (i = 0; i < size; i++) - regmap_read(regmap, reg_data, &data[i]); - - return; -} -EXPORT_SYMBOL_GPL(tegra210_xbar_read_ahubram); - -MODULE_LICENSE("GPL");