summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller/dwc_otg_fdt.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r307518:hselasky2016-11-071-6/+0
| | | | | | | | | | | | | | | | | | | | | Fix device delete child function. When detaching device trees parent devices must be detached prior to detaching its children. This is because parent devices can have pointers to the child devices in their softcs which are not invalidated by device_delete_child(). This can cause use after free issues and panic(). Device drivers implementing trees, must ensure its detach function detaches or deletes all its children before returning. While at it remove now redundant device_detach() calls before device_delete_child() and device_delete_children(), mostly in the USB controller drivers. Tested by: Jan Henrik Sylvester <me@janh.de> Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D8070
* MFC r307067, r307068, r307087, r307088, r307089,gonzo2016-10-181-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r307091, r307092, r307093, r307095, r307098, r307115: r307067: Make intc driver compatible with upstream DTS - Fix compatibility strings - Properly decode upstream's two-cell interrupt specs. Our home-made dts does not have two-cell interrupts so no need to preserve backward compatibility r307068: Make Rapsberry Pi watchdog driver compatible with upstream DTS - Fix compatibility strings - Compensate the difference in base address for our custom DTS and upstream one (for backward compatibility) r307087: Make sure intc is attached before interrupt consumers If pass order is not specified devices are attached in the order they are defined in dts. Some interrupt consumers may be defined before intc. Also make sure intc interrupt-parent local_intc is attached before intc itself. r307088: Add compatible strings used in upstream dts files r307089: Make framebuffer driver compatible with upstream DT - Add compatibility string - Add simplebus as possible parent bus r307091: Add compatibility string from upstream DT r307092: Make BCM2835 GPIO driver compatible with upstream DT - Add compatibility string - Make reserverd and read-only properties optional r307093: Make BCM283x USB driver compatible with upstream DT - Make resource allocation logic depend on compatibility string to check what format of DTS node should be used - FreeBSD's or upstream r307095: Make VCHI driver compatible with upstream DT - Add compatibility string - Compensate difference in base address between our custom DTB and upstream one r307098: 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 r307115: Fix typo in comment Spotted by: loos
* Add support for enabling the USB on the Raspberry Pi boards when it hasn'tandrew2015-03-081-11/+7
| | | | | | | | | | | | | been done by U-Boot. This allows the USB to work when we load the kernel directly. No dma sync is performed after these operations as the data we read/write is not used by the cpu after the calls to the maimbox driver. Differential Revision: https://reviews.freebsd.org/D1940 Reviewed by: imp, Michal Meloun (meloun AT miracle.cz) MFC after: 1 Week Sponsored by: ABT Systems Ltd
* Sort and remove unnecessary headers.loos2015-03-031-14/+4
|
* Add 64-bit DMA support in the XHCI controller driver.hselasky2015-01-051-0/+1
| | | | | | | - Fix some comments and whitespace while at it. MFC after: 1 month Submitted by: marius@
* - Add softc pointer argument to FIFO functions as an optimisation.hselasky2014-05-181-1/+1
| | | | | | | | - Implement support for interrupt filters in the DWC OTG driver, to reduce the amount of CPU task switching when only feeding the FIFOs. - Add common spinlock to the USB bus structure. MFC after: 2 weeks
* Multiple DWC OTG host mode related fixes and improvements:hselasky2014-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rework how we allocate and free USB host channels, so that we only allocate a channel if there is a real packet going out on the USB cable. - Use BULK type for control data and status, due to instabilities in the HW it appears. - Split FIFO TX levels into one for the periodic FIFO and one for the non-periodic FIFO. - Use correct HFNUM mask when scheduling host transactions. The HFNUM register does not count the full 16-bit range. - Correct START/COMPLETION slot for TT transactions. For INTERRUPT and ISOCHRONOUS type transactions the hardware always respects the ODDFRM bit, which means we need to allocate multiple host channels when processing such endpoints, to not miss any so-called complete split opportunities. - When doing ISOCHRONOUS OUT transfers through a TT send all data payload in a single ALL-burst. This deacreases the likelyhood for isochronous data underruns. - Fixed unbalanced unlock in case of "dwc_otg_init_fifo()" failure. - Increase interrupt priority. MFC after: 2 weeks
* Add support for specifying USB controller mode via FDT.hselasky2014-04-181-0/+18
| | | | | | | | Add FDT support to the DWC OTG kernel module. Submitted by: John Wehle <john@feith.com> PR: usb/188683 MFC after: 1 week
* Follow r261352 by updating all drivers which are children of simplebusian2014-02-021-0/+4
| | | | | | | | | | | | | to check the status property in their probe routines. Simplebus used to only instantiate its children whose status="okay" but that was improper behavior, fixed in r261352. Now that it doesn't check anymore and probes all its children; the children all have to do the check because really only the children know how to properly interpret their status property strings. Right now all existing drivers only understand "okay" versus something- that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
* Move and rename dwc otg driver to moreganbold2013-10-211-0/+211
generic one as it appears to work for rk3188 SoC based board too. No objections from: hselasky@ Reviewed by: ray@
OpenPOWER on IntegriCloud