From patchwork Tue May 20 00:56:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 350459 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 433A414008B for ; Tue, 20 May 2014 11:03:15 +1000 (EST) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 2F5CF1A10E0 for ; Tue, 20 May 2014 11:03:15 +1000 (EST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-yh0-x229.google.com (mail-yh0-x229.google.com [IPv6:2607:f8b0:4002:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id CFF541A0870 for ; Tue, 20 May 2014 10:57:30 +1000 (EST) Received: by mail-yh0-f41.google.com with SMTP id f73so7648093yha.28 for ; Mon, 19 May 2014 17:57:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tFCTTFhP0GLqQy/FC/VtJrnP/SRrKh0x6TumREW4+4Q=; b=xdgsWARcHkzfeCVEN9bvCmPvEvBWlU4RIJ+siKDqehxB6au/zSraiTvapge5GEkXmy 9GkLg1UjW1cFiA4vjGR+AUnX515N6PKQQDZJ5Wakd/8Fpr+tlRE90tmlm9oLK09m/8DF gj9c7U79L/b0Zk3NcmpcROmrR8mNCmIxnPOrdDEP2IhX2AQ4woKzousc5mtyeBbETELy suZs09haJ1f0uG14j8eC3yTYq+SytPhVVSomw5DLxuu2Bl0mzBXiar7VwZIr5/+uv8aO C9bPeR++ktpVqzm7EL8QfWnQhXF4Ui+HSXaBMES3YoFtJfTJQCyrCVmoTt9be1rduiRL KQEw== X-Received: by 10.236.39.133 with SMTP id d5mr27792472yhb.43.1400547447782; Mon, 19 May 2014 17:57:27 -0700 (PDT) Received: from fainelli-desktop.broadcom.com (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPSA id f2sm27506075yhc.41.2014.05.19.17.57.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 May 2014 17:57:27 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Subject: [PATCH net-next 8/9] of: mdio: remove of_phy_connect_fixed_link Date: Mon, 19 May 2014 17:56:23 -0700 Message-Id: <1400547384-11363-9-git-send-email-f.fainelli@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1400547384-11363-1-git-send-email-f.fainelli@gmail.com> References: <1400547384-11363-1-git-send-email-f.fainelli@gmail.com> Cc: Mark Rutland , "open list:DOCUMENTATION" , Paul Mackerras , Florian Fainelli , Claudiu Manoil , Grant Likely , "open list:OPEN FIRMWARE AND..." , Pawel Moll , Ian Campbell , Richard Cochran , Rob Herring , Aida Mynzhasova , Thomas Petazzoni , Sergei Shtylyov , Randy Dunlap , open list , davem@davemlof.net, Vitaly Bordug , Kumar Gala , "open list:LINUX FOR POWERPC..." , "David S. Miller" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" All in-tree drivers have been converted to use the new pair of functions: of_is_fixed_phy_link() plus of_phy_register_fixed_link(), we can now safely remove of_phy_connect_fixed_link. Signed-off-by: Florian Fainelli --- drivers/of/of_mdio.c | 38 -------------------------------------- include/linux/of_mdio.h | 10 ---------- 2 files changed, 48 deletions(-) diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index 1def0bb5cb37..4c1e01ed16dc 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -246,44 +246,6 @@ struct phy_device *of_phy_connect(struct net_device *dev, EXPORT_SYMBOL(of_phy_connect); /** - * of_phy_connect_fixed_link - Parse fixed-link property and return a dummy phy - * @dev: pointer to net_device claiming the phy - * @hndlr: Link state callback for the network device - * @iface: PHY data interface type - * - * This function is a temporary stop-gap and will be removed soon. It is - * only to support the fs_enet, ucc_geth and gianfar Ethernet drivers. Do - * not call this function from new drivers. - */ -struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, - void (*hndlr)(struct net_device *), - phy_interface_t iface) -{ - struct device_node *net_np; - char bus_id[MII_BUS_ID_SIZE + 3]; - struct phy_device *phy; - const __be32 *phy_id; - int sz; - - if (!dev->dev.parent) - return NULL; - - net_np = dev->dev.parent->of_node; - if (!net_np) - return NULL; - - phy_id = of_get_property(net_np, "fixed-link", &sz); - if (!phy_id || sz < sizeof(*phy_id)) - return NULL; - - sprintf(bus_id, PHY_ID_FMT, "fixed-0", be32_to_cpu(phy_id[0])); - - phy = phy_connect(dev, bus_id, hndlr, iface); - return IS_ERR(phy) ? NULL : phy; -} -EXPORT_SYMBOL(of_phy_connect_fixed_link); - -/** * of_phy_attach - Attach to a PHY without starting the state machine * @dev: pointer to net_device claiming the phy * @phy_np: Node pointer for the PHY diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h index 0aa367e316cb..d449018d0726 100644 --- a/include/linux/of_mdio.h +++ b/include/linux/of_mdio.h @@ -22,9 +22,6 @@ extern struct phy_device *of_phy_connect(struct net_device *dev, struct phy_device *of_phy_attach(struct net_device *dev, struct device_node *phy_np, u32 flags, phy_interface_t iface); -extern struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, - void (*hndlr)(struct net_device *), - phy_interface_t iface); extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); @@ -59,13 +56,6 @@ static inline struct phy_device *of_phy_attach(struct net_device *dev, return NULL; } -static inline struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, - void (*hndlr)(struct net_device *), - phy_interface_t iface) -{ - return NULL; -} - static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) { return NULL;