diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-08-11 11:16:06 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2019-08-11 11:16:06 +0000 |
commit | 2d8a4444feb9950e8ad9725353134e47a1e022d4 (patch) | |
tree | b2969966c20327219608ed89fc1c32cfe774c0ed /sys | |
parent | 4a80e8f59ec25ffcc7bc85716373486452e872ce (diff) |
The "phy-names" property has been dropped from the Linux device trees so
make initialization of the PHYs work without it. Simply initialize all
the PHYs; there should only be one anyway.
ok patrick@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/fdt/ehci_fdt.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/sys/dev/fdt/ehci_fdt.c b/sys/dev/fdt/ehci_fdt.c index 9a5b69ccf99..807fac3d441 100644 --- a/sys/dev/fdt/ehci_fdt.c +++ b/sys/dev/fdt/ehci_fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci_fdt.c,v 1.5 2019/05/10 18:20:41 patrick Exp $ */ +/* $OpenBSD: ehci_fdt.c,v 1.6 2019/08/11 11:16:05 kettenis Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -220,11 +220,7 @@ ehci_init_phys(struct ehci_fdt_softc *sc) { uint32_t *phys; uint32_t *phy; - int len, idx; - - idx = OF_getindex(sc->sc_node, "usb", "phy-names"); - if (idx < 0) - return; + int len; len = OF_getproplen(sc->sc_node, "phys"); if (len <= 0) @@ -235,15 +231,10 @@ ehci_init_phys(struct ehci_fdt_softc *sc) phy = phys; while (phy && phy < phys + (len / sizeof(uint32_t))) { - if (idx == 0) { - ehci_init_phy(sc, phy); - free(phys, M_TEMP, len); - return; - } - + ehci_init_phy(sc, phy); phy = ehci_next_phy(phy); - idx--; } + free(phys, M_TEMP, len); } |