void (*set_gate)(void *addr);
struct mdiobb_ctrl ctrl;
void *addr;
- u32 mmd_msk;/* MMD */
- u32 mdo_msk;
- u32 mdi_msk;
- u32 mdc_msk;
};
/* PHY bit set */
bitbang->set_gate(bitbang->addr);
if (bit)
- bb_set(bitbang->addr, bitbang->mmd_msk);
+ bb_set(bitbang->addr, PIR_MMD);
else
- bb_clr(bitbang->addr, bitbang->mmd_msk);
+ bb_clr(bitbang->addr, PIR_MMD);
}
/* Set bit data*/
bitbang->set_gate(bitbang->addr);
if (bit)
- bb_set(bitbang->addr, bitbang->mdo_msk);
+ bb_set(bitbang->addr, PIR_MDO);
else
- bb_clr(bitbang->addr, bitbang->mdo_msk);
+ bb_clr(bitbang->addr, PIR_MDO);
}
/* Get bit data*/
if (bitbang->set_gate)
bitbang->set_gate(bitbang->addr);
- return bb_read(bitbang->addr, bitbang->mdi_msk);
+ return bb_read(bitbang->addr, PIR_MDI);
}
/* MDC pin control */
bitbang->set_gate(bitbang->addr);
if (bit)
- bb_set(bitbang->addr, bitbang->mdc_msk);
+ bb_set(bitbang->addr, PIR_MDC);
else
- bb_clr(bitbang->addr, bitbang->mdc_msk);
+ bb_clr(bitbang->addr, PIR_MDC);
}
/* mdio bus control struct */
/* bitbang init */
bitbang->addr = mdp->addr + mdp->reg_offset[PIR];
bitbang->set_gate = pd->set_mdio_gate;
- bitbang->mdi_msk = PIR_MDI;
- bitbang->mdo_msk = PIR_MDO;
- bitbang->mmd_msk = PIR_MMD;
- bitbang->mdc_msk = PIR_MDC;
bitbang->ctrl.ops = &bb_ops;
/* MII controller setting */