aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ucc_geth_phy.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-12-03 23:59:07 -0500
committerPaul Mackerras <paulus@samba.org>2006-12-03 23:59:07 -0500
commit79acbb3ff2d8095b692e1502b9eb2ccec348de26 (patch)
tree6ab773e5a8f9de2cd6443362b21d0d6fffe3b35e /drivers/net/ucc_geth_phy.c
parent19a79859e168640f8e16d7b216d211c1c52b687a (diff)
parent2b5f6dcce5bf94b9b119e9ed8d537098ec61c3d2 (diff)
Merge branch 'linux-2.6' into for-linus
Diffstat (limited to 'drivers/net/ucc_geth_phy.c')
-rw-r--r--drivers/net/ucc_geth_phy.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/drivers/net/ucc_geth_phy.c b/drivers/net/ucc_geth_phy.c
index 67260eb3188a..5360ec05eaa3 100644
--- a/drivers/net/ucc_geth_phy.c
+++ b/drivers/net/ucc_geth_phy.c
@@ -42,7 +42,6 @@
42 42
43#include "ucc_geth.h" 43#include "ucc_geth.h"
44#include "ucc_geth_phy.h" 44#include "ucc_geth_phy.h"
45#include <platforms/83xx/mpc8360e_pb.h>
46 45
47#define ugphy_printk(level, format, arg...) \ 46#define ugphy_printk(level, format, arg...) \
48 printk(level format "\n", ## arg) 47 printk(level format "\n", ## arg)
@@ -72,16 +71,14 @@ static int genmii_read_status(struct ugeth_mii_info *mii_info);
72u16 phy_read(struct ugeth_mii_info *mii_info, u16 regnum); 71u16 phy_read(struct ugeth_mii_info *mii_info, u16 regnum);
73void phy_write(struct ugeth_mii_info *mii_info, u16 regnum, u16 val); 72void phy_write(struct ugeth_mii_info *mii_info, u16 regnum, u16 val);
74 73
75static u8 *bcsr_regs = NULL;
76
77/* Write value to the PHY for this device to the register at regnum, */ 74/* Write value to the PHY for this device to the register at regnum, */
78/* waiting until the write is done before it returns. All PHY */ 75/* waiting until the write is done before it returns. All PHY */
79/* configuration has to be done through the TSEC1 MIIM regs */ 76/* configuration has to be done through the TSEC1 MIIM regs */
80void write_phy_reg(struct net_device *dev, int mii_id, int regnum, int value) 77void write_phy_reg(struct net_device *dev, int mii_id, int regnum, int value)
81{ 78{
82 ucc_geth_private_t *ugeth = netdev_priv(dev); 79 struct ucc_geth_private *ugeth = netdev_priv(dev);
83 ucc_mii_mng_t *mii_regs; 80 struct ucc_mii_mng *mii_regs;
84 enet_tbi_mii_reg_e mii_reg = (enet_tbi_mii_reg_e) regnum; 81 enum enet_tbi_mii_reg mii_reg = (enum enet_tbi_mii_reg) regnum;
85 u32 tmp_reg; 82 u32 tmp_reg;
86 83
87 ugphy_vdbg("%s: IN", __FUNCTION__); 84 ugphy_vdbg("%s: IN", __FUNCTION__);
@@ -116,9 +113,9 @@ void write_phy_reg(struct net_device *dev, int mii_id, int regnum, int value)
116/* configuration has to be done through the TSEC1 MIIM regs */ 113/* configuration has to be done through the TSEC1 MIIM regs */
117int read_phy_reg(struct net_device *dev, int mii_id, int regnum) 114int read_phy_reg(struct net_device *dev, int mii_id, int regnum)
118{ 115{
119 ucc_geth_private_t *ugeth = netdev_priv(dev); 116 struct ucc_geth_private *ugeth = netdev_priv(dev);
120 ucc_mii_mng_t *mii_regs; 117 struct ucc_mii_mng *mii_regs;
121 enet_tbi_mii_reg_e mii_reg = (enet_tbi_mii_reg_e) regnum; 118 enum enet_tbi_mii_reg mii_reg = (enum enet_tbi_mii_reg) regnum;
122 u32 tmp_reg; 119 u32 tmp_reg;
123 u16 value; 120 u16 value;
124 121
@@ -634,11 +631,6 @@ static void dm9161_close(struct ugeth_mii_info *mii_info)
634 631
635static int dm9161_ack_interrupt(struct ugeth_mii_info *mii_info) 632static int dm9161_ack_interrupt(struct ugeth_mii_info *mii_info)
636{ 633{
637/* FIXME: This lines are for BUG fixing in the mpc8325.
638Remove this from here when it's fixed */
639 if (bcsr_regs == NULL)
640 bcsr_regs = (u8 *) ioremap(BCSR_PHYS_ADDR, BCSR_SIZE);
641 bcsr_regs[14] |= 0x40;
642 ugphy_vdbg("%s: IN", __FUNCTION__); 634 ugphy_vdbg("%s: IN", __FUNCTION__);
643 635
644 /* Clear the interrupts by reading the reg */ 636 /* Clear the interrupts by reading the reg */
@@ -650,12 +642,6 @@ Remove this from here when it's fixed */
650 642
651static int dm9161_config_intr(struct ugeth_mii_info *mii_info) 643static int dm9161_config_intr(struct ugeth_mii_info *mii_info)
652{ 644{
653/* FIXME: This lines are for BUG fixing in the mpc8325.
654Remove this from here when it's fixed */
655 if (bcsr_regs == NULL) {
656 bcsr_regs = (u8 *) ioremap(BCSR_PHYS_ADDR, BCSR_SIZE);
657 bcsr_regs[14] &= ~0x40;
658 }
659 ugphy_vdbg("%s: IN", __FUNCTION__); 645 ugphy_vdbg("%s: IN", __FUNCTION__);
660 646
661 if (mii_info->interrupts == MII_INTERRUPT_ENABLED) 647 if (mii_info->interrupts == MII_INTERRUPT_ENABLED)