From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C91E7C07E9D for ; Thu, 29 Sep 2022 07:36:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9rdodY+nPEuULXsrmSQG9Wm+mSvshEre9GY1JV+8OCU=; b=TPpmQ3qXCH4ir5 wMys7rFBGIDjDRc7Mx9D+P4nPuVQYFyOkLRE2h89X95k3EHYgvs1mxjA+AfGO9QwCJW/4cTURmLna BpMR3PFrerLy8eSU977zfRa97+5iS8e2LBnZXw3rlHTp/sZepkclsi8HTaNyiOlrNSjKORFoUA0jG zitr3/Aexptdn2u4EzwU75CTLuxQWqTqCxXOF0zJK+g/t1eG0JDd/iXX/Jp+1X7Eepl9KtW1XXnrF 70SyeXAMlobspP1mrzVs1Inmx43h+AO9Q0LOQCj/JpC8cH9nYk1iS7bHTUypygL12sZon0Q/IJkNV UMqfvjNU8X9TTzowhCew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odo54-001b2R-3c; Thu, 29 Sep 2022 07:35:38 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odo50-001b0w-UH for linux-arm-kernel@lists.infradead.org; Thu, 29 Sep 2022 07:35:36 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 674576204C; Thu, 29 Sep 2022 07:35:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42E42C433C1; Thu, 29 Sep 2022 07:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664436931; bh=w8sJ2aK2xXxhf+av8iYHPcJJb02anv8Gm2kYalcXmG8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oPbJBbT6nFJF6TlfilrR/VeMWyzuU7XF5DB7MXMJjZPE1raOmnEZyWd86dsXdqzRH 6319F3k3MTvZ+C17cm23MYjS4KnEtdZ9fwconk+gtSaRa6jr9IsXvzefr27k+fTNjP uiNYQ81UuaBnfE73pmE2ajNQBuAKMq9nUEyEijRBiAUavFSQGNTeIv2Mtwnj3bAMTb dy7lTPFjuGExyRhqagTJRQhxXnkLifpuMy51dzyxL1vnfD+es2OTLfRPWVtmC2Xsox Y5LcAyAUNXzFMZs6WctogBJ7G9loegDG07yOX5LRg/rCyVNsM+ZAY0ddPhc6aWcdHV Pv60cEcj4zkMw== Date: Thu, 29 Sep 2022 13:05:27 +0530 From: Vinod Koul To: Kevin Hilman Cc: Peter Ujfalusi , dmaengine@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Frayer Subject: Re: [PATCH v2 2/3] dma/ti: convert k3-udma to module Message-ID: References: <20220927230804.4085579-1-khilman@baylibre.com> <20220927230804.4085579-3-khilman@baylibre.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220927230804.4085579-3-khilman@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220929_003535_075214_AEED5FC6 X-CRM114-Status: GOOD ( 29.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 27-09-22, 16:08, Kevin Hilman wrote: > Currently k3-udma driver is built as separate platform drivers with a > shared probe and identical code path, just differnet platform data. > > To enable to build as module, convert the separate platform driver > into a single module_platform_driver with the data selection done via > compatible string and of_match. The separate of_match tables are also > combined into a single table to avoid the multiple calls to > of_match_node() > > Since all modern TI platforms using this are DT enabled, the removal > of separate platform_drivers shoul should nave no functional change. drop extra shoul Please change subsystem tag to dmaengine: ti: xxxx for this and next patch > > Signed-off-by: Kevin Hilman > Acked-by: Peter Ujfalusi this has trailing whitespaces, maybe copy paste error > --- > drivers/dma/ti/Kconfig | 4 ++-- > drivers/dma/ti/k3-udma-glue.c | 5 ++++- > drivers/dma/ti/k3-udma.c | 40 +++++------------------------------ > 3 files changed, 11 insertions(+), 38 deletions(-) > > diff --git a/drivers/dma/ti/Kconfig b/drivers/dma/ti/Kconfig > index 79618fac119a..f196be3b222f 100644 > --- a/drivers/dma/ti/Kconfig > +++ b/drivers/dma/ti/Kconfig > @@ -35,7 +35,7 @@ config DMA_OMAP > DMA engine is found on OMAP and DRA7xx parts. > > config TI_K3_UDMA > - bool "Texas Instruments UDMA support" > + tristate "Texas Instruments UDMA support" > depends on ARCH_K3 > depends on TI_SCI_PROTOCOL > depends on TI_SCI_INTA_IRQCHIP > @@ -48,7 +48,7 @@ config TI_K3_UDMA > DMA engine is used in AM65x and j721e. > > config TI_K3_UDMA_GLUE_LAYER > - bool "Texas Instruments UDMA Glue layer for non DMAengine users" > + tristate "Texas Instruments UDMA Glue layer for non DMAengine users" > depends on ARCH_K3 > depends on TI_K3_UDMA > help > diff --git a/drivers/dma/ti/k3-udma-glue.c b/drivers/dma/ti/k3-udma-glue.c > index 4fdd9f06b723..c29de4695ae7 100644 > --- a/drivers/dma/ti/k3-udma-glue.c > +++ b/drivers/dma/ti/k3-udma-glue.c > @@ -6,6 +6,7 @@ > * > */ > > +#include > #include > #include > #include > @@ -1433,4 +1434,6 @@ static int __init k3_udma_glue_class_init(void) > { > return class_register(&k3_udma_glue_devclass); > } > -arch_initcall(k3_udma_glue_class_init); > + > +module_init(k3_udma_glue_class_init); > +MODULE_LICENSE("GPL v2"); > diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c > index 2f0d2c68c93c..7239ff31c8c5 100644 > --- a/drivers/dma/ti/k3-udma.c > +++ b/drivers/dma/ti/k3-udma.c > @@ -5,6 +5,7 @@ > */ > > #include > +#include > #include > #include > #include > @@ -4318,18 +4319,10 @@ static const struct of_device_id udma_of_match[] = { > .compatible = "ti,j721e-navss-mcu-udmap", > .data = &j721e_mcu_data, > }, > - { /* Sentinel */ }, > -}; > - > -static const struct of_device_id bcdma_of_match[] = { > { > .compatible = "ti,am64-dmss-bcdma", > .data = &am64_bcdma_data, > }, > - { /* Sentinel */ }, > -}; > - > -static const struct of_device_id pktdma_of_match[] = { > { > .compatible = "ti,am64-dmss-pktdma", > .data = &am64_pktdma_data, > @@ -5254,14 +5247,9 @@ static int udma_probe(struct platform_device *pdev) > return -ENOMEM; > > match = of_match_node(udma_of_match, dev->of_node); > - if (!match) > - match = of_match_node(bcdma_of_match, dev->of_node); > if (!match) { > - match = of_match_node(pktdma_of_match, dev->of_node); > - if (!match) { > - dev_err(dev, "No compatible match found\n"); > - return -ENODEV; > - } > + dev_err(dev, "No compatible match found\n"); > + return -ENODEV; > } > ud->match_data = match->data; > > @@ -5494,27 +5482,9 @@ static struct platform_driver udma_driver = { > }, > .probe = udma_probe, > }; > -builtin_platform_driver(udma_driver); > > -static struct platform_driver bcdma_driver = { > - .driver = { > - .name = "ti-bcdma", > - .of_match_table = bcdma_of_match, > - .suppress_bind_attrs = true, > - }, > - .probe = udma_probe, > -}; > -builtin_platform_driver(bcdma_driver); > - > -static struct platform_driver pktdma_driver = { > - .driver = { > - .name = "ti-pktdma", > - .of_match_table = pktdma_of_match, > - .suppress_bind_attrs = true, > - }, > - .probe = udma_probe, > -}; > -builtin_platform_driver(pktdma_driver); > +module_platform_driver(udma_driver); > +MODULE_LICENSE("GPL v2"); > > /* Private interfaces to UDMA */ > #include "k3-udma-private.c" > -- > 2.34.0 -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel