Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/fdt/fdt_common.c
Show First 20 Lines • Show All 393 Lines • ▼ Show 20 Lines | fdt_get_phyaddr(phandle_t node, device_t dev, int *phy_addr, void **phy_sc) | ||||
phy_node = OF_node_from_xref(phy_handle); | phy_node = OF_node_from_xref(phy_handle); | ||||
if (OF_getencprop(phy_node, "reg", (void *)&phy_reg, | if (OF_getencprop(phy_node, "reg", (void *)&phy_reg, | ||||
sizeof(phy_reg)) <= 0) | sizeof(phy_reg)) <= 0) | ||||
return (ENXIO); | return (ENXIO); | ||||
*phy_addr = phy_reg; | *phy_addr = phy_reg; | ||||
if (phy_sc == NULL) | |||||
return (0); | |||||
/* | /* | ||||
* Search for softc used to communicate with phy. | * Search for softc used to communicate with phy. | ||||
*/ | */ | ||||
/* | /* | ||||
* Step 1: Search for ancestor of the phy-node with a "phy-handle" | * Step 1: Search for ancestor of the phy-node with a "phy-handle" | ||||
* property set. | * property set. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines |