From patchwork Sat Dec 3 05:06:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 86406 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp571069qgi; Fri, 2 Dec 2016 21:06:40 -0800 (PST) X-Received: by 10.28.170.202 with SMTP id t193mr496910wme.10.1480741600873; Fri, 02 Dec 2016 21:06:40 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id jt9si7764748wjb.163.2016.12.02.21.06.40; Fri, 02 Dec 2016 21:06:40 -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 95692B3858; Sat, 3 Dec 2016 06:06:37 +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 Txhhg6E3yRdP; Sat, 3 Dec 2016 06:06:37 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1022CB385B; Sat, 3 Dec 2016 06:06:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 11AA6A75E1 for ; Sat, 3 Dec 2016 06:06: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 BeWi_JpSy_RD for ; Sat, 3 Dec 2016 06:06:25 +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-f41.google.com (mail-oi0-f41.google.com [209.85.218.41]) by theia.denx.de (Postfix) with ESMTPS id 9D7BFA75CD for ; Sat, 3 Dec 2016 06:06:20 +0100 (CET) Received: by mail-oi0-f41.google.com with SMTP id y198so289021097oia.1 for ; Fri, 02 Dec 2016 21:06:20 -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=ykl6oYoy9KF5jY5sjhCMwMATPxBTmYWXGKBTX/xqJ0A=; b=jxXozMXqv0O7t1PVXNUS3trfL10VQB/eTV0clt+aNfgnhMrAo0WhNzq1IguDTAV0+O /M/7acPkNy9iInoTppfZgL+gy7Pc3qzRoLhMl88aSY7FotPwFpS8nqmFNZgXl6ZycZUF JLmvg8nY1pHmgSkdrnf4Y+SqReMhReqTHVzFZ04gKExxm5gEwB2oMqWGmSDxvtxOWtg1 7OTb0wzx1tPI2QTEOUvv1D+V0SLHD2WT2XZiNC8yYbg66uxTY3Vsii7kl3dmwHNy6y7m XBXDUnzJ9Czesn9Ur7aeFEkv4dsEaY6j+/78WMrR0A42FA2Dy2OXqF5IHwARFNYr9t2o MNXg== 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=ykl6oYoy9KF5jY5sjhCMwMATPxBTmYWXGKBTX/xqJ0A=; b=U/HSIKFjhdz8TpNaz5k6XvNcYjscn7Wst80tc5etNOXRb6l4iMrQey78iNLb1FEgaX OKbFBauIF6GhaM2lMwZbThu8E+zso44AzthyVZhwyKMsITIb8ajFcK0KSzTV3ReyYJKF P0vcWRun0czTUBHvibxuSIMVMFSqevxz65GLfQxovOU2oz1q0ht3HRcRv3qlql9+xxOY N1fIKjGt0bOUupDcKJir4nFSlUo/HJs8f4uv9043+bNEAZQ/I4RwtD2GaT+5LljeVc5Z YihiD0CteZlRda4cwUptXl9saIViqW2adfXWMqZdCqGBKITA9IZ/adV/azlFOJ3WTraF FLgA== X-Gm-Message-State: AKaTC004gP5z4X3CJBn9uwJGS7/oAfd1yx6AEPiGZVU5wfNnF9l4/7DUJfCEARgTHoZBRKha X-Received: by 10.157.10.47 with SMTP id 44mr24437266otg.222.1480741579298; Fri, 02 Dec 2016 21:06:19 -0800 (PST) Received: from kaki.bld.corp.google.com ([100.100.197.48]) by smtp.gmail.com with ESMTPSA id g22sm2773813oib.17.2016.12.02.21.06.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Dec 2016 21:06:18 -0800 (PST) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id CB2F9428B4; Fri, 2 Dec 2016 22:06:17 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Fri, 2 Dec 2016 22:06:04 -0700 Message-Id: <1480741572-13582-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1480741572-13582-1-git-send-email-sjg@chromium.org> References: <1480741572-13582-1-git-send-email-sjg@chromium.org> Cc: Joe Hershberger , Jeffy Chen , huang lin Subject: [U-Boot] [PATCH v4 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 Acked-by: Joe Hershberger Signed-off-by: Simon Glass --- 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.8.0.rc3.226.g39d4020 _______________________________________________ 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];