svn commit: r307098 - head/sys/dev/usb/controller
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Wed Oct 12 03:36:48 UTC 2016
Author: gonzo
Date: Wed Oct 12 03:36:46 2016
New Revision: 307098
URL: https://svnweb.freebsd.org/changeset/base/307098
Log:
Make BCM28x USB driver compatible with upstream device tree
This should have been committed in r307093: resource allocation depends
on source of the device tree. upstream dts has extra interrupt that we can
ignore
Modified:
head/sys/dev/usb/controller/dwc_otg_fdt.c
Modified: head/sys/dev/usb/controller/dwc_otg_fdt.c
==============================================================================
--- head/sys/dev/usb/controller/dwc_otg_fdt.c Wed Oct 12 03:32:47 2016 (r307097)
+++ head/sys/dev/usb/controller/dwc_otg_fdt.c Wed Oct 12 03:36:46 2016 (r307098)
@@ -121,7 +121,12 @@ dwc_otg_attach(device_t dev)
sc->sc_otg.sc_io_hdl = rman_get_bushandle(sc->sc_otg.sc_io_res);
sc->sc_otg.sc_io_size = rman_get_size(sc->sc_otg.sc_io_res);
- rid = 0;
+
+ /*
+ * brcm,bcm2708-usb FDT provides two interrupts,
+ * we need only second one (VC_USB)
+ */
+ rid = ofw_bus_is_compatible(dev, "brcm,bcm2708-usb") ? 1 : 0;
sc->sc_otg.sc_irq_res =
bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
if (sc->sc_otg.sc_irq_res == NULL)
More information about the svn-src-all
mailing list