From patchwork Fri Oct 18 20:53:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jitendra Vegiraju X-Patchwork-Id: 13842409 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 6E771D3F29E for ; Fri, 18 Oct 2024 20:55:26 +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:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gw64yJdpWRu/04CgGnDhpBBCTsnehSpNt6WR0X3c2uA=; b=ubXw4RwiKioC+InaIn4MxLfJbp VaWrLdTAihLO32ZSPTAlhPeO6kIiQIfCs/Z+KBnweB4bC6FoZGZxu6yCYjcAQTgKOqwLqQJ+1nJyB TxcC8n/dtwMf5dDr5oAz2gsSf+ndP1HfxpdD8jEeerlmuVmhQ3vGo9UdiHlqeOJThgf1q7Q1rqzsd 87p7fQb20r0500OSHwMTpuYNbqnFkbQ3XeRlr5rlwnMAF0Pfv905VCK1ha1kzDTPKlJ/9aTfrQhY4 sdHQQEoNq0TmqP5l5TnWyZwgpnfPSTBCLd7de9FlIep9rmJdmg44PYrBp6yk5SmkfuqolQnsjvpKT Q97isWZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1u09-000000021XX-2mdU; Fri, 18 Oct 2024 20:55:13 +0000 Received: from saphodev.broadcom.com ([192.19.144.205] helo=relay.smtp-ext.broadcom.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1tyf-000000021ET-14hv for linux-arm-kernel@lists.infradead.org; Fri, 18 Oct 2024 20:53:43 +0000 Received: from mail-lvn-it-01.lvn.broadcom.net (mail-lvn-it-01.lvn.broadcom.net [10.36.132.253]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 41CA6C003AC6; Fri, 18 Oct 2024 13:53:37 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 41CA6C003AC6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1729284817; bh=+tk2cpjGb3VNztKsp+kLY6AgcFI4WOO+Igx1tj7XyyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kPC/mYQ4uyTcj1Qj8161HBaROhFebCA0lwe35Zi7cngX3PHuDg8qVgmfRgi5ga8Kw FH0UxRHEVFMovYUBwLgN7p6721mq3U6mfE/QO/jnzstcsZm1AYCvwZriqDySHMLvQC o9Sf2hgsXr15qUKVLgI2aB5WtF2Bbj1mZYS/i9x8= Received: from pcie-dev03.dhcp.broadcom.net (pcie-dev03.dhcp.broadcom.net [10.59.171.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail-lvn-it-01.lvn.broadcom.net (Postfix) with ESMTPSA id 8E7AB18041CACA; Fri, 18 Oct 2024 13:53:36 -0700 (PDT) From: jitendra.vegiraju@broadcom.com To: netdev@vger.kernel.org Cc: alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, jitendra.vegiraju@broadcom.com, bcm-kernel-feedback-list@broadcom.com, richardcochran@gmail.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, fancer.lancer@gmail.com, rmk+kernel@armlinux.org.uk, ahalaney@redhat.com, xiaolei.wang@windriver.com, rohan.g.thomas@intel.com, Jianheng.Zhang@synopsys.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, horms@kernel.org, florian.fainelli@broadcom.com, quic_abchauha@quicinc.com Subject: [PATCH net-next v6 1/5] net: stmmac: Add snps_id, dev_id to struct plat_stmmacenet_data Date: Fri, 18 Oct 2024 13:53:28 -0700 Message-Id: <20241018205332.525595-2-jitendra.vegiraju@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241018205332.525595-1-jitendra.vegiraju@broadcom.com> References: <20241018205332.525595-1-jitendra.vegiraju@broadcom.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241018_135341_502614_DCDB02AA X-CRM114-Status: GOOD ( 11.87 ) 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 From: Jitendra Vegiraju Introduce new variables plat_stmmacenet_data::snps_id,dev_id to allow glue drivers to specify synopsys ID and device id respectively. These values take precedence over reading from HW register. This facility provides a mechansim to use setup function from stmmac core module and yet override MAC.VERSION CSR if the glue driver chooses to do so. Signed-off-by: Jitendra Vegiraju --- include/linux/stmmac.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index d79ff252cfdc..4c4965a5a0d0 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -183,6 +183,8 @@ struct dwmac4_addrs { #define STMMAC_FLAG_HWTSTAMP_CORRECT_LATENCY BIT(12) struct plat_stmmacenet_data { + u32 snps_id; + u32 dev_id; int bus_id; int phy_addr; /* MAC ----- optional PCS ----- SerDes ----- optional PHY ----- Media