From patchwork Wed Jan 11 10:46:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 90882 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1108733qgi; Wed, 11 Jan 2017 05:02:08 -0800 (PST) X-Received: by 10.28.72.3 with SMTP id v3mr3452688wma.20.1484139728647; Wed, 11 Jan 2017 05:02:08 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id c27si4348162wra.304.2017.01.11.05.02.08; Wed, 11 Jan 2017 05:02:08 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A6107B3929; Wed, 11 Jan 2017 14:02:06 +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 iOXzZuKVUaWx; Wed, 11 Jan 2017 14:02:06 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 66F4EB389C; Wed, 11 Jan 2017 14:01:58 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 58F31A7624 for ; Wed, 11 Jan 2017 11:55:45 +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 9Nl9FudVhvkh for ; Wed, 11 Jan 2017 11:55:45 +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 06D90A75E9 for ; Wed, 11 Jan 2017 11:55:42 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: rperier) with ESMTPSA id 1AD1D264406 From: Romain Perier To: Simon Glass Date: Wed, 11 Jan 2017 11:46:07 +0100 Message-Id: <20170111104617.29915-2-romain.perier@collabora.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170111104617.29915-1-romain.perier@collabora.com> References: <20170111104617.29915-1-romain.perier@collabora.com> X-Mailman-Approved-At: Wed, 11 Jan 2017 14:01:51 +0100 Cc: Romain Perier , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v7 01/11] 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" From: Sjoerd Simons 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 Signed-off-by: Romain Perier Reviewed-by: Bin Meng Acked-by: Simon Glass Acked-by: Joe Hershberger --- Changes in v7: NONE Changes in v6: - Acked-by -> Signed-off-by for Romain Changes in v5: - Added Acked-by for Romain drivers/net/designware.c | 6 +++--- drivers/net/designware.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) -- 2.9.3 _______________________________________________ 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 9e6d726..6ef36bc 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -628,7 +628,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); @@ -678,7 +678,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, @@ -687,7 +687,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); #ifdef CONFIG_DM_GPIO diff --git a/drivers/net/designware.h b/drivers/net/designware.h index d345c5b..087ebef 100644 --- a/drivers/net/designware.h +++ b/drivers/net/designware.h @@ -245,6 +245,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];