From patchwork Tue May 20 00:56:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 350460 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 6C0CE14008F for ; Tue, 20 May 2014 11:03:53 +1000 (EST) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 4037F1A1048 for ; Tue, 20 May 2014 11:03:53 +1000 (EST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-yk0-x22c.google.com (mail-yk0-x22c.google.com [IPv6:2607:f8b0:4002:c07::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 95A311A092A for ; Tue, 20 May 2014 10:57:34 +1000 (EST) Received: by mail-yk0-f172.google.com with SMTP id 79so5178040ykr.31 for ; Mon, 19 May 2014 17:57:31 -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=FOCT4jWY1z3nTw6NsF+SvoW2vFQgK7UOnXg8CMpMGbI=; b=ROpIv4ISieYYJtrRogGvsKs+OjcPvjpEpBVvmrLllbmXscwskRR7JI7l5eo8ka1j2O vE65v8jC6yN9nMJlwG8r5txNUslsJ1omw/h4Ulkf61dhTMfoL8kttVKKRMqersIoFUkz ajPQ1hpFUIY05iURLqJ97a/ay5c7wpwU/ccFMqjI0Yr5gKBd8kCxwJxjAMRsFEm54cd2 P8UHd5s6X/Hb/F4VwEbW5zomjLm+WHkpkvqfC7HPtUfCpBzhJHpddH2AVYrXNZNzLqmJ jnGoD4yFXs8dGiqAMIUE8L0E3YK9xsEHGKw60XkO3ZAbfYEPVupNvDunQT+GC7Gge15Z 9GzA== X-Received: by 10.236.172.170 with SMTP id t30mr9728408yhl.136.1400547451312; Mon, 19 May 2014 17:57:31 -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.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 May 2014 17:57:30 -0700 (PDT) From: Florian Fainelli To: netdev@vger.kernel.org Subject: [PATCH net-next 9/9] powerpc/fsl: fsl_soc: remove 'fixed-link' parsing code Date: Mon, 19 May 2014 17:56:24 -0700 Message-Id: <1400547384-11363-10-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" Parsing and registration of fixed PHY devices was needed with the use of of_phy_connect_fixed_link() because this function was using the designated PHY address identifier (first cell of the property) as the address to bind the PHY on the emulated bus. Since commit 3be2a49e5c08d268f8af0dd4fe89a24ea8cdc339 ("of: provide a binding for fixed link PHYs") a new pair of functions has been introduced which allows for dynamic address allocation of these fixed PHY devices, but also parses the old 'fixed-link' 5-digit property. Registration of fixed PHY early in platform code was needed because we could not issue a fixed MDIO bus re-scan within network drivers. The fixed PHYs had to be registered before the network drivers would call of_phy_connect_fixed_link(). All of these caveats are solved now, such that we can safely remove of_add_fixed_phys() now. Signed-off-by: Florian Fainelli --- arch/powerpc/sysdev/fsl_soc.c | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 228cf91b91c1..ffd1169ebaab 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -178,37 +177,6 @@ u32 get_baudrate(void) EXPORT_SYMBOL(get_baudrate); #endif /* CONFIG_CPM2 */ -#ifdef CONFIG_FIXED_PHY -static int __init of_add_fixed_phys(void) -{ - int ret; - struct device_node *np; - u32 *fixed_link; - struct fixed_phy_status status = {}; - - for_each_node_by_name(np, "ethernet") { - fixed_link = (u32 *)of_get_property(np, "fixed-link", NULL); - if (!fixed_link) - continue; - - status.link = 1; - status.duplex = fixed_link[1]; - status.speed = fixed_link[2]; - status.pause = fixed_link[3]; - status.asym_pause = fixed_link[4]; - - ret = fixed_phy_add(PHY_POLL, fixed_link[0], &status); - if (ret) { - of_node_put(np); - return ret; - } - } - - return 0; -} -arch_initcall(of_add_fixed_phys); -#endif /* CONFIG_FIXED_PHY */ - #if defined(CONFIG_FSL_SOC_BOOKE) || defined(CONFIG_PPC_86xx) static __be32 __iomem *rstcr;