From patchwork Mon Nov 26 14:30:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yegor Yefremov X-Patchwork-Id: 201708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 052572C0084 for ; Tue, 27 Nov 2012 02:17:59 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3AFDE4A2B8; Mon, 26 Nov 2012 16:17:28 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 54sY+MgJ5ZFM; Mon, 26 Nov 2012 16:17:28 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0124F4A2BB; Mon, 26 Nov 2012 16:17:11 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 394A64A2AB for ; Mon, 26 Nov 2012 15:31:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 k4IRqX6BDQlS for ; Mon, 26 Nov 2012 15:31:11 +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-ea0-f172.google.com (mail-ea0-f172.google.com [209.85.215.172]) by theia.denx.de (Postfix) with ESMTPS id 9EB6D4A2A3 for ; Mon, 26 Nov 2012 15:31:08 +0100 (CET) Received: by mail-ea0-f172.google.com with SMTP id a1so4092194eaa.3 for ; Mon, 26 Nov 2012 06:31:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=9Y7o4yHT8D6SxNS1KGLB3WY73vIt7sImonAegh6bbpk=; b=TTP4MRL3OhZF7RbRuheGvhek7X3IQ6wsCZtsNggjodTTQBhOyEm93/SvgaE0kw2WO/ rZODozKam5zIIo38fySjorU6bZRUzyTSqiJfWL3SKU1PFgCKKd3rRRrINJpApuPMpfPV exA0/Bm7FrSUMQXYs0kW5qhPe/INSTm41grUCE1KPHTU1YhmNBo/SWd7QdOf0WRclV9f q2ekGgdTsb82aOgwdnW6Lx+aE12Wyx5Dqupdwp1N6CUikxWUYDvS5/TcAjbdO+JUU/k3 ElcpGNOLkS1tSqLLIMNhnv/8ecShmfCaBPH0tnhX/RrGevJvKa9CR1J8kmqqQh6S4du8 kzQw== Received: by 10.14.203.132 with SMTP id f4mr46366883eeo.11.1353940264811; Mon, 26 Nov 2012 06:31:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.45.5 with HTTP; Mon, 26 Nov 2012 06:30:44 -0800 (PST) From: Yegor Yefremov Date: Mon, 26 Nov 2012 15:30:44 +0100 Message-ID: To: u-boot@lists.denx.de X-Mailman-Approved-At: Mon, 26 Nov 2012 16:17:06 +0100 Subject: [U-Boot] [RFC] export genphy_parse_link() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de I'm porting a phy driver from Linux to u-boot and was able to use genphy_parse_link() without a problem. As mentioned in comment to genphy_parse_link(), the routine itself was taken from Linux kernel and many phy drivers are using this generic function. Why wasn't it exported? Are there any issues? Regards, Yegor From c20576e3ddbf92e68837238a2aef9c6c83c6fea2 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Mon, 26 Nov 2012 15:25:55 +0100 Subject: [PATCH] phy: export genphy_parse_link() Signed-off-by: Yegor Yefremov --- drivers/net/phy/phy.c | 2 +- include/phy.h | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) -- 1.7.7 diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 1ffa791..c28ea70 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -279,7 +279,7 @@ int genphy_update_link(struct phy_device *phydev) * * Stolen from Linux's mii.c and phy_device.c */ -static int genphy_parse_link(struct phy_device *phydev) +int genphy_parse_link(struct phy_device *phydev) { int mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR); diff --git a/include/phy.h b/include/phy.h index 3c30f11..1342ef7 100644 --- a/include/phy.h +++ b/include/phy.h @@ -209,6 +209,7 @@ int phy_register(struct phy_driver *drv); int genphy_config_aneg(struct phy_device *phydev); int genphy_restart_aneg(struct phy_device *phydev); int genphy_update_link(struct phy_device *phydev); +int genphy_parse_link(struct phy_device *phydev); int genphy_config(struct phy_device *phydev); int genphy_startup(struct phy_device *phydev); int genphy_shutdown(struct phy_device *phydev);