From 2f90f33d59f7a26765050c701a2833a17cee027c Mon Sep 17 00:00:00 2001 From: Kim Phillips Date: Fri, 11 May 2007 18:25:07 -0500 Subject: [PATCH] --- yaml --- r: 56429 b: refs/heads/master c: 4e19b5c193454ade8d86468077078f680d121979 h: refs/heads/master i: 56427: 37ce92a1b1e6d513f2dff9a5020269e8babe746e v: v3 --- [refs] | 2 +- trunk/drivers/net/ucc_geth.c | 40 +++++++++++++------------------- trunk/drivers/net/ucc_geth_mii.c | 9 +++---- trunk/drivers/net/ucc_geth_mii.h | 10 ++++---- 4 files changed, 27 insertions(+), 34 deletions(-) diff --git a/[refs] b/[refs] index db046e2e6987..642014183bdb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f2773a29596d835d2b00137ba925c186699ea117 +refs/heads/master: 4e19b5c193454ade8d86468077078f680d121979 diff --git a/trunk/drivers/net/ucc_geth.c b/trunk/drivers/net/ucc_geth.c index 0f667652fda9..c2ccbd098f53 100644 --- a/trunk/drivers/net/ucc_geth.c +++ b/trunk/drivers/net/ucc_geth.c @@ -1,5 +1,5 @@ /* - * Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. + * Copyright (C) 2006-2007 Freescale Semicondutor, Inc. All rights reserved. * * Author: Shlomi Gridish * Li Yang @@ -3737,21 +3737,21 @@ static int ucc_geth_close(struct net_device *dev) const struct ethtool_ops ucc_geth_ethtool_ops = { }; -static phy_interface_t to_phy_interface(const char *interface_type) +static phy_interface_t to_phy_interface(const char *phy_connection_type) { - if (strcasecmp(interface_type, "mii") == 0) + if (strcasecmp(phy_connection_type, "mii") == 0) return PHY_INTERFACE_MODE_MII; - if (strcasecmp(interface_type, "gmii") == 0) + if (strcasecmp(phy_connection_type, "gmii") == 0) return PHY_INTERFACE_MODE_GMII; - if (strcasecmp(interface_type, "tbi") == 0) + if (strcasecmp(phy_connection_type, "tbi") == 0) return PHY_INTERFACE_MODE_TBI; - if (strcasecmp(interface_type, "rmii") == 0) + if (strcasecmp(phy_connection_type, "rmii") == 0) return PHY_INTERFACE_MODE_RMII; - if (strcasecmp(interface_type, "rgmii") == 0) + if (strcasecmp(phy_connection_type, "rgmii") == 0) return PHY_INTERFACE_MODE_RGMII; - if (strcasecmp(interface_type, "rgmii-id") == 0) + if (strcasecmp(phy_connection_type, "rgmii-id") == 0) return PHY_INTERFACE_MODE_RGMII_ID; - if (strcasecmp(interface_type, "rtbi") == 0) + if (strcasecmp(phy_connection_type, "rtbi") == 0) return PHY_INTERFACE_MODE_RTBI; return PHY_INTERFACE_MODE_MII; @@ -3819,29 +3819,21 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ug_info->phy_address = *prop; /* get the phy interface type, or default to MII */ - prop = of_get_property(np, "interface-type", NULL); + prop = of_get_property(np, "phy-connection-type", NULL); if (!prop) { /* handle interface property present in old trees */ prop = of_get_property(phy, "interface", NULL); - if (prop != NULL) + if (prop != NULL) { phy_interface = enet_to_phy_interface[*prop]; - else + max_speed = enet_to_speed[*prop]; + } else phy_interface = PHY_INTERFACE_MODE_MII; } else { phy_interface = to_phy_interface((const char *)prop); } - /* get speed, or derive from interface */ - prop = of_get_property(np, "max-speed", NULL); - if (!prop) { - /* handle interface property present in old trees */ - prop = of_get_property(phy, "interface", NULL); - if (prop != NULL) - max_speed = enet_to_speed[*prop]; - } else { - max_speed = *prop; - } - if (!max_speed) { + /* get speed, or derive from PHY interface */ + if (max_speed == 0) switch (phy_interface) { case PHY_INTERFACE_MODE_GMII: case PHY_INTERFACE_MODE_RGMII: @@ -3854,9 +3846,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma max_speed = SPEED_100; break; } - } if (max_speed == SPEED_1000) { + /* configure muram FIFOs for gigabit operation */ ug_info->uf_info.urfs = UCC_GETH_URFS_GIGA_INIT; ug_info->uf_info.urfet = UCC_GETH_URFET_GIGA_INIT; ug_info->uf_info.urfset = UCC_GETH_URFSET_GIGA_INIT; diff --git a/trunk/drivers/net/ucc_geth_mii.c b/trunk/drivers/net/ucc_geth_mii.c index 27a1ef3b7b06..f96966d4bcc2 100644 --- a/trunk/drivers/net/ucc_geth_mii.c +++ b/trunk/drivers/net/ucc_geth_mii.c @@ -1,12 +1,13 @@ /* * drivers/net/ucc_geth_mii.c * - * Gianfar Ethernet Driver -- MIIM bus implementation - * Provides Bus interface for MIIM regs + * QE UCC Gigabit Ethernet Driver -- MII Management Bus Implementation + * Provides Bus interface for MII Management regs in the UCC register space * - * Author: Li Yang + * Copyright (C) 2007 Freescale Semiconductor, Inc. * - * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. + * Authors: Li Yang + * Kim Phillips * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/trunk/drivers/net/ucc_geth_mii.h b/trunk/drivers/net/ucc_geth_mii.h index 98430fe0bfc6..d83437039919 100644 --- a/trunk/drivers/net/ucc_geth_mii.h +++ b/trunk/drivers/net/ucc_geth_mii.h @@ -1,13 +1,13 @@ /* * drivers/net/ucc_geth_mii.h * - * Gianfar Ethernet Driver -- MII Management Bus Implementation - * Driver for the MDIO bus controller in the Gianfar register space + * QE UCC Gigabit Ethernet Driver -- MII Management Bus Implementation + * Provides Bus interface for MII Management regs in the UCC register space * - * Author: Andy Fleming - * Maintainer: Kumar Gala + * Copyright (C) 2007 Freescale Semiconductor, Inc. * - * Copyright (c) 2002-2004 Freescale Semiconductor, Inc. + * Authors: Li Yang + * Kim Phillips * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the