Lines Matching refs:np
108 struct device_node *np; in stmmac_axi_setup() local
111 np = of_parse_phandle(pdev->dev.of_node, "snps,axi-config", 0); in stmmac_axi_setup()
112 if (!np) in stmmac_axi_setup()
117 of_node_put(np); in stmmac_axi_setup()
121 axi->axi_lpi_en = of_property_read_bool(np, "snps,lpi_en"); in stmmac_axi_setup()
122 axi->axi_xit_frm = of_property_read_bool(np, "snps,xit_frm"); in stmmac_axi_setup()
123 axi->axi_kbbe = of_property_read_bool(np, "snps,axi_kbbe"); in stmmac_axi_setup()
124 axi->axi_axi_all = of_property_read_bool(np, "snps,axi_all"); in stmmac_axi_setup()
125 axi->axi_fb = of_property_read_bool(np, "snps,axi_fb"); in stmmac_axi_setup()
126 axi->axi_mb = of_property_read_bool(np, "snps,axi_mb"); in stmmac_axi_setup()
127 axi->axi_rb = of_property_read_bool(np, "snps,axi_rb"); in stmmac_axi_setup()
129 if (of_property_read_u32(np, "snps,wr_osr_lmt", &axi->axi_wr_osr_lmt)) in stmmac_axi_setup()
131 if (of_property_read_u32(np, "snps,rd_osr_lmt", &axi->axi_rd_osr_lmt)) in stmmac_axi_setup()
133 of_property_read_u32_array(np, "snps,blen", axi->axi_blen, AXI_BLEN); in stmmac_axi_setup()
134 of_node_put(np); in stmmac_axi_setup()
165 struct device_node *np, struct device *dev) in stmmac_dt_phy() argument
170 plat->phy_node = of_parse_phandle(np, "phy-handle", 0); in stmmac_dt_phy()
175 if (!plat->phy_node && of_phy_is_fixed_link(np)) { in stmmac_dt_phy()
176 if ((of_phy_register_fixed_link(np) < 0)) in stmmac_dt_phy()
180 plat->phy_node = of_node_get(np); in stmmac_dt_phy()
185 for_each_child_of_node(np, plat->mdio_node) { in stmmac_dt_phy()
213 struct device_node *np = pdev->dev.of_node; in stmmac_probe_config_dt() local
221 *mac = of_get_mac_address(np); in stmmac_probe_config_dt()
222 plat->interface = of_get_phy_mode(np); in stmmac_probe_config_dt()
225 if (of_property_read_u32(np, "max-speed", &plat->max_speed)) in stmmac_probe_config_dt()
228 plat->bus_id = of_alias_get_id(np, "ethernet"); in stmmac_probe_config_dt()
238 if (of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr) == 0) in stmmac_probe_config_dt()
242 if (stmmac_dt_phy(plat, np, &pdev->dev)) in stmmac_probe_config_dt()
245 of_property_read_u32(np, "tx-fifo-depth", &plat->tx_fifo_size); in stmmac_probe_config_dt()
247 of_property_read_u32(np, "rx-fifo-depth", &plat->rx_fifo_size); in stmmac_probe_config_dt()
250 of_property_read_bool(np, "snps,force_sf_dma_mode"); in stmmac_probe_config_dt()
268 if (of_device_is_compatible(np, "st,spear600-gmac") || in stmmac_probe_config_dt()
269 of_device_is_compatible(np, "snps,dwmac-3.50a") || in stmmac_probe_config_dt()
270 of_device_is_compatible(np, "snps,dwmac-3.70a") || in stmmac_probe_config_dt()
271 of_device_is_compatible(np, "snps,dwmac")) { in stmmac_probe_config_dt()
279 of_property_read_u32(np, "max-frame-size", &plat->maxmtu); in stmmac_probe_config_dt()
280 of_property_read_u32(np, "snps,multicast-filter-bins", in stmmac_probe_config_dt()
282 of_property_read_u32(np, "snps,perfect-filter-entries", in stmmac_probe_config_dt()
292 if (of_device_is_compatible(np, "snps,dwmac-4.00") || in stmmac_probe_config_dt()
293 of_device_is_compatible(np, "snps,dwmac-4.10a")) { in stmmac_probe_config_dt()
296 plat->tso_en = of_property_read_bool(np, "snps,tso"); in stmmac_probe_config_dt()
299 if (of_device_is_compatible(np, "snps,dwmac-3.610") || in stmmac_probe_config_dt()
300 of_device_is_compatible(np, "snps,dwmac-3.710")) { in stmmac_probe_config_dt()
306 if (of_find_property(np, "snps,pbl", NULL)) { in stmmac_probe_config_dt()
314 of_property_read_u32(np, "snps,pbl", &dma_cfg->pbl); in stmmac_probe_config_dt()
315 dma_cfg->aal = of_property_read_bool(np, "snps,aal"); in stmmac_probe_config_dt()
317 of_property_read_bool(np, "snps,fixed-burst"); in stmmac_probe_config_dt()
319 of_property_read_bool(np, "snps,mixed-burst"); in stmmac_probe_config_dt()
321 plat->force_thresh_dma_mode = of_property_read_bool(np, "snps,force_thresh_dma_mode"); in stmmac_probe_config_dt()
327 of_property_read_u32(np, "snps,ps-speed", &plat->mac_port_sel_speed); in stmmac_probe_config_dt()
344 struct device_node *np = pdev->dev.of_node; in stmmac_remove_config_dt() local
346 if (of_phy_is_fixed_link(np)) in stmmac_remove_config_dt()
347 of_phy_deregister_fixed_link(np); in stmmac_remove_config_dt()