From patchwork Sun Feb 28 21:24:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sjoerd Simons X-Patchwork-Id: 63188 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1098539lbc; Mon, 29 Feb 2016 00:07:36 -0800 (PST) X-Received: by 10.28.32.19 with SMTP id g19mr10317578wmg.98.1456733255957; Mon, 29 Feb 2016 00:07:35 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id d132si19090376wmf.39.2016.02.29.00.07.35; Mon, 29 Feb 2016 00:07:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0F1BCA75F9; Mon, 29 Feb 2016 09:06:33 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id toWAjveKjA66; Mon, 29 Feb 2016 09:06:32 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5D651A7657; Mon, 29 Feb 2016 09:05:45 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E72D7A7564 for ; Mon, 29 Feb 2016 09:05:14 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xbmd0_WOZiPP for ; Mon, 29 Feb 2016 09:05:14 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by theia.denx.de (Postfix) with ESMTPS id C2CDDA75F3 for ; Mon, 29 Feb 2016 09:05:13 +0100 (CET) Received: from dusk.luon.net (unknown [IPv6:2001:1af8:fe00:8421:f2de:f1ff:fe93:2ee]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 5814B2613D2; Mon, 29 Feb 2016 07:55:56 +0000 (GMT) Received: by dusk.luon.net (Postfix, from userid 1000) id 286E420A90; Sun, 28 Feb 2016 22:25:06 +0100 (CET) From: Sjoerd Simons To: Simon Glass Date: Sun, 28 Feb 2016 22:24:56 +0100 Message-Id: <1456694706-911-3-git-send-email-sjoerd.simons@collabora.co.uk> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456694706-911-1-git-send-email-sjoerd.simons@collabora.co.uk> References: <1456694706-911-1-git-send-email-sjoerd.simons@collabora.co.uk> Cc: Joe Hershberger , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v2 02/12] net: designware: Export various functions/struct to allow subclassing X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" To allow other DM drivers to subclass the designware driver various functions and structures need to be exported. Export these. Signed-off-by: Sjoerd Simons Reviewed-by: Bin Meng Acked-by: Simon Glass --- Changes in v2: None drivers/net/designware.c | 6 +++--- drivers/net/designware.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) -- 2.7.0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 14dd7b8..8834506 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -625,7 +625,7 @@ static int designware_eth_bind(struct udevice *dev) return 0; } -static int designware_eth_probe(struct udevice *dev) +int designware_eth_probe(struct udevice *dev) { struct eth_pdata *pdata = dev_get_platdata(dev); struct dw_eth_dev *priv = dev_get_priv(dev); @@ -673,7 +673,7 @@ static int designware_eth_remove(struct udevice *dev) return 0; } -static const struct eth_ops designware_eth_ops = { +const struct eth_ops designware_eth_ops = { .start = designware_eth_start, .send = designware_eth_send, .recv = designware_eth_recv, @@ -682,7 +682,7 @@ static const struct eth_ops designware_eth_ops = { .write_hwaddr = designware_eth_write_hwaddr, }; -static int designware_eth_ofdata_to_platdata(struct udevice *dev) +int designware_eth_ofdata_to_platdata(struct udevice *dev) { struct dw_eth_pdata *dw_pdata = dev_get_platdata(dev); struct dw_eth_dev *priv = dev_get_priv(dev); diff --git a/drivers/net/designware.h b/drivers/net/designware.h index 04a45e0..6b4bfd7 100644 --- a/drivers/net/designware.h +++ b/drivers/net/designware.h @@ -240,6 +240,10 @@ struct dw_eth_dev { }; #ifdef CONFIG_DM_ETH +int designware_eth_ofdata_to_platdata(struct udevice *dev); +int designware_eth_probe(struct udevice *dev); +extern const struct eth_ops designware_eth_ops; + struct dw_eth_pdata { struct eth_pdata eth_pdata; u32 reset_delays[3];