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 AAD58C52D6F for ; Fri, 2 Aug 2024 14:39:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lp+k6QdJN9zVG+kb7KTje8EnAEicIHk5u0GRzN1Pov8=; b=TyZMf2JF9wyCM3QKx94mQZqVGb d6JQOlWbnSUmmBxW63JC6O8UjlsbGOpXWTdck+3swoYBq/8ftpW5zE27JGLbSWJuiD+uzgJS2jdMr Vp0ECeytXSkKWpDkjT+B5q/b+TXX+G+FC2ipjaxD5+6sFMlYItRjKRxK1MkS8Yv1PitrDAUWs1jXl ovvn/1QlMTiVD6RqNlU9x26e4Zv245LowpqFzy/BojZdwxi/no2zqhMKXjQ+tJmfBXakZXe+pdvkc hXjmOqrNUBJ+0tZzJCfu0VozxtwCCl+/rjr4nP4eaRPeckXMQfmcvNEWwaZj5mdI+MXODPk5nxJL9 uhS2B9Nw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZtR6-0000000978D-27YQ; Fri, 02 Aug 2024 14:39:16 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZtQK-000000096tm-47YA for linux-arm-kernel@lists.infradead.org; Fri, 02 Aug 2024 14:38:30 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id F173DCE1B0C; Fri, 2 Aug 2024 14:38:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C96FFC4AF0B; Fri, 2 Aug 2024 14:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722609505; bh=71o3IObaA9yD0TmHXVj+9FSEWjx+F9BkQDM7P7obTFo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZHbTgnaFYKrgsR9M1xdGzOxKcaswozfv8aTwEnqKf9T80BhyLaFfXsV7g3Y23zxSB 45Y++ZWnlDnVAN0khOr1S8gjWTEq6o4xt5DP0dNP+DRvz3Wn3Jen5Sgn0L3FZUEfCj 47IR7ZEYaao6/G8KMJBu5PL6bf4V1ddZaDmYxxreZefHY37B6nMNW9wnIuxTfsXgXk XoWR7oNS8BaT/73Qdwp/26IivfQdo5GoqelZBzGiycXL/oZSXtwYatuMYruchpwAWu PGQk/9D1nc5SmCZIW/uIsbPOe+bNEX08CUEFQfgg63jETYD/0FvB2QQrudQ3819eBg TnJ0WZyBdrY4Q== Date: Fri, 2 Aug 2024 15:38:18 +0100 From: Simon Horman To: jitendra.vegiraju@broadcom.com Cc: netdev@vger.kernel.org, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, bcm-kernel-feedback-list@broadcom.com, richardcochran@gmail.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org, andrew@lunn.ch, linux@armlinux.org.uk, florian.fainelli@broadcom.com Subject: Re: [PATCH net-next v3 1/3] net: stmmac: Add basic dwxgmac4 support to stmmac core Message-ID: <20240802143818.GB2504122@kernel.org> References: <20240802031822.1862030-1-jitendra.vegiraju@broadcom.com> <20240802031822.1862030-2-jitendra.vegiraju@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240802031822.1862030-2-jitendra.vegiraju@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240802_073829_407897_C724A565 X-CRM114-Status: GOOD ( 15.74 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Aug 01, 2024 at 08:18:20PM -0700, jitendra.vegiraju@broadcom.com wrote: > From: Jitendra Vegiraju > > Adds support for DWC_xgmac version 4.00a in stmmac core module. > This version adds enhancements to DMA architecture for virtualization > scalability. This is realized by decoupling physical DMA channels (PDMA) > from Virtual DMA channels (VDMA). The VDMAs are software abastractions > that map to PDMAs for frame transmission and reception. > > The virtualization enhancements are currently not being used and hence > a fixed mapping of VDMA to PDMA is configured in the init functions. > Because of the new init functions, a new instance of struct stmmac_dma_ops > dwxgmac400_dma_ops is added. > Most of the other dma operation functions in existing dwxgamc2_dma.c file > can be reused. > > Signed-off-by: Jitendra Vegiraju ... > stmmac-$(CONFIG_STMMAC_SELFTESTS) += stmmac_selftests.o > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c ... > @@ -641,3 +642,33 @@ const struct stmmac_dma_ops dwxgmac210_dma_ops = { > .enable_sph = dwxgmac2_enable_sph, > .enable_tbs = dwxgmac2_enable_tbs, > }; > + > +const struct stmmac_dma_ops dwxgmac400_dma_ops = { > + .reset = dwxgmac2_dma_reset, > + .init = dwxgmac4_dma_init, > + .init_chan = dwxgmac2_dma_init_chan, > + .init_rx_chan = dwxgmac4_dma_init_rx_chan, > + .init_tx_chan = dwxgmac4_dma_init_tx_chan, > + .axi = dwxgmac2_dma_axi, > + .dump_regs = dwxgmac2_dma_dump_regs, > + .dma_rx_mode = dwxgmac2_dma_rx_mode, > + .dma_tx_mode = dwxgmac2_dma_tx_mode, > + .enable_dma_irq = dwxgmac2_enable_dma_irq, > + .disable_dma_irq = dwxgmac2_disable_dma_irq, > + .start_tx = dwxgmac2_dma_start_tx, > + .stop_tx = dwxgmac2_dma_stop_tx, > + .start_rx = dwxgmac2_dma_start_rx, > + .stop_rx = dwxgmac2_dma_stop_rx, > + .dma_interrupt = dwxgmac2_dma_interrupt, > + .get_hw_feature = dwxgmac2_get_hw_feature, > + .rx_watchdog = dwxgmac2_rx_watchdog, > + .set_rx_ring_len = dwxgmac2_set_rx_ring_len, > + .set_tx_ring_len = dwxgmac2_set_tx_ring_len, > + .set_rx_tail_ptr = dwxgmac2_set_rx_tail_ptr, > + .set_tx_tail_ptr = dwxgmac2_set_tx_tail_ptr, > + .enable_tso = dwxgmac2_enable_tso, > + .qmode = dwxgmac2_qmode, > + .set_bfsize = dwxgmac2_set_bfsize, > + .enable_sph = dwxgmac2_enable_sph, > + .enable_tbs = dwxgmac2_enable_tbs, > +}; Please add dwxgmac400_dma_ops to hwif.h in this patch rather than a subsequent one to avoid Sparse suggesting the symbol should be static. ...