aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-05-22 12:47:51 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-22 15:16:44 -0400
commit1f8c486fac2cab3615c2872c4ba4bffc1c2ea93c (patch)
tree2093e6cb47d33d4c3172ad911d29f61a9cc9f987
parentea3429c77d4e34cb2983b90e49a5506fedf70b98 (diff)
powerpc/fsl: fsl_soc: remove 'fixed-link' parsing code
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 <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c32
1 files changed, 0 insertions, 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 @@
25#include <linux/of.h> 25#include <linux/of.h>
26#include <linux/of_platform.h> 26#include <linux/of_platform.h>
27#include <linux/phy.h> 27#include <linux/phy.h>
28#include <linux/phy_fixed.h>
29#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
30#include <linux/fsl_devices.h> 29#include <linux/fsl_devices.h>
31#include <linux/fs_enet_pd.h> 30#include <linux/fs_enet_pd.h>
@@ -178,37 +177,6 @@ u32 get_baudrate(void)
178EXPORT_SYMBOL(get_baudrate); 177EXPORT_SYMBOL(get_baudrate);
179#endif /* CONFIG_CPM2 */ 178#endif /* CONFIG_CPM2 */
180 179
181#ifdef CONFIG_FIXED_PHY
182static int __init of_add_fixed_phys(void)
183{
184 int ret;
185 struct device_node *np;
186 u32 *fixed_link;
187 struct fixed_phy_status status = {};
188
189 for_each_node_by_name(np, "ethernet") {
190 fixed_link = (u32 *)of_get_property(np, "fixed-link", NULL);
191 if (!fixed_link)
192 continue;
193
194 status.link = 1;
195 status.duplex = fixed_link[1];
196 status.speed = fixed_link[2];
197 status.pause = fixed_link[3];
198 status.asym_pause = fixed_link[4];
199
200 ret = fixed_phy_add(PHY_POLL, fixed_link[0], &status);
201 if (ret) {
202 of_node_put(np);
203 return ret;
204 }
205 }
206
207 return 0;
208}
209arch_initcall(of_add_fixed_phys);
210#endif /* CONFIG_FIXED_PHY */
211
212#if defined(CONFIG_FSL_SOC_BOOKE) || defined(CONFIG_PPC_86xx) 180#if defined(CONFIG_FSL_SOC_BOOKE) || defined(CONFIG_PPC_86xx)
213static __be32 __iomem *rstcr; 181static __be32 __iomem *rstcr;
214 182