generic_ohci.c (308401) | generic_ohci.c (332025) |
---|---|
1/*- 2 * Copyright (c) 2006 M. Warner Losh. All rights reserved. 3 * Copyright (c) 2016 Emmanuel Vadot <manu@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 */ 27 28/* 29 * Generic OHCI driver based on AT91 OHCI 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2006 M. Warner Losh. All rights reserved. 3 * Copyright (c) 2016 Emmanuel Vadot <manu@freebsd.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 16 unchanged lines hidden (view full) --- 25 * SUCH DAMAGE. 26 */ 27 28/* 29 * Generic OHCI driver based on AT91 OHCI 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: stable/11/sys/dev/usb/controller/generic_ohci.c 308401 2016-11-07 08:36:06Z hselasky $"); | 33__FBSDID("$FreeBSD: stable/11/sys/dev/usb/controller/generic_ohci.c 332025 2018-04-04 13:23:06Z mmel $"); |
34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/bus.h> 38#include <sys/rman.h> 39#include <sys/condvar.h> 40#include <sys/kernel.h> 41#include <sys/module.h> --- 138 unchanged lines hidden (view full) --- 180 device_printf(dev, "Could not de-assert reset %d\n", 181 off); 182 goto error; 183 } 184 } 185 186 /* Enable phy */ 187 if (phy_get_by_ofw_name(dev, 0, "usb", &sc->phy) == 0) { | 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/bus.h> 38#include <sys/rman.h> 39#include <sys/condvar.h> 40#include <sys/kernel.h> 41#include <sys/module.h> --- 138 unchanged lines hidden (view full) --- 180 device_printf(dev, "Could not de-assert reset %d\n", 181 off); 182 goto error; 183 } 184 } 185 186 /* Enable phy */ 187 if (phy_get_by_ofw_name(dev, 0, "usb", &sc->phy) == 0) { |
188 err = phy_enable(dev, sc->phy); | 188 err = phy_enable(sc->phy); |
189 if (err != 0) { 190 device_printf(dev, "Could not enable phy\n"); 191 goto error; 192 } 193 } 194#endif 195 196 if (GENERIC_USB_INIT(dev) != 0) { --- 57 unchanged lines hidden (view full) --- 254 sc->ohci_sc.sc_io_res); 255 sc->ohci_sc.sc_io_res = NULL; 256 } 257 usb_bus_mem_free_all(&sc->ohci_sc.sc_bus, &ohci_iterate_hw_softc); 258 259#ifdef EXT_RESOURCES 260 /* Disable phy */ 261 if (sc->phy) { | 189 if (err != 0) { 190 device_printf(dev, "Could not enable phy\n"); 191 goto error; 192 } 193 } 194#endif 195 196 if (GENERIC_USB_INIT(dev) != 0) { --- 57 unchanged lines hidden (view full) --- 254 sc->ohci_sc.sc_io_res); 255 sc->ohci_sc.sc_io_res = NULL; 256 } 257 usb_bus_mem_free_all(&sc->ohci_sc.sc_bus, &ohci_iterate_hw_softc); 258 259#ifdef EXT_RESOURCES 260 /* Disable phy */ 261 if (sc->phy) { |
262 err = phy_disable(dev, sc->phy); | 262 err = phy_disable(sc->phy); |
263 if (err != 0) 264 device_printf(dev, "Could not disable phy\n"); 265 phy_release(sc->phy); 266 } 267 268 /* Disable clock */ 269 TAILQ_FOREACH_SAFE(clk, &sc->clk_list, next, clk_tmp) { 270 err = clk_disable(clk->clk); --- 50 unchanged lines hidden --- | 263 if (err != 0) 264 device_printf(dev, "Could not disable phy\n"); 265 phy_release(sc->phy); 266 } 267 268 /* Disable clock */ 269 TAILQ_FOREACH_SAFE(clk, &sc->clk_list, next, clk_tmp) { 270 err = clk_disable(clk->clk); --- 50 unchanged lines hidden --- |