diff options
author | David S. Miller <davem@davemloft.net> | 2009-11-17 07:46:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-17 07:46:18 -0500 |
commit | e54d5512b600aa0d492010436ff7eb0c9194efc1 (patch) | |
tree | 3d6c07a91d5e97d0152a56b3e5e2cb53b06b3843 /drivers | |
parent | f99b4a02848afe7fae960884dfa6e7a88f545f09 (diff) |
sungem: Fix Serdes detection.
We need to look for the 'shared-pins' property to get
this right.
Based upon a patch by Hermann Lauer.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/sungem.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 305ec3d783db..1927b3de9eec 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2062,7 +2062,15 @@ static int gem_check_invariants(struct gem *gp) | |||
2062 | mif_cfg &= ~MIF_CFG_PSELECT; | 2062 | mif_cfg &= ~MIF_CFG_PSELECT; |
2063 | writel(mif_cfg, gp->regs + MIF_CFG); | 2063 | writel(mif_cfg, gp->regs + MIF_CFG); |
2064 | } else { | 2064 | } else { |
2065 | gp->phy_type = phy_serialink; | 2065 | #ifdef CONFIG_SPARC |
2066 | const char *p; | ||
2067 | |||
2068 | p = of_get_property(gp->of_node, "shared-pins", NULL); | ||
2069 | if (p && !strcmp(p, "serdes")) | ||
2070 | gp->phy_type = phy_serdes; | ||
2071 | else | ||
2072 | #endif | ||
2073 | gp->phy_type = phy_serialink; | ||
2066 | } | 2074 | } |
2067 | if (gp->phy_type == phy_mii_mdio1 || | 2075 | if (gp->phy_type == phy_mii_mdio1 || |
2068 | gp->phy_type == phy_mii_mdio0) { | 2076 | gp->phy_type == phy_mii_mdio0) { |