netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/5] ucc_geth: eliminate max-speed, change interface-type to phy-connection-type
@ 2007-05-11 23:25 Kim Phillips
  2007-05-15 21:45 ` Jeff Garzik
  0 siblings, 1 reply; 7+ messages in thread
From: Kim Phillips @ 2007-05-11 23:25 UTC (permalink / raw)
  To: Jeff Garzik, netdev

It was agreed that phy-connection-type was a better name for
the interface-type property, so this patch renames it.

Also, the max-speed property name was determined too generic,
and is therefore eliminated in favour of phy-connection-type
derivation logic.

includes corrections to copyright text.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
 drivers/net/ucc_geth.c     |   40 ++++++++++++++++------------------------
 drivers/net/ucc_geth_mii.c |    9 +++++----
 drivers/net/ucc_geth_mii.h |   10 +++++-----
 3 files changed, 26 insertions(+), 33 deletions(-)

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 0f66765..c2ccbd0 100644
--- a/drivers/net/ucc_geth.c
+++ b/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 <gridish@freescale.com>
  *	   Li Yang <leoli@freescale.com>
@@ -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/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c
index 27a1ef3..f96966d 100644
--- a/drivers/net/ucc_geth_mii.c
+++ b/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 <leoli@freescale.com>
+ *	    Kim Phillips <kim.phillips@freescale.com>
  *
  * 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/drivers/net/ucc_geth_mii.h b/drivers/net/ucc_geth_mii.h
index 98430fe..d834370 100644
--- a/drivers/net/ucc_geth_mii.h
+++ b/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 <leoli@freescale.com>
+ *	    Kim Phillips <kim.phillips@freescale.com>
  *
  * 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
-- 
1.5.0.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] ucc_geth: eliminate max-speed, change interface-type to phy-connection-type
  2007-05-11 23:25 [PATCH 3/5] ucc_geth: eliminate max-speed, change interface-type to phy-connection-type Kim Phillips
@ 2007-05-15 21:45 ` Jeff Garzik
  2007-05-15 22:26   ` Kim Phillips
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2007-05-15 21:45 UTC (permalink / raw)
  To: Kim Phillips; +Cc: netdev

Kim Phillips wrote:
> It was agreed that phy-connection-type was a better name for
> the interface-type property, so this patch renames it.
> 
> Also, the max-speed property name was determined too generic,
> and is therefore eliminated in favour of phy-connection-type
> derivation logic.
> 
> includes corrections to copyright text.
> 
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> ---
>  drivers/net/ucc_geth.c     |   40 ++++++++++++++++------------------------
>  drivers/net/ucc_geth_mii.c |    9 +++++----
>  drivers/net/ucc_geth_mii.h |   10 +++++-----
>  3 files changed, 26 insertions(+), 33 deletions(-)

applied to #upstream



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] ucc_geth: eliminate max-speed, change interface-type to phy-connection-type
  2007-05-15 21:45 ` Jeff Garzik
@ 2007-05-15 22:26   ` Kim Phillips
  2007-05-18  1:53     ` Jeff Garzik
  0 siblings, 1 reply; 7+ messages in thread
From: Kim Phillips @ 2007-05-15 22:26 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev

On Tue, 15 May 2007 17:45:19 -0400
Jeff Garzik <jeff@garzik.org> wrote:

> Kim Phillips wrote:
> > It was agreed that phy-connection-type was a better name for
> > the interface-type property, so this patch renames it.
> > 
> > Also, the max-speed property name was determined too generic,
> > and is therefore eliminated in favour of phy-connection-type
> > derivation logic.
> > 
> > includes corrections to copyright text.
> > 
> > Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> > ---
> >  drivers/net/ucc_geth.c     |   40 ++++++++++++++++------------------------
> >  drivers/net/ucc_geth_mii.c |    9 +++++----
> >  drivers/net/ucc_geth_mii.h |   10 +++++-----
> >  3 files changed, 26 insertions(+), 33 deletions(-)
> 
> applied to #upstream
> 
just to be clear; only the mpc8323e-mds board works on your current #upstream-{fixes,linus}.

The mpc8323e-rdb and mpc8360e-mds require

phylib: add the ICPlus IP175C PHY driver

and 

phylib: enable RGMII-ID on the Marvell m88e1111 PHY

respectively in order to work.

I'm ok with the SGMII patches:

phylib: m88e1111: enable SGMII mode
gianfar: add support for SGMII

staying on #upstream, but 2 out of 3 boards are currently broken for #upstream-{fixes,linus}.

Kim

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] ucc_geth: eliminate max-speed, change interface-type to phy-connection-type
  2007-05-15 22:26   ` Kim Phillips
@ 2007-05-18  1:53     ` Jeff Garzik
  2007-05-18 14:07       ` Kumar Gala
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Garzik @ 2007-05-18  1:53 UTC (permalink / raw)
  To: Kim Phillips; +Cc: netdev

Kim Phillips wrote:
> On Tue, 15 May 2007 17:45:19 -0400
> Jeff Garzik <jeff@garzik.org> wrote:
> 
>> Kim Phillips wrote:
>>> It was agreed that phy-connection-type was a better name for
>>> the interface-type property, so this patch renames it.
>>>
>>> Also, the max-speed property name was determined too generic,
>>> and is therefore eliminated in favour of phy-connection-type
>>> derivation logic.
>>>
>>> includes corrections to copyright text.
>>>
>>> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
>>> ---
>>>  drivers/net/ucc_geth.c     |   40 ++++++++++++++++------------------------
>>>  drivers/net/ucc_geth_mii.c |    9 +++++----
>>>  drivers/net/ucc_geth_mii.h |   10 +++++-----
>>>  3 files changed, 26 insertions(+), 33 deletions(-)
>> applied to #upstream
>>
> just to be clear; only the mpc8323e-mds board works on your current #upstream-{fixes,linus}.
> 
> The mpc8323e-rdb and mpc8360e-mds require
> 
> phylib: add the ICPlus IP175C PHY driver
> 
> and 
> 
> phylib: enable RGMII-ID on the Marvell m88e1111 PHY
> 
> respectively in order to work.
> 
> I'm ok with the SGMII patches:
> 
> phylib: m88e1111: enable SGMII mode
> gianfar: add support for SGMII
> 
> staying on #upstream, but 2 out of 3 boards are currently broken for #upstream-{fixes,linus}.

New hardware support is always "broken" until merged.  Nonetheless it is 
still new and outside the merge window.

	Jeff




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] ucc_geth: eliminate max-speed, change interface-type to phy-connection-type
  2007-05-18  1:53     ` Jeff Garzik
@ 2007-05-18 14:07       ` Kumar Gala
  2007-05-18 15:33         ` Kim Phillips
  0 siblings, 1 reply; 7+ messages in thread
From: Kumar Gala @ 2007-05-18 14:07 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Kim Phillips, netdev


On May 17, 2007, at 8:53 PM, Jeff Garzik wrote:

> Kim Phillips wrote:
>> On Tue, 15 May 2007 17:45:19 -0400
>> Jeff Garzik <jeff@garzik.org> wrote:
>>> Kim Phillips wrote:
>>>> It was agreed that phy-connection-type was a better name for
>>>> the interface-type property, so this patch renames it.
>>>>
>>>> Also, the max-speed property name was determined too generic,
>>>> and is therefore eliminated in favour of phy-connection-type
>>>> derivation logic.
>>>>
>>>> includes corrections to copyright text.
>>>>
>>>> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
>>>> ---
>>>>  drivers/net/ucc_geth.c     |   40 +++++++++++++++ 
>>>> +------------------------
>>>>  drivers/net/ucc_geth_mii.c |    9 +++++----
>>>>  drivers/net/ucc_geth_mii.h |   10 +++++-----
>>>>  3 files changed, 26 insertions(+), 33 deletions(-)
>>> applied to #upstream
>>>
>> just to be clear; only the mpc8323e-mds board works on your  
>> current #upstream-{fixes,linus}.
>> The mpc8323e-rdb and mpc8360e-mds require
>> phylib: add the ICPlus IP175C PHY driver
>> and phylib: enable RGMII-ID on the Marvell m88e1111 PHY
>> respectively in order to work.
>> I'm ok with the SGMII patches:
>> phylib: m88e1111: enable SGMII mode
>> gianfar: add support for SGMII
>> staying on #upstream, but 2 out of 3 boards are currently broken  
>> for #upstream-{fixes,linus}.
>
> New hardware support is always "broken" until merged.  Nonetheless  
> it is still new and outside the merge window.

I think new is a little relative here.  The MPC8232-RDB & MPC8360E- 
MDS boards worked with 2.6.21 and the UCC. They had support for the  
PHYs that Kim's listed built directly into the ucc driver and not as  
part of the phy lib.  Since we've moved to using the phy lib in  
2.6.22 we've broken these boards since their PHY drivers aren't  
currently in linus's tree.

Kim, correct me if I'm wrong.

- k

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] ucc_geth: eliminate max-speed, change interface-type to phy-connection-type
  2007-05-18 14:07       ` Kumar Gala
@ 2007-05-18 15:33         ` Kim Phillips
  2007-05-23 13:18           ` Kumar Gala
  0 siblings, 1 reply; 7+ messages in thread
From: Kim Phillips @ 2007-05-18 15:33 UTC (permalink / raw)
  To: Kumar Gala; +Cc: jeff, netdev

On Fri, 18 May 2007 09:07:42 -0500
Kumar Gala <galak@kernel.crashing.org> wrote:

> 
> On May 17, 2007, at 8:53 PM, Jeff Garzik wrote:
> 
> > Kim Phillips wrote:
> >> On Tue, 15 May 2007 17:45:19 -0400
> >> Jeff Garzik <jeff@garzik.org> wrote:
> >>> Kim Phillips wrote:
> >>>> It was agreed that phy-connection-type was a better name for
> >>>> the interface-type property, so this patch renames it.
> >>>>
> >>>> Also, the max-speed property name was determined too generic,
> >>>> and is therefore eliminated in favour of phy-connection-type
> >>>> derivation logic.
> >>>>
> >>>> includes corrections to copyright text.
> >>>>
> >>>> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> >>>> ---
> >>>>  drivers/net/ucc_geth.c     |   40 +++++++++++++++ 
> >>>> +------------------------
> >>>>  drivers/net/ucc_geth_mii.c |    9 +++++----
> >>>>  drivers/net/ucc_geth_mii.h |   10 +++++-----
> >>>>  3 files changed, 26 insertions(+), 33 deletions(-)
> >>> applied to #upstream
> >>>
> >> just to be clear; only the mpc8323e-mds board works on your  
> >> current #upstream-{fixes,linus}.
> >> The mpc8323e-rdb and mpc8360e-mds require
> >> phylib: add the ICPlus IP175C PHY driver
> >> and phylib: enable RGMII-ID on the Marvell m88e1111 PHY
> >> respectively in order to work.
> >> I'm ok with the SGMII patches:
> >> phylib: m88e1111: enable SGMII mode
> >> gianfar: add support for SGMII
> >> staying on #upstream, but 2 out of 3 boards are currently broken  
> >> for #upstream-{fixes,linus}.
> >
> > New hardware support is always "broken" until merged.  Nonetheless  
> > it is still new and outside the merge window.
> 
> I think new is a little relative here.  The MPC8232-RDB & MPC8360E- 
> MDS boards worked with 2.6.21 and the UCC. They had support for the  
> PHYs that Kim's listed built directly into the ucc driver and not as  
> part of the phy lib.  Since we've moved to using the phy lib in  
> 2.6.22 we've broken these boards since their PHY drivers aren't  
> currently in linus's tree.
> 
> Kim, correct me if I'm wrong.
> 

thanks for clarifying that - it is indeed the case.

Kim

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/5] ucc_geth: eliminate max-speed, change interface-type to phy-connection-type
  2007-05-18 15:33         ` Kim Phillips
@ 2007-05-23 13:18           ` Kumar Gala
  0 siblings, 0 replies; 7+ messages in thread
From: Kumar Gala @ 2007-05-23 13:18 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: netdev, Kim Phillips, Andrew Morton


On May 18, 2007, at 10:33 AM, Kim Phillips wrote:

> On Fri, 18 May 2007 09:07:42 -0500
> Kumar Gala <galak@kernel.crashing.org> wrote:
>
>>
>> On May 17, 2007, at 8:53 PM, Jeff Garzik wrote:
>>
>>> Kim Phillips wrote:
>>>> On Tue, 15 May 2007 17:45:19 -0400
>>>> Jeff Garzik <jeff@garzik.org> wrote:
>>>>> Kim Phillips wrote:
>>>>>> It was agreed that phy-connection-type was a better name for
>>>>>> the interface-type property, so this patch renames it.
>>>>>>
>>>>>> Also, the max-speed property name was determined too generic,
>>>>>> and is therefore eliminated in favour of phy-connection-type
>>>>>> derivation logic.
>>>>>>
>>>>>> includes corrections to copyright text.
>>>>>>
>>>>>> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
>>>>>> ---
>>>>>>  drivers/net/ucc_geth.c     |   40 +++++++++++++++
>>>>>> +------------------------
>>>>>>  drivers/net/ucc_geth_mii.c |    9 +++++----
>>>>>>  drivers/net/ucc_geth_mii.h |   10 +++++-----
>>>>>>  3 files changed, 26 insertions(+), 33 deletions(-)
>>>>> applied to #upstream
>>>>>
>>>> just to be clear; only the mpc8323e-mds board works on your
>>>> current #upstream-{fixes,linus}.
>>>> The mpc8323e-rdb and mpc8360e-mds require
>>>> phylib: add the ICPlus IP175C PHY driver
>>>> and phylib: enable RGMII-ID on the Marvell m88e1111 PHY
>>>> respectively in order to work.
>>>> I'm ok with the SGMII patches:
>>>> phylib: m88e1111: enable SGMII mode
>>>> gianfar: add support for SGMII
>>>> staying on #upstream, but 2 out of 3 boards are currently broken
>>>> for #upstream-{fixes,linus}.
>>>
>>> New hardware support is always "broken" until merged.  Nonetheless
>>> it is still new and outside the merge window.
>>
>> I think new is a little relative here.  The MPC8232-RDB & MPC8360E-
>> MDS boards worked with 2.6.21 and the UCC. They had support for the
>> PHYs that Kim's listed built directly into the ucc driver and not as
>> part of the phy lib.  Since we've moved to using the phy lib in
>> 2.6.22 we've broken these boards since their PHY drivers aren't
>> currently in linus's tree.
>>
>> Kim, correct me if I'm wrong.
>>
>
> thanks for clarifying that - it is indeed the case.

Jeff, any comments?

While I can see the view that the ICPlus & m88e1111 in RGMII may be  
"new" Kim did post these patches before the release of 2.6.21.

http://marc.info/?l=linux-netdev&m=117624199831578&w=2
http://marc.info/?l=linux-netdev&m=117624199831578&w=2

And I believe its our normal stance to not introduce regressions  
between kernel versions when possible.  It would be appreciated if  
you could push the two patches Kim has referenced to linus for 2.6.22  
otherwise we've created a regression in supporting the MPC8323 RDB &  
MPC8360 MDS boards.

thanks

- k


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-05-23 13:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-11 23:25 [PATCH 3/5] ucc_geth: eliminate max-speed, change interface-type to phy-connection-type Kim Phillips
2007-05-15 21:45 ` Jeff Garzik
2007-05-15 22:26   ` Kim Phillips
2007-05-18  1:53     ` Jeff Garzik
2007-05-18 14:07       ` Kumar Gala
2007-05-18 15:33         ` Kim Phillips
2007-05-23 13:18           ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).