Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/rockchip/rk_pcie_phy.c
Show First 20 Lines • Show All 291 Lines • ▼ Show 20 Lines | rk_pcie_phy_attach(device_t dev) | ||||
if (SYSCON_GET_HANDLE(sc->dev, &sc->syscon) != 0 || | if (SYSCON_GET_HANDLE(sc->dev, &sc->syscon) != 0 || | ||||
sc->syscon == NULL) { | sc->syscon == NULL) { | ||||
device_printf(dev, "cannot get syscon for device\n"); | device_printf(dev, "cannot get syscon for device\n"); | ||||
rv = ENXIO; | rv = ENXIO; | ||||
goto fail; | goto fail; | ||||
} | } | ||||
rv = clk_set_assigned(dev, ofw_bus_get_node(dev)); | |||||
if (rv != 0 && rv != ENOENT) { | |||||
manu: We should fail if rv != ENOENT
Otherwise just be silent is enough. | |||||
Done Inline ActionsLike this? bz: Like this? | |||||
device_printf(dev, "clk_set_assigned failed: %d\n", rv); | |||||
rv = ENXIO; | |||||
goto fail; | |||||
} | |||||
rv = clk_get_by_ofw_name(sc->dev, 0, "refclk", &sc->clk_ref); | rv = clk_get_by_ofw_name(sc->dev, 0, "refclk", &sc->clk_ref); | ||||
if (rv != 0) { | if (rv != 0) { | ||||
device_printf(sc->dev, "Cannot get 'refclk' clock\n"); | device_printf(sc->dev, "Cannot get 'refclk' clock\n"); | ||||
rv = ENXIO; | rv = ENXIO; | ||||
goto fail; | goto fail; | ||||
} | } | ||||
rv = hwreset_get_by_ofw_name(sc->dev, 0, "phy", &sc->hwreset_phy); | rv = hwreset_get_by_ofw_name(sc->dev, 0, "phy", &sc->hwreset_phy); | ||||
if (rv != 0) { | if (rv != 0) { | ||||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |
We should fail if rv != ENOENT
Otherwise just be silent is enough.