Revert and reimplement Add SGMII support to UCC GETH
Subsystems (4)
cover Revert and reimplement Add SGMII support to UCC GETH
(REPOST; I messed up an email address first time around and apparently my posting got rejected. If you've already received this message, then I apologize for the noise)
Here is a fix for the build failure discovered during the 2.6.31 merge window on ucc_geth.c. I decided to revert and reapply a fixed version of the patch to make the new version easier to review and bisect if I got the fixup wrong. I've compile tested both patches, but I do not have hardware to run test.
Haiying, please confirm that I haven't horribly trashed your hard work with my changes.
For anyone interested, I've also pushed these patches out to the -next-net branch of my git tree:
The following changes since commit 65795efbd380a832ae508b04dba8f8e53f0b84d9:
Linus Torvalds (1):
Merge branch 'next-i2c' of git://aeryn.fluff.org.uk/bjdooks/linux
are available in the git repository at:
git://git.secretlab.ca/git/linux-2.6 next-net
Grant Likely (1):
Revert "net/ucc_geth: Add SGMII support for UEC GETH driver"
Haiying Wang (1):
net/ucc_geth: Add SGMII support for UCC GETH driver
drivers/net/ucc_geth.c | 113 +++++++++++++++++++---------------------------- drivers/net/ucc_geth.h | 2 +- 2 files changed, 47 insertions(+), 68 deletions(-)
--
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
PATCH 1/2 Revert "net/ucc_geth: Add SGMII support for UEC GETH driver"
From: Grant Likely <[email protected]>
This reverts commit 047584ce94108012288554a5f84585d792cc7f8f.
This patch meshes badly with "net: Rework ucc_geth driver to use of_mdio infrastructure" (0b9da337dca972e7a4144e298ec3adb8f244d4a4). Since most of the patch needs to be reworked, it is clearer to revert the patch and then apply the corrected version
---
arch/powerpc/include/asm/qe.h | 2 - drivers/net/ucc_geth.c | 79 +---------------------------------------- drivers/net/ucc_geth.h | 28 +-------------- 3 files changed, 2 insertions(+), 107 deletions(-)
arch/powerpc/include/asm/qe.h +0 -2
@@ -675,8 +675,6 @@ struct ucc_slow_pram {#define UCC_GETH_UPSMR_RMM 0x00001000#define UCC_GETH_UPSMR_CAM 0x00000400#define UCC_GETH_UPSMR_BRO 0x00000200 -#define UCC_GETH_UPSMR_SMM 0x00000080 -#define UCC_GETH_UPSMR_SGMM 0x00000020/* UCC Transmit On Demand Register (UTODR) */ #define UCC_SLOW_TOD 0x8000
drivers/net/ucc_geth.c +1 -78
132 lines not on this page · raw message
drivers/net/ucc_geth.h +1 -27
@@ -1,5 +1,5 @@/* -* Copyright (C) Freescale Semicondutor, Inc. 2006-2009. All rights reserved. +* Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. * * Author: Shlomi Gridish <[email protected]> *
@@ -193,31 +193,6 @@ struct ucc_geth {#define ENET_TBI_MII_JD 0x10/* Jitter diagnostics */ #define ENET_TBI_MII_TBICON 0x11/* TBI control */ -/* TBI MDIO register bit fields*/ -#define TBISR_LSTATUS 0x0004 -#define TBICON_CLK_SELECT 0x0020 -#define TBIANA_ASYMMETRIC_PAUSE 0x0100 -#define TBIANA_SYMMETRIC_PAUSE 0x0080 -#define TBIANA_HALF_DUPLEX 0x0040 -#define TBIANA_FULL_DUPLEX 0x0020 -#define TBICR_PHY_RESET 0x8000 -#define TBICR_ANEG_ENABLE 0x1000 -#define TBICR_RESTART_ANEG 0x0200 -#define TBICR_FULL_DUPLEX 0x0100 -#define TBICR_SPEED1_SET 0x0040 - -#define TBIANA_SETTINGS ( \ - TBIANA_ASYMMETRIC_PAUSE \ - | TBIANA_SYMMETRIC_PAUSE \ - | TBIANA_FULL_DUPLEX \ - ) -#define TBICR_SETTINGS ( \ - TBICR_PHY_RESET \ - | TBICR_ANEG_ENABLE \ - | TBICR_FULL_DUPLEX \ - | TBICR_SPEED1_SET \ - ) -/* UCC GETH MACCFG1 (MAC Configuration 1 Register) */ #define MACCFG1_FLOW_RX 0x00000020/* Flow Control Rx */
@@ -1213,7 +1188,6 @@ struct ucc_geth_private {struct ugeth_mii_info *mii_info;struct phy_device *phydev; -struct phy_device *tbiphy;phy_interface_t phy_interface;int max_speed;uint32_t msg_enable;
PATCH 2/2 net/ucc_geth: Add SGMII support for UCC GETH driver
In reply to Grant LikelyFrom: Haiying Wang <[email protected]>
-- derived from reverted commit 047584ce94108012288554a5f84585d792cc7f8f -- reworked by Grant Likely to play nice with commit:
"net: Rework ucc_geth driver to use of_mdio infrastructure" (0b9da337dca972e7a4144e298ec3adb8f244d4a4)
---
arch/powerpc/include/asm/qe.h | 2 + drivers/net/ucc_geth.c | 58 ++++++++++++++++++++++++++++++++++++++++- drivers/net/ucc_geth.h | 28 +++++++++++++++++++- 3 files changed, 86 insertions(+), 2 deletions(-)
arch/powerpc/include/asm/qe.h +2 -0
@@ -675,6 +675,8 @@ struct ucc_slow_pram {#define UCC_GETH_UPSMR_RMM 0x00001000#define UCC_GETH_UPSMR_CAM 0x00000400#define UCC_GETH_UPSMR_BRO 0x00000200 +#define UCC_GETH_UPSMR_SMM 0x00000080 +#define UCC_GETH_UPSMR_SGMM 0x00000020/* UCC Transmit On Demand Register (UTODR) */ #define UCC_SLOW_TOD 0x8000
drivers/net/ucc_geth.c +57 -1
104 lines not on this page · raw message
drivers/net/ucc_geth.h +27 -1
@@ -1,5 +1,5 @@/* -* Copyright (C) Freescale Semicondutor, Inc. 2006. All rights reserved. +* Copyright (C) Freescale Semicondutor, Inc. 2006-2009. All rights reserved. * * Author: Shlomi Gridish <[email protected]> *
@@ -193,6 +193,31 @@ struct ucc_geth {#define ENET_TBI_MII_JD 0x10/* Jitter diagnostics */ #define ENET_TBI_MII_TBICON 0x11/* TBI control */ +/* TBI MDIO register bit fields*/ +#define TBISR_LSTATUS 0x0004 +#define TBICON_CLK_SELECT 0x0020 +#define TBIANA_ASYMMETRIC_PAUSE 0x0100 +#define TBIANA_SYMMETRIC_PAUSE 0x0080 +#define TBIANA_HALF_DUPLEX 0x0040 +#define TBIANA_FULL_DUPLEX 0x0020 +#define TBICR_PHY_RESET 0x8000 +#define TBICR_ANEG_ENABLE 0x1000 +#define TBICR_RESTART_ANEG 0x0200 +#define TBICR_FULL_DUPLEX 0x0100 +#define TBICR_SPEED1_SET 0x0040 + +#define TBIANA_SETTINGS ( \ + TBIANA_ASYMMETRIC_PAUSE \ + | TBIANA_SYMMETRIC_PAUSE \ + | TBIANA_FULL_DUPLEX \ + ) +#define TBICR_SETTINGS ( \ + TBICR_PHY_RESET \ + | TBICR_ANEG_ENABLE \ + | TBICR_FULL_DUPLEX \ + | TBICR_SPEED1_SET \ + ) +/* UCC GETH MACCFG1 (MAC Configuration 1 Register) */ #define MACCFG1_FLOW_RX 0x00000020/* Flow Control Rx */
@@ -1100,6 +1125,7 @@ struct ucc_geth_info {u16 pausePeriod;u16 extensionField;struct device_node *phy_node; +struct device_node *tbi_node;u8 weightfactor[NUM_TX_QUEUES ];u8 interruptcoalescingmaxvalue[NUM_RX_QUEUES ];u8 l2qt[UCC_GETH_VLAN_PRIORITY_MAX ];
From: Grant Likely <[email protected]>
Date: Wed, 17 Jun 2009 17:15:58 -0600
Quoted 4 lines
(REPOST; I messed up an email address first time around and apparently my posting got rejected. If you've already received this message, then I apologize for the noise)
Quoted 8 lines
Here is a fix for the build failure discovered during the 2.6.31 merge window on
ucc_geth.c. I decided to revert and reapply a fixed version of the patch to make the new version easier to review and bisect if I got the fixup wrong. I've compile tested both patches, but I do not have hardware to run test.Haiying, please confirm that I haven't horribly trashed your hard work with my changes.
I've applied these to net-next-2.6, thanks!