From patchwork Wed Mar 29 09:38:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Wang X-Patchwork-Id: 9651097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5BF7601D7 for ; Wed, 29 Mar 2017 09:39:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C05132074F for ; Wed, 29 Mar 2017 09:39:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B48A428421; Wed, 29 Mar 2017 09:39:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6965B2074F for ; Wed, 29 Mar 2017 09:39:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LUYxhb6Kxa3eit0O6D1QD72CBIQN4+K+qo/o+D79fgc=; b=mm+KWn2/+Ty0ys wouf+6awdww5cTthnIUFvF2+O88Aa4FdICk/qw9RK7qm9B5IVYCx6IQuOlmu9Ve0dl71Sl9OYN3aS voH0fvYftEq5Eu3n0WjRHXqAdaM8tx2eZrV0mGM67FzqUsbuPBXaeynEnoDUxN/SMAaLa5jHxahep EeytYGXsdlV9Xb0iv5u6A0riC1nFnc4iojgtvZlYhsP25SqEQ5kp2aLdt5y17ufHeayajYerlHrcu OlstZkCCMe9FHaH2KRBXsHTr2lVqdK7uT81fLJbS3wrW0P9XngWl6TkIfJzEThranKzVpMtxpNfUo IylfH2hcz6tVtGl/TL7A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ctA4S-00044F-CZ; Wed, 29 Mar 2017 09:39:16 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ctA4Q-00040W-0G for linux-mediatek@bombadil.infradead.org; Wed, 29 Mar 2017 09:39:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=y/QWBb1vU/Qx+Zghkhl/NyiW38InPM1OUfADha4jvYc=; b=d70jCuFfhNhmS8N0crzQxpnco zYH45z3CnyoqasMUdhjHMxsbrU4xNuh8UT8pfSzcl/iQ54FVxJ/y+QZf2QoRTdNNUpQfgVTr6CV30 IKqZWOiuPgqdGvh7P32CFQbRRXdMdWB9xswld/17vqycVcHe8CLWqNlcT6vB2uLiPDJAPsp1XeGMf mhQiYxmCtp3iDt6bFAxxNxdJ9xyPbpy3JCRhQDrBwHnChV6SvmZP2783Y7/KXeQKxJMeev4Sz8vdx 3rxV0phOY3+RAGdIBpRhTbRzyRz+hK7MD5CfVB2eGqzKLyg+jjdZ86feGPPtMtQLObX+3b8RIx3cB JO2yDedYA==; Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ctA4M-0001yG-LX for linux-mediatek@lists.infradead.org; Wed, 29 Mar 2017 09:39:12 +0000 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 674355416; Wed, 29 Mar 2017 17:38:36 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Wed, 29 Mar 2017 17:38:35 +0800 From: To: , , , , , Subject: [PATCH net-next v3 4/5] net-next: ethernet: mediatek: add device_node of GMAC pointing into the netdev instance Date: Wed, 29 Mar 2017 17:38:22 +0800 Message-ID: <1490780303-18598-5-git-send-email-sean.wang@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1490780303-18598-1-git-send-email-sean.wang@mediatek.com> References: <1490780303-18598-1-git-send-email-sean.wang@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170329_103910_977435_AD57278C X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Landen.Chao@mediatek.com, keyhaede@gmail.com, netdev@vger.kernel.org, sean.wang@mediatek.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, objelf@gmail.com, davem@davemloft.net Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Wang the patch adds the setup of the corresponding device node of GMAC into the netdev instance which could allow other modules such as DSA to find the instance through the node in dt-bindings using of_find_net_device_by_node() call. Signed-off-by: Sean Wang Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli --- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c index c21ed99..84b09a4 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -2323,6 +2323,8 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) eth->netdev[id]->ethtool_ops = &mtk_ethtool_ops; eth->netdev[id]->irq = eth->irq[0]; + eth->netdev[id]->dev.of_node = np; + return 0; free_netdev: