Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2536880lqo; Mon, 20 May 2024 08:44:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMWyahReLXwnQCQIw1y9fGUBKiObRLm+N7epqIQu/ysm3yBblJWavQv/umoegCM4JWDJzT2QONkAYcl/RE5sY42NJC28tJSVTh1/79vw== X-Google-Smtp-Source: AGHT+IE2WTwwmbbsiwXKJWN9Ngw+wTYltGt3r6gKWsEtBvxEYVcDtYz6FUsA9l+RErbGBnybln/5 X-Received: by 2002:a17:90a:bb89:b0:2b9:c7ad:c99f with SMTP id 98e67ed59e1d1-2b9c7adca08mr14937055a91.9.1716219841432; Mon, 20 May 2024 08:44:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716219841; cv=pass; d=google.com; s=arc-20160816; b=rZl/4+Ub/flHGDPt6kK78mO6dKz71olQq1tAqYyWT2rjgvDLn+EOZ+0T9diYFesh6y 8mijLfvud2/xVw+Ab38V2mcScu3PSXdZB6/on8a90jJP1JhSsSPpBoFMQtRdp5oqyrcT m+fvPFCFzaitcaLP1l4evb7nVyDyqG2PXyPf9kh7AIKzdHvzcyheLTKVnGPOZBSU7+yj jjaBFwBAknMBRe1yiauc26gWXPSCPyCX34QlqQUjs2q4KRT4qwmO6e8bL3PAy9U62BOi 3nbaZOUhZczTADdfmrq+orMJ570vH0DEIb10X7IkZ0dWF/7NejSHBO2lejHUaEmcLBc9 0ENQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ZEKykYB40nby5I/R7KEELp/CMw6HcoAC326EK9ryETA=; fh=GMVtMPLlwt/lj9i49KuTObjDq8olvs384ecnCjKLSCY=; b=gz9KRDpJKBMlOW/q/hAQ4e2VPw+noIvnKqapnZ2f1oQVP5A6IfKOu671rS8C6cQoEY 61s3dXeCAM7QhAX9VRl5i7VEeg+FWYR8n7wd3unGrPdRqrYgyyhh7LyJVD3+RJAq7dzl qH/FgBzLw1fIp3x5bhF/Cxi34ZOwgzwlSBW6cUa9uZCWdUyBPNbscid2TLbQIl0+iHgi y0mFfEGT+CnwXTRuZfLxv4/yxTiK/RA1DzzaeWePsTbRwHWe8kbouRBEoghL/l0oS24k d6V+1LOQXv+4htHdw+UeZFIeEiOZ/luFkOvvyTY/oFgD6GT4Rzf58Wxrk7LnKeVRi78R c7Gg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=YVdS7Fu8; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-183919-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b671471c54si560694a91.114.2024.05.20.08.44.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 08:44:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-183919-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=YVdS7Fu8; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-183919-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-183919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0BEB0280D3E for ; Mon, 20 May 2024 15:44:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7990D13793A; Mon, 20 May 2024 15:43:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="YVdS7Fu8" Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAAC3137749; Mon, 20 May 2024 15:43:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716219807; cv=none; b=Lx9e7vYO5ct2MgXNSl4Wvd8zNy+2c8i98/X+i3MU3AE/7oHFfmmaEGL/CSyfiihz6Ox/jPxiosZdsOxmRAGVfnkmpKXv9jNDYFTFtIs28xxF8D24y3MkeEXVb5wT1GLzM/VUiJO0k2l2nf57r0WU6x5YJHJ5UwsVYXUEC3CKPdQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716219807; c=relaxed/simple; bh=i8hxV05JFB4duZ8FMO6pki84u/gAZBrqpfUbvJ2KXRA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X9f6yjcewahV1dKPzmkzFvh84IfegG4qmyPOKHHJUDuqBb1f8Hj9+Qnb9IARYxhBMRvxOssk5imJuhmyZcwC9uQvc9hZybXXmrsHwiEFIVNWHWsf+87omrmRqXxCw8wJQVef32mzPd2q3FgWFroXjjp99UWRgbWB8xIOnYb92+s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=YVdS7Fu8; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44KEY29w015326; Mon, 20 May 2024 17:43:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= selector1; bh=ZEKykYB40nby5I/R7KEELp/CMw6HcoAC326EK9ryETA=; b=YV dS7Fu8aoaa8+CJJzsRQmm+8e9GGskJr8KqSOb3XRJy1Lozgy82HuIbKiTyX+iuC5 lFLoPKqlmuOn3jF8EFy3xEmQK5Ir/do6zcI4+kBYP7o1YnM8GNOLWNzeSoucSSHg 1eGG8NoEbsu/XXDz8kol4yi8AMQAAevfANDXD4gEjQZZgRlISv/tdsQrK24kDigr yoNNb7n3KuB8JW58oTvBdedF9TLHMufsNM9+5u4gPiiuN5m0psWsqd6bi7LCSqry evcZiOwU4MdVdvifFgDwhJWazmztE1RZ38MPXCvOP66zXNutwNFVPRusuysDNyVw preznMI9yYg2kJObwHOQ== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3y6n337pag-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 20 May 2024 17:43:06 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 0C5B740048; Mon, 20 May 2024 17:43:02 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 946EE226FC0; Mon, 20 May 2024 17:42:17 +0200 (CEST) Received: from localhost (10.252.8.132) by SHFDAG1NODE3.st.com (10.75.129.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 20 May 2024 17:42:17 +0200 From: Amelie Delaunay To: Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue CC: , , , , , , Amelie Delaunay Subject: [PATCH v3 02/12] dmaengine: stm32: New directory for STM32 DMA controllers drivers Date: Mon, 20 May 2024 17:42:03 +0200 Message-ID: <20240520154213.689699-3-amelie.delaunay@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240520154213.689699-1-amelie.delaunay@foss.st.com> References: <20240520154213.689699-1-amelie.delaunay@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SHFCAS1NODE1.st.com (10.75.129.72) To SHFDAG1NODE3.st.com (10.75.129.71) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-20_05,2024-05-17_03,2024-05-17_01 Gather the STM32 DMA controllers under drivers/dma/stm32/ Signed-off-by: Amelie Delaunay --- drivers/dma/Kconfig | 34 ++--------------------- drivers/dma/Makefile | 4 +-- drivers/dma/stm32/Kconfig | 37 ++++++++++++++++++++++++++ drivers/dma/stm32/Makefile | 4 +++ drivers/dma/{ => stm32}/stm32-dma.c | 2 +- drivers/dma/{ => stm32}/stm32-dmamux.c | 0 drivers/dma/{ => stm32}/stm32-mdma.c | 2 +- 7 files changed, 46 insertions(+), 37 deletions(-) create mode 100644 drivers/dma/stm32/Kconfig create mode 100644 drivers/dma/stm32/Makefile rename drivers/dma/{ => stm32}/stm32-dma.c (99%) rename drivers/dma/{ => stm32}/stm32-dmamux.c (100%) rename drivers/dma/{ => stm32}/stm32-mdma.c (99%) diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig index 002a5ec80620..32b4256ef874 100644 --- a/drivers/dma/Kconfig +++ b/drivers/dma/Kconfig @@ -568,38 +568,6 @@ config ST_FDMA Say Y here if you have such a chipset. If unsure, say N. -config STM32_DMA - bool "STMicroelectronics STM32 DMA support" - depends on ARCH_STM32 || COMPILE_TEST - select DMA_ENGINE - select DMA_VIRTUAL_CHANNELS - help - Enable support for the on-chip DMA controller on STMicroelectronics - STM32 MCUs. - If you have a board based on such a MCU and wish to use DMA say Y - here. - -config STM32_DMAMUX - bool "STMicroelectronics STM32 dma multiplexer support" - depends on STM32_DMA || COMPILE_TEST - help - Enable support for the on-chip DMA multiplexer on STMicroelectronics - STM32 MCUs. - If you have a board based on such a MCU and wish to use DMAMUX say Y - here. - -config STM32_MDMA - bool "STMicroelectronics STM32 master dma support" - depends on ARCH_STM32 || COMPILE_TEST - depends on OF - select DMA_ENGINE - select DMA_VIRTUAL_CHANNELS - help - Enable support for the on-chip MDMA controller on STMicroelectronics - STM32 platforms. - If you have a board based on STM32 SoC and wish to use the master DMA - say Y here. - config SPRD_DMA tristate "Spreadtrum DMA support" depends on ARCH_SPRD || COMPILE_TEST @@ -772,6 +740,8 @@ source "drivers/dma/fsl-dpaa2-qdma/Kconfig" source "drivers/dma/lgm/Kconfig" +source "drivers/dma/stm32/Kconfig" + # clients comment "DMA Clients" depends on DMA_ENGINE diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile index 802ca916f05f..374ea98faf43 100644 --- a/drivers/dma/Makefile +++ b/drivers/dma/Makefile @@ -70,9 +70,6 @@ obj-$(CONFIG_PXA_DMA) += pxa_dma.o obj-$(CONFIG_RENESAS_DMA) += sh/ obj-$(CONFIG_SF_PDMA) += sf-pdma/ obj-$(CONFIG_STE_DMA40) += ste_dma40.o ste_dma40_ll.o -obj-$(CONFIG_STM32_DMA) += stm32-dma.o -obj-$(CONFIG_STM32_DMAMUX) += stm32-dmamux.o -obj-$(CONFIG_STM32_MDMA) += stm32-mdma.o obj-$(CONFIG_SPRD_DMA) += sprd-dma.o obj-$(CONFIG_TXX9_DMAC) += txx9dmac.o obj-$(CONFIG_TEGRA186_GPC_DMA) += tegra186-gpc-dma.o @@ -88,5 +85,6 @@ obj-$(CONFIG_INTEL_LDMA) += lgm/ obj-y += mediatek/ obj-y += qcom/ +obj-y += stm32/ obj-y += ti/ obj-y += xilinx/ diff --git a/drivers/dma/stm32/Kconfig b/drivers/dma/stm32/Kconfig new file mode 100644 index 000000000000..b72ae1a4502f --- /dev/null +++ b/drivers/dma/stm32/Kconfig @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# STM32 DMA controllers drivers +# +if ARCH_STM32 || COMPILE_TEST + +config STM32_DMA + bool "STMicroelectronics STM32 DMA support" + select DMA_ENGINE + select DMA_VIRTUAL_CHANNELS + help + Enable support for the on-chip DMA controller on STMicroelectronics + STM32 platforms. + If you have a board based on STM32 SoC with such DMA controller + and want to use DMA say Y here. + +config STM32_DMAMUX + bool "STMicroelectronics STM32 DMA multiplexer support" + depends on STM32_DMA + help + Enable support for the on-chip DMA multiplexer on STMicroelectronics + STM32 platforms. + If you have a board based on STM32 SoC with such DMA multiplexer + and want to use DMAMUX say Y here. + +config STM32_MDMA + bool "STMicroelectronics STM32 master DMA support" + depends on OF + select DMA_ENGINE + select DMA_VIRTUAL_CHANNELS + help + Enable support for the on-chip MDMA controller on STMicroelectronics + STM32 platforms. + If you have a board based on STM32 SoC with such DMA controller + and want to use MDMA say Y here. + +endif diff --git a/drivers/dma/stm32/Makefile b/drivers/dma/stm32/Makefile new file mode 100644 index 000000000000..663a3896a881 --- /dev/null +++ b/drivers/dma/stm32/Makefile @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_STM32_DMA) += stm32-dma.o +obj-$(CONFIG_STM32_DMAMUX) += stm32-dmamux.o +obj-$(CONFIG_STM32_MDMA) += stm32-mdma.o diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32/stm32-dma.c similarity index 99% rename from drivers/dma/stm32-dma.c rename to drivers/dma/stm32/stm32-dma.c index 90857d08a1a7..917f8e922373 100644 --- a/drivers/dma/stm32-dma.c +++ b/drivers/dma/stm32/stm32-dma.c @@ -28,7 +28,7 @@ #include #include -#include "virt-dma.h" +#include "../virt-dma.h" #define STM32_DMA_LISR 0x0000 /* DMA Low Int Status Reg */ #define STM32_DMA_HISR 0x0004 /* DMA High Int Status Reg */ diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32/stm32-dmamux.c similarity index 100% rename from drivers/dma/stm32-dmamux.c rename to drivers/dma/stm32/stm32-dmamux.c diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32/stm32-mdma.c similarity index 99% rename from drivers/dma/stm32-mdma.c rename to drivers/dma/stm32/stm32-mdma.c index 6505081ced44..e6d525901de7 100644 --- a/drivers/dma/stm32-mdma.c +++ b/drivers/dma/stm32/stm32-mdma.c @@ -30,7 +30,7 @@ #include #include -#include "virt-dma.h" +#include "../virt-dma.h" #define STM32_MDMA_GISR0 0x0000 /* MDMA Int Status Reg 1 */ -- 2.25.1