From patchwork Sun Nov 27 17:01:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 84334 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp830336qgi; Sun, 27 Nov 2016 09:06:21 -0800 (PST) X-Received: by 10.194.221.4 with SMTP id qa4mr18102724wjc.179.1480266381324; Sun, 27 Nov 2016 09:06:21 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id gr7si51210116wjb.113.2016.11.27.09.06.21; Sun, 27 Nov 2016 09:06:21 -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; dkim=neutral (body hash did not verify) header.i=@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=chromium.org Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0DC7B38F2; Sun, 27 Nov 2016 18:05:07 +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 VYs-IbWGfwBa; Sun, 27 Nov 2016 18:05:07 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DD640B38AD; Sun, 27 Nov 2016 18:04:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8A327A7581 for ; Sun, 27 Nov 2016 18:04:51 +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 tlp-Bthvx1wU for ; Sun, 27 Nov 2016 18:04:51 +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 mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by theia.denx.de (Postfix) with ESMTPS id D94D2A7597 for ; Sun, 27 Nov 2016 18:04:47 +0100 (CET) Received: by mail-oi0-f50.google.com with SMTP id w63so127334180oiw.0 for ; Sun, 27 Nov 2016 09:04:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=kyT8iuFu+1CTx/qPplw+TUOXPW0p3ln7LgjcqcMrLDQ=; b=Df4gjWveE6b/DNmzqT7MHG9F+MgQ/IOMNNHMHrzPzB+dLWt0VmKxyvFTG6iq5qMVW7 8454fNPzGh1JGpRYcyGcJ6414hpRMMX/Rzn6Bbz1paiKYNDnGPiMaePKAed3N1ugLGgJ 35Xu0f+nHibhdf0VfTMZabjZqA0chKjhoY75H2woVleyQTYqUHf87fJM5JeorGvuGQzO bPfFtwIrt8Z0bkpeS3/alLdyyFHhEmPWSl96gstvwqOexh7boYPV0BBYC5FAlWhS+2YF YGQUHrtHhO4XbZDVc33TD79iXKF1fgF/tat5f3Bbl8Y45TO4QQZTZ+267zXuXpS/liaR 5rFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=kyT8iuFu+1CTx/qPplw+TUOXPW0p3ln7LgjcqcMrLDQ=; b=Ct9q9MbZvmPXDNcmaj5FH6+FnEAhBw3nWh6Y2YHU58XG3HHMSkj9OLKkHElG0Kmyhb 2gJ2wG3hPesnKo/McsMnfgIJH8a5cselhnLpwQP/9OPzysGIl2xV9TgxQAmciC5d50wx /ELvQA9MMX/uDrLjiepnBZyhU+d3f7k4GzlB6pyEkAMLX4Ez+1Ty+7KNrB1RaJYTzUZl ZfHjfir4Fd2pBv0trfZywfdXOsFdjahMINDRM65qhUF8mrVO+bgHSS4aXSkfhM4Vzqms zFEPWSWnzBJu6bNo8JyRJpwqScmeg2RvifWwYDBA3+qKVIIcUPpn3RTLswp48cWx880N enHQ== X-Gm-Message-State: AKaTC03cdekBelog8djCfsuTq3JCYH8Qnvu3NWR6bJA39HIhBdt5dWD1qfz7h5PaRYgb/AHL X-Received: by 10.202.88.2 with SMTP id m2mr8619068oib.27.1480266285865; Sun, 27 Nov 2016 09:04:45 -0800 (PST) Received: from kaki.bld.corp.google.com ([100.100.197.48]) by smtp.gmail.com with ESMTPSA id u68sm16230257oie.5.2016.11.27.09.04.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Nov 2016 09:04:45 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id C4611404C1; Sun, 27 Nov 2016 10:04:44 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Sun, 27 Nov 2016 10:01:41 -0700 Message-Id: <1480266109-7209-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1480266109-7209-1-git-send-email-sjg@chromium.org> References: <1480266109-7209-1-git-send-email-sjg@chromium.org> Cc: Joe Hershberger , Jeffy Chen , huang lin Subject: [U-Boot] [PATCH v3 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 Reviewed-by: Bin Meng Acked-by: Simon Glass Signed-off-by: Simon Glass --- 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.8.0.rc3.226.g39d4020 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot Acked-by: Joe Hershberger 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];