Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Oct 2016 03:36:46 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307098 - head/sys/dev/usb/controller
Message-ID:  <201610120336.u9C3ak90073331@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610120336.u9C3ak90073331>