diff --git a/drivers/net/fm/memac_phy.c b/drivers/net/fm/memac_phy.c index 72b500a6d1..3ddae97e09 100644 --- a/drivers/net/fm/memac_phy.c +++ b/drivers/net/fm/memac_phy.c @@ -64,7 +64,7 @@ static int memac_wait_until_done(struct memac_mdio_controller *regs) { unsigned int timeout = MAX_NUM_RETRIES; - while ((memac_in_32(®s->mdio_data) & MDIO_DATA_BSY) && timeout--) + while ((memac_in_32(®s->mdio_stat) & MDIO_STAT_BSY) && timeout--) ; if (!timeout) { diff --git a/drivers/net/fsl_ls_mdio.c b/drivers/net/fsl_ls_mdio.c index 6d4e682fdf..f213e0dd85 100644 --- a/drivers/net/fsl_ls_mdio.c +++ b/drivers/net/fsl_ls_mdio.c @@ -84,7 +84,7 @@ static int dm_fsl_ls_mdio_read(struct udevice *dev, int addr, memac_out_32(®s->mdio_ctl, mdio_ctl); /* Wait till the MDIO write is complete */ - while ((memac_in_32(®s->mdio_data)) & MDIO_DATA_BSY) + while ((memac_in_32(®s->mdio_stat)) & MDIO_STAT_BSY) ; /* Return all Fs if nothing was there */ @@ -107,7 +107,7 @@ static int dm_fsl_ls_mdio_write(struct udevice *dev, int addr, int devad, memac_out_32(®s->mdio_data, MDIO_DATA(val)); /* Wait till the MDIO write is complete */ - while ((memac_in_32(®s->mdio_data)) & MDIO_DATA_BSY) + while ((memac_in_32(®s->mdio_stat)) & MDIO_STAT_BSY) ; return 0; diff --git a/include/fsl_memac.h b/include/fsl_memac.h index d067f1511c..6ac1e558b9 100644 --- a/include/fsl_memac.h +++ b/include/fsl_memac.h @@ -254,7 +254,6 @@ struct memac_mdio_controller { #define MDIO_CTL_READ (1 << 15) #define MDIO_DATA(x) (x & 0xffff) -#define MDIO_DATA_BSY (1 << 31) struct fsl_enet_mac;