Lines Matching refs:i

92 	int i;  in fm_standard_init()  local
99 for (i = 0; i < ARRAY_SIZE(fm_info); i++) { in fm_standard_init()
100 if ((fm_info[i].enabled) && (fm_info[i].index == 1)) in fm_standard_init()
101 fm_eth_initialize(reg, &fm_info[i]); in fm_standard_init()
109 for (i = 0; i < ARRAY_SIZE(fm_info); i++) { in fm_standard_init()
110 if ((fm_info[i].enabled) && (fm_info[i].index == 2)) in fm_standard_init()
111 fm_eth_initialize(reg, &fm_info[i]); in fm_standard_init()
121 int i; in fm_port_to_index() local
123 for (i = 0; i < ARRAY_SIZE(fm_info); i++) { in fm_port_to_index()
124 if (fm_info[i].port == port) in fm_port_to_index()
125 return i; in fm_port_to_index()
138 int i; in fman_enet_init() local
140 for (i = 0; i < ARRAY_SIZE(fm_info); i++) { in fman_enet_init()
143 enet_if = fman_port_enet_if(fm_info[i].port); in fman_enet_init()
145 fm_info[i].enabled = 1; in fman_enet_init()
146 fm_info[i].enet_if = enet_if; in fman_enet_init()
148 fm_info[i].enabled = 0; in fman_enet_init()
157 int i = fm_port_to_index(port); in fm_disable_port() local
159 if (i == -1) in fm_disable_port()
162 fm_info[i].enabled = 0; in fm_disable_port()
170 int i = fm_port_to_index(port); in fm_enable_port() local
172 if (i == -1) in fm_enable_port()
175 fm_info[i].enabled = 1; in fm_enable_port()
181 int i = fm_port_to_index(port); in fm_info_set_mdio() local
183 if (i == -1) in fm_info_set_mdio()
186 fm_info[i].bus = bus; in fm_info_set_mdio()
191 int i = fm_port_to_index(port); in fm_info_set_phy_address() local
193 if (i == -1) in fm_info_set_phy_address()
196 fm_info[i].phy_addr = address; in fm_info_set_phy_address()
207 int i = fm_port_to_index(port); in fm_info_get_phy_address() local
209 if (i == -1) in fm_info_get_phy_address()
212 return fm_info[i].phy_addr; in fm_info_get_phy_address()
221 int i = fm_port_to_index(port); in fm_info_get_enet_if() local
223 if (i == -1) in fm_info_get_enet_if()
226 if (fm_info[i].enabled) in fm_info_get_enet_if()
227 return fm_info[i].enet_if; in fm_info_get_enet_if()
319 int i; in fdt_fixup_fman_ethernet() local
322 for (i = 0; i < ARRAY_SIZE(fm_info); i++) in fdt_fixup_fman_ethernet()
323 ft_fixup_port(blob, &fm_info[i], "fsl,fman-memac"); in fdt_fixup_fman_ethernet()
325 for (i = 0; i < ARRAY_SIZE(fm_info); i++) { in fdt_fixup_fman_ethernet()
329 if (fm_info[i].type == FM_ETH_1G_E) { in fdt_fixup_fman_ethernet()
330 if (ft_fixup_port(blob, &fm_info[i], "fsl,fman-dtsec")) in fdt_fixup_fman_ethernet()
331 ft_fixup_port(blob, &fm_info[i], in fdt_fixup_fman_ethernet()
334 if (ft_fixup_port(blob, &fm_info[i], "fsl,fman-xgec") && in fdt_fixup_fman_ethernet()
335 ft_fixup_port(blob, &fm_info[i], "fsl,fman-tgec")) in fdt_fixup_fman_ethernet()
336 ft_fixup_port(blob, &fm_info[i], in fdt_fixup_fman_ethernet()
352 int i; in set_sgmii_phy() local
360 for (i = base_port; i < base_port + port_num; i++) { in set_sgmii_phy()
361 if (fm_info_get_enet_if(i) == PHY_INTERFACE_MODE_SGMII) { in set_sgmii_phy()
362 phy_real_addr = phy_base_addr + i - base_port; in set_sgmii_phy()
363 fm_info_set_phy_address(i, phy_real_addr); in set_sgmii_phy()
372 int i; in is_qsgmii_riser_card() local
378 for (i = phy_base_addr; i < phy_base_addr + port_num; i++) { in is_qsgmii_riser_card()
379 val = bus->read(bus, i, MDIO_DEVAD_NONE, regnum); in is_qsgmii_riser_card()