From 26e357d588ed90f3108e8b85b94db61d186d014f Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Wed, 20 Dec 2023 15:07:42 +0000 Subject: [PATCH] misc: mods: Drop DMAENGINE slave_id support Only Tegra234+ devices are currently supported and for these devices the only DMA drivers that are supported for Linux are the Tegra210 ADMA and Tegra186 GPCDMA drivers. Neither of these drivers ever supported the 'slave_id' parameter for configuring the DMA request ID for a given channel. These drivers have always used device-tree to retrieve this information. Only the Tegra20 APBDMA controller supported the 'slave_id' field and this was dropped in Linux v5.17. The Tegra20 APBDMA driver was supported in Tegra devices up until Tegra210, but starting with Tegra186 it is no longer supported. Given that this is a legacy feature only supported for legacy Tegra devices and drivers, drop the 'slave_id' support completely. Bug 4425688 Change-Id: Id9bb6440805826dfb0cf0d862d6b15fd856e61ff Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038964 (cherry picked from commit c87f90c7b8bce6fb13ae0f9658be0407cd7b3107) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3058562 Reviewed-by: svcacv Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit --- drivers/misc/mods/mods_dma.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/misc/mods/mods_dma.c b/drivers/misc/mods/mods_dma.c index 08f68b4a..113422bc 100644 --- a/drivers/misc/mods/mods_dma.c +++ b/drivers/misc/mods/mods_dma.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -/* SPDX-FileCopyrightText: Copyright (c) 2017-2023, NVIDIA CORPORATION. All rights reserved. */ +/* SPDX-FileCopyrightText: Copyright (c) 2017-2024, NVIDIA CORPORATION. All rights reserved. */ #include #include @@ -279,9 +279,6 @@ int esc_mods_dma_set_config(struct mods_client *client, config.src_maxburst = p_config->src_maxburst; config.dst_maxburst = p_config->dst_maxburst; config.device_fc = (p_config->device_fc == 0) ? false : true; -#if KERNEL_VERSION(5, 17, 0) > MODS_KERNEL_VERSION - config.slave_id = p_config->slave_id; -#endif cl_debug(DEBUG_TEGRADMA, "ch: %d dir [%d], addr[%p -> %p], burst [%d %d] width [%d %d]\n", @@ -291,12 +288,6 @@ int esc_mods_dma_set_config(struct mods_client *client, config.src_maxburst, config.dst_maxburst, config.src_addr_width, config.dst_addr_width); -#if KERNEL_VERSION(5, 17, 0) > MODS_KERNEL_VERSION - cl_debug(DEBUG_TEGRADMA, - "slave id %d\n", - config.slave_id); -#endif - write_lock(&(p_mods_chan->lock)); err = dmaengine_slave_config(p_mods_chan->pch, &config); write_unlock(&(p_mods_chan->lock));