void __zmii_set_speed(struct ocp_device *ocpdev, int input, int speed) { struct ibm_ocp_zmii *dev = ocp_get_drvdata(ocpdev); u32 ssr = in_be32(&dev->base->ssr); ZMII_DBG("%d: speed(%d, %d)" NL, ocpdev->def->index, input, speed); if (speed == SPEED_100) ssr |= ZMII_SSR_SP(input); else ssr &= ~ZMII_SSR_SP(input); out_be32(&dev->base->ssr, ssr); }
void zmii_set_speed(struct of_device *ofdev, int input, int speed) { struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); u32 ssr; mutex_lock(&dev->lock); ssr = in_be32(&dev->base->ssr); ZMII_DBG(dev, "speed(%d, %d)" NL, input, speed); if (speed == SPEED_100) ssr |= ZMII_SSR_SP(input); else ssr &= ~ZMII_SSR_SP(input); out_be32(&dev->base->ssr, ssr); mutex_unlock(&dev->lock); }