Lines Matching refs:input
59 static inline u32 rgmii_mode_mask(int mode, int input)
66 return RGMII_FER_RGMII(input);
68 return RGMII_FER_TBI(input);
70 return RGMII_FER_GMII(input);
72 return RGMII_FER_MII(input);
74 return RGMII_FER_RTBI(input);
80 int rgmii_attach(struct platform_device *ofdev, int input, int mode)
85 RGMII_DBG(dev, "attach(%d)" NL, input);
88 if (input < 0 || !rgmii_valid_mode(mode)) {
96 /* Enable this input */
97 out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input));
99 printk(KERN_NOTICE "%pOF: input %d in %s mode\n",
100 ofdev->dev.of_node, input, phy_modes(mode));
109 void rgmii_set_speed(struct platform_device *ofdev, int input, int speed)
117 ssr = in_be32(&p->ssr) & ~RGMII_SSR_MASK(input);
119 RGMII_DBG(dev, "speed(%d, %d)" NL, input, speed);
122 ssr |= RGMII_SSR_1000(input);
124 ssr |= RGMII_SSR_100(input);
126 ssr |= RGMII_SSR_10(input);
133 void rgmii_get_mdio(struct platform_device *ofdev, int input)
139 RGMII_DBG2(dev, "get_mdio(%d)" NL, input);
147 fer |= 0x00080000u >> input;
154 void rgmii_put_mdio(struct platform_device *ofdev, int input)
160 RGMII_DBG2(dev, "put_mdio(%d)" NL, input);
166 fer &= ~(0x00080000u >> input);
175 void rgmii_detach(struct platform_device *ofdev, int input)
185 RGMII_DBG(dev, "detach(%d)" NL, input);
187 /* Disable this input */
188 out_be32(&p->fer, in_be32(&p->fer) & ~RGMII_FER_MASK(input));