From patchwork Thu Jan 5 08:16:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 90003 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp8950815qgi; Thu, 5 Jan 2017 04:49:35 -0800 (PST) X-Received: by 10.194.141.77 with SMTP id rm13mr4594575wjb.47.1483620575227; Thu, 05 Jan 2017 04:49:35 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id q9si85242313wjl.255.2017.01.05.04.49.34; Thu, 05 Jan 2017 04:49: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; dmarc=fail (p=NONE dis=NONE) header.from=collabora.com Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E8386B3923; Thu, 5 Jan 2017 13:48:25 +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 V_djxMtFJqHe; Thu, 5 Jan 2017 13:48:25 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6BA6DB3930; Thu, 5 Jan 2017 13:47:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 68B46A760C for ; Thu, 5 Jan 2017 09:16:41 +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 6y2xMn1jbXmV for ; Thu, 5 Jan 2017 09:16:41 +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 26472A75FB for ; Thu, 5 Jan 2017 09:16:40 +0100 (CET) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: rperier) with ESMTPSA id CA0A1265BFB From: Romain Perier To: Simon Glass Date: Thu, 5 Jan 2017 09:16:16 +0100 Message-Id: <20170105081624.11398-2-romain.perier@collabora.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170105081624.11398-1-romain.perier@collabora.com> References: <20170105081624.11398-1-romain.perier@collabora.com> X-Mailman-Approved-At: Thu, 05 Jan 2017 13:47:00 +0100 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH v6 1/9] 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 v6: - Acked-by -> Signed-off-by for Romain Changes in v5: - Added Acked-by for Romain Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/designware.c | 6 +++--- drivers/net/designware.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) -- 2.11.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 9e6d726184..6ef36bc8cb 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 d345c5b0c3..087ebef297 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];