ucc_geth driver fixes mostly as a result of QE lib changes
Subsystems (2)
PATCH 3/7 ucc_geth driver fixes mostly as a result of QE lib changes
From: Li Yang <[email protected]>
note: to be applied through the netdev tree
o Update the ucc_geth driver according to qe_lib changes.
o Fix l3qt bug.
o platform_device to of_device transition
o removed bcsr bit manipulation code
o removed typedefs
o uint -> u32 conversions
o replaced following define usages:
QE_SIZEOF_BD, UCC_GETH_SIZE_OF_BD, BD_BUFFER_ARG, BD_BUFFER_CLEAR, BD_BUFFER, BD_STATUS_AND_LENGTH_SET, BD_STATUS_AND_LENGTH, BD_BUFFER_SET because they hid sizeof/in_be32/out_be32 operations from the reader.
o minor style fixups
--- drivers/net/Kconfig | 2 drivers/net/ucc_geth.c | 571 ++++++++++++++++++++++++-------------------- drivers/net/ucc_geth.h | 248 +++++++++---------- drivers/net/ucc_geth_phy.c | 25 -- drivers/net/ucc_geth_phy.h | 2 5 files changed, 446 insertions(+), 402 deletions(-)
drivers/net/Kconfig +1 -1
@@ -2285,7 +2285,7 @@ config UGETH_TX_ON_DEMOND config UGETH_HAS_GIGA bool - depends on UCC_GETH && MPC836x + depends on UCC_GETH && PPC_MPC836x config MV643XX_ETH tristate "MV-643XX Ethernet support"
drivers/net/ucc_geth.c +315 -256
1,440 lines not on this page · raw message
drivers/net/ucc_geth.h +123 -125
539 lines not on this page · raw message
drivers/net/ucc_geth_phy.c +6 -19
@@ -73,16 +73,14 @@ static int genmii_read_status(struct ugeu16 phy_read (struct ugeth_mii_info *mii_info,u16 regnum);void phy_write (struct ugeth_mii_info *mii_info,u16 regnum,u16 val); -static u8 *bcsr_regs =NULL ; -/* Write value to the PHY for this device to the register at regnum, */ /* waiting until the write is done before it returns. All PHY */ /* configuration has to be done through the TSEC1 MIIM regs */ void write_phy_reg (struct net_device *dev,int mii_id,int regnum,int value) { -ucc_geth_private_t *ugeth =netdev_priv (dev); -ucc_mii_mng_t *mii_regs; -enet_tbi_mii_reg_e mii_reg = (enet_tbi_mii_reg_e ) regnum; +struct ucc_geth_private *ugeth =netdev_priv (dev); +struct ucc_mii_mng *mii_regs; +enum enet_tbi_mii_reg mii_reg = (enum enet_tbi_mii_reg ) regnum;u32 tmp_reg;ugphy_vdbg ("%s: IN" , __FUNCTION__);
@@ -117,9 +115,9 @@ void write_phy_reg(struct net_device *de/* configuration has to be done through the TSEC1 MIIM regs */ int read_phy_reg (struct net_device *dev,int mii_id,int regnum) { -ucc_geth_private_t *ugeth =netdev_priv (dev); -ucc_mii_mng_t *mii_regs; -enet_tbi_mii_reg_e mii_reg = (enet_tbi_mii_reg_e ) regnum; +struct ucc_geth_private *ugeth =netdev_priv (dev); +struct ucc_mii_mng *mii_regs; +enum enet_tbi_mii_reg mii_reg = (enum enet_tbi_mii_reg ) regnum;u32 tmp_reg;u16 value;
@@ -635,11 +633,6 @@ static void dm9161_close(struct ugeth_mistatic int dm9161_ack_interrupt (struct ugeth_mii_info *mii_info) { -/* FIXME: This lines are for BUG fixing in the mpc8325. -Remove this from here when it's fixed */ -if (bcsr_regs ==NULL ) - bcsr_regs = (u8 *)ioremap (BCSR_PHYS_ADDR ,BCSR_SIZE ); - bcsr_regs[14 ] |=0x40 ;ugphy_vdbg ("%s: IN" , __FUNCTION__);/* Clear the interrupts by reading the reg */
@@ -651,12 +644,6 @@ Remove this from here when it's fixed */static int dm9161_config_intr (struct ugeth_mii_info *mii_info) { -/* FIXME: This lines are for BUG fixing in the mpc8325. -Remove this from here when it's fixed */ -if (bcsr_regs ==NULL ) { - bcsr_regs = (u8 *)ioremap (BCSR_PHYS_ADDR ,BCSR_SIZE ); - bcsr_regs[14 ] &= ~0x40 ; - }ugphy_vdbg ("%s: IN" , __FUNCTION__);if (mii_info->interrupts ==MII_INTERRUPT_ENABLED )
drivers/net/ucc_geth_phy.h +1 -1
@@ -126,7 +126,7 @@ struct ugeth_mii_info {/* And management functions */ struct phy_info *phyinfo; -ucc_mii_mng_t *mii_regs; +struct ucc_mii_mng *mii_regs;/* forced speed & duplex (no autoneg) * partner speed & duplex & pause (autoneg)
Signature · 1 line
1.4.2.3
Kim,
Quoted 1 line
+=A0=A0=A0=A0=A0=A0=A0ph =3D (phandle *) get_property(np, "phy-handle", N=
ULL);
get_property() now returns const void *, so there should be no need to=20 cast this - just define ph as a const phandle *.
The same applies to the other invocations of get_property in this=20 series.
Regards,
Jeremy