diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/m68k/include/asm/fec.h | 9 | ||||
-rw-r--r-- | arch/powerpc/cpu/ppc4xx/miiphy.c | 11 |
2 files changed, 9 insertions, 11 deletions
diff --git a/arch/m68k/include/asm/fec.h b/arch/m68k/include/asm/fec.h index 6856aac82df..2799293e9a9 100644 --- a/arch/m68k/include/asm/fec.h +++ b/arch/m68k/include/asm/fec.h @@ -15,6 +15,8 @@ #ifndef fec_h #define fec_h +#include <phy.h> + /* Buffer descriptors used FEC. */ typedef struct cpm_buf_desc { @@ -341,10 +343,9 @@ int fecpin_setclear(struct eth_device *dev, int setclear); void __mii_init(void); uint mii_send(uint mii_cmd); int mii_discover_phy(struct eth_device *dev); -int mcffec_miiphy_read(const char *devname, unsigned char addr, - unsigned char reg, unsigned short *value); -int mcffec_miiphy_write(const char *devname, unsigned char addr, - unsigned char reg, unsigned short value); +int mcffec_miiphy_read(struct mii_dev *bus, int addr, int devad, int reg); +int mcffec_miiphy_write(struct mii_dev *bus, int addr, int devad, int reg, + u16 value); #endif #endif /* fec_h */ diff --git a/arch/powerpc/cpu/ppc4xx/miiphy.c b/arch/powerpc/cpu/ppc4xx/miiphy.c index 10147de0897..f0fc098059e 100644 --- a/arch/powerpc/cpu/ppc4xx/miiphy.c +++ b/arch/powerpc/cpu/ppc4xx/miiphy.c @@ -318,8 +318,7 @@ static int emac_miiphy_command(u8 addr, u8 reg, int cmd, u16 value) return 0; } -int emac4xx_miiphy_read (const char *devname, unsigned char addr, unsigned char reg, - unsigned short *value) +int emac4xx_miiphy_read(struct mii_dev *bus, int addr, int devad, int reg) { unsigned long sta_reg; unsigned long emac_reg; @@ -330,17 +329,15 @@ int emac4xx_miiphy_read (const char *devname, unsigned char addr, unsigned char return -1; sta_reg = in_be32((void *)EMAC0_STACR + emac_reg); - *value = sta_reg >> 16; - - return 0; + return sta_reg >> 16; } /***********************************************************/ /* write a phy reg and return the value with a rc */ /***********************************************************/ -int emac4xx_miiphy_write (const char *devname, unsigned char addr, unsigned char reg, - unsigned short value) +int emac4xx_miiphy_write(struct mii_dev *bus, int addr, int devad, int reg, + u16 value) { return emac_miiphy_command(addr, reg, EMAC_STACR_WRITE, value); } |