From patchwork Wed Aug 7 12:12:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 13756191 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 1E0DEC52D6F for ; Wed, 7 Aug 2024 12:13:33 +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: Content-Type:MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=FrFm0a/CP4eAozJxBnIDxJwp5hKoHQQTdiePfUrFRR8=; b=RqOdHHPg8xoZGYzZ4iuExsuyDa wGCI8CtpfWquADaw7m7Gc5AIomduzw/zjhScQfBRI+kdCibo7PGsVQqUfJeeRhvWcAzfD08/CHs4I BdURTNd1Zg7RFQCP68eahJXl7nVakidtxLdEK/7ZgJFgW81to8awYXum99wn308pkZ8ttpkDWJmbQ Jlh5M0pBYPTVa3QWh5VonHIpSy79admkURoIPOUegmG2j0c6bKkMy3ZtgkokAzt5aVDl2Bo4fvn0D JZ0rHt3oXEjr7ATOpOtTN1PoNy/gRma720PS24pcloohuzplJoWg1dJYhqm7eWTyvqUNAvanzfhXJ 2ah7GBUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbfXc-00000004y5a-0cNp; Wed, 07 Aug 2024 12:13:20 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbfX3-00000004y0b-0fE1 for linux-arm-kernel@lists.infradead.org; Wed, 07 Aug 2024 12:12:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1723032765; x=1754568765; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FrFm0a/CP4eAozJxBnIDxJwp5hKoHQQTdiePfUrFRR8=; b=ibR3BB3EBiMFu+r+p+kDMFR4G9m3oyTOHBwkK5WalMNoeflLRKJLdHal I+1mnsRNHrU+B2p5A3NvYJ2pVAs//cFqnStAr9Q8iE/gWfn4p+TMshfQm Z4m1UIFUKOSP2yixwDWgKYqpjR/C6xWk07HgPQoO1jXymgOHxIxLEaTde yPFxXbkLvQphvTPdeKavChrDbSJ1Yp8M06A5HRcmKG37aL5MeLvczaHaU m5Awhc9u1Tv5lN612sUrHBSAHlYiYeYBTqKyfgSg/+Xl7EzdevIZR+Irr 86CdyFgzvWa6c/IdxBOxLehYa26KLXYlOC3OMIfbcUy+n/GnTCstcDmZ0 Q==; X-CSE-ConnectionGUID: 88j1+HaOSROhSeR+uFcgAw== X-CSE-MsgGUID: SXIZty3KSjixY1qB6I3wLA== X-IronPort-AV: E=Sophos;i="6.09,269,1716242400"; d="scan'208";a="38292633" Received: from vmailcow01.tq-net.de ([10.150.86.48]) by mx1.tq-group.com with ESMTP; 07 Aug 2024 14:12:42 +0200 X-CheckPoint: {66B364BA-20-CC8A42C9-EEB26961} X-MAIL-CPID: 24B5C2277049345D6307A7D102250CBE_2 X-Control-Analysis: str=0001.0A782F25.66B364BB.0001,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8A16F1673A7; Wed, 7 Aug 2024 14:12:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ew.tq-group.com; s=dkim; t=1723032758; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding; bh=FrFm0a/CP4eAozJxBnIDxJwp5hKoHQQTdiePfUrFRR8=; b=f9BZ3qtYO8WAMPN+lAHwbtF3H73+S2yXWs27akY2GYT6U0Ysl2fv9swWe2puPGUUuQ61t7 BL2qP+ECVsSpYwztmWAyFt+XHchSH6Qxedcgsz3BQH/WRUrh5H3xi7oEW88iWIpPoWYW7r 2Qw1W5CpOjaTAkcwUyH0hkp9xavpm3MCANBEQGc99PvGeDC1jv6SnNPJNxr4lGK2p7vKEP dxrD7fi24b/QewV2ORNadx8eVvXWqjBem9HTTI3kvgmhdivR/xeuKU40cFdsQBiuhdS9cl GuFtflONUgUkWyS+YjrYyRMcn0xcPDO389e2v5Z5deqWav1qKKA0tQAyNMPTGQ== From: Matthias Schiffer To: MD Danish Anwar , Roger Quadros , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux@ew.tq-group.com, Matthias Schiffer Subject: [PATCH net-next] net: ti: icssg_prueth: populate netdev of_node Date: Wed, 7 Aug 2024 14:12:15 +0200 Message-ID: <20240807121215.3178964-1-matthias.schiffer@ew.tq-group.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240807_051245_694710_8A47AA92 X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. 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 Allow of_find_net_device_by_node() to find icssg_prueth ports and make the individual ports' of_nodes available in sysfs. Signed-off-by: Matthias Schiffer Reviewed-by: MD Danish Anwar Reviewed-by: Andrew Lunn --- Tested on a TI AM64x SoC. I don't have a device using the icssg_prueth_sr1 variant of the driver, but as this part of icssg_prueth.c and icssg_prueth_sr1.c is identical, it seems like a good idea to make the same change in both variants. drivers/net/ethernet/ti/icssg/icssg_prueth.c | 1 + drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c index 9dc9de39bb8f0..53a3e44b99a20 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c @@ -857,6 +857,7 @@ static int prueth_netdev_init(struct prueth *prueth, } ether_addr_copy(emac->mac_addr, ndev->dev_addr); + ndev->dev.of_node = eth_node; ndev->min_mtu = PRUETH_MIN_PKT_SIZE; ndev->max_mtu = PRUETH_MAX_MTU; ndev->netdev_ops = &emac_netdev_ops; diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c b/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c index 54b7e27608ce8..292f04d29f4f7 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c @@ -847,6 +847,7 @@ static int prueth_netdev_init(struct prueth *prueth, } ether_addr_copy(emac->mac_addr, ndev->dev_addr); + ndev->dev.of_node = eth_node; ndev->min_mtu = PRUETH_MIN_PKT_SIZE; ndev->max_mtu = PRUETH_MAX_MTU; ndev->netdev_ops = &emac_netdev_ops;