1. 06 May, 2014 1 commit
  2. 29 Apr, 2014 1 commit
  3. 26 Apr, 2014 1 commit
    • Jeffrey Lee's avatar
      Update to latest code from Raspberry Pi github · a17ef0c8
      Jeffrey Lee authored
      Detail:
        Makefile, dwc/* - Updated to latest code from Raspberry Pi github (rev e0001dd59d). Includes the fabled 'FIQ fix' code, although the code isn't yet enabled in the RISC OS version of the driver.
        c/cmodule - Add extra flags for controlling driver behaviour, as required by the new core code
        c/dwc_otg_riscos - Add some missing driver parameters (although we leave them at default). Handle DWC_E_SHUTDOWN xfer errors, which will now be produced when the driver is shutting down
        c/softc_device - Disable interrupts around dwc_otg_hcd_urb_enqueue, to mirror behaviour of Linux code (previously, it was the responsibility of the DWC code to disable interrupts for the appropriate part of the operation)
        s/regaccess - Add some extra IRQ/memory barrier functions required by the new code (mainly the FIQ fix). Make DWC_MODIFY_REG32 operate atomicly (mirrors change in Linux version)
      Admin:
        Tested on Raspberry Pi
      
      
      Version 0.11. Tagged as 'DWCDriver-0_11'
      a17ef0c8
  4. 30 Mar, 2013 1 commit
    • Jeffrey Lee's avatar
      Fix hang on boot · 07e72b27
      Jeffrey Lee authored
      Detail:
        c/cmodule - Add a re-entrancy check to USB driver initialisation; due to recent kernel changes we're now getting the "USBDriver has started" service call during the middle of our call to USBDriver_Register (called from our own initialisation callback). Without the re-entrancy check the system was getting confused and sending a duff transfer request to DWCDriver, resulting in a hang somewhere in the driver logic.
      Admin:
        Tested on Raspberry Pi
        Machine no longer stops after "mod init done" is displayed
      
      
      Version 0.10. Tagged as 'DWCDriver-0_10'
      07e72b27
  5. 17 Sep, 2012 1 commit
    • Jeffrey Lee's avatar
      Update to version 3.00 of DWC_otg · d854b974
      Jeffrey Lee authored
      Detail:
        This big batch of changes brings us in line with rev 70428950df of the Raspberry Pi Linux github.
        Briefly:
        * Deleted HTML docs as they're a waste of space
        * Dropped the SOF fix (which we never used anyway)
        * Dropped our implementation of the microframe scheduling patch, in favour of their implementation
        * Updated to version 3.00 of the DWC sources. Hard to tell what useful changes this brings, due to API tweaks resulting in pretty much every file being littered with changes.
      Admin:
        Tested on Raspberry Pi with high processor vectors
        This new version seems like it might be a bit more sensitive to insufficient power supplies. Beware!
      
      
      Version 0.09. Tagged as 'DWCDriver-0_09'
      d854b974
  6. 04 Aug, 2012 1 commit
    • Jeffrey Lee's avatar
      Fix aborts on reset/*rmkill USBDriver · 75f42235
      Jeffrey Lee authored
      Detail:
        c/cmodule, cmhg/modhead - Don't shutdown DWC layer during Service_USBDriver_Dying. Instead, only do it during Service_ModulePostFinal/Service_PreReset(/module finialisation). Also during Service_PreReset, deregister with USBDriver. This ensures we're deregistered with USBDriver before we shut down the DWC layer, and so don't have to worry about receiving events from USBDriver after the DWC layer is shut down.
        c/dwc_common_riscos, c/dwc_otg_riscos, h/dwc_common_riscos - Improve handling of DWC endpoint disable callbacks. The memory block for the endpoint now has a flag set in its header when a callback is pending, allowing us to avoid double-free situations if both ourselves and the DWC layer decide to free the endpoint.
        c/softc_root - Correct some debug messages
        dwc/driver/c/dwc_otg_hcd - Fix qh_list_free to use DWC_LIST_FOREACH_SAFE (as dwc_otg_hcd_qh_remove_and_free will remove entries from the list) - fixes potential double-free if a non-empty list is being freed
        dwc/driver/c/dwc_otg_hcd_intr - Fix building of debug builds
      Admin:
        Tested in Pi ROM with high processor vectors
        Resets and killing/reiniting USBDriver now works properly
      
      
      Version 0.08. Tagged as 'DWCDriver-0_08'
      75f42235
  7. 02 Aug, 2012 1 commit
    • Jeffrey Lee's avatar
      Fix mutex implementation · 2c8ed4d4
      Jeffrey Lee authored
      Detail:
        c/dwc_common_riscos - Mutex lock/trylock functions had defective logic that would have resulted in them ignoring the lock state of the mutex and claiming it while it was still in use by another thread.
      Admin:
        Tested on Raspberry Pi with high processor vectors
      
      
      Version 0.07. Tagged as 'DWCDriver-0_07'
      2c8ed4d4
  8. 22 Jul, 2012 1 commit
    • Jeffrey Lee's avatar
      Incorporate patch to add support for scheduling of transfers on a per-microframe basis · 153b386d
      Jeffrey Lee authored
      Detail:
        Makefile, dwc/driver/c/dwc_otg_hcd, dwc/driver/c/dwc_otg_hcd_intr, dwc/driver/c/dwc_otg_hcd_queue, dwc/driver/h/dwc_otg_hcd - Adapted the microframe scheduling patch at http://git.denx.de/?p=linux-denx.git;a=commit;h=9796e39e7a513d8a4acde759ec5d0023645143d8 to work with our newer version of the DWC driver. Enabled by SCHEDULE_PATCH #define.
        dwc/driver/c/dwc_otg_hcd_ddma - Fix up descriptor DMA support to compile (but not run properly) when the scheduling patch is active
        dwc/dwc_common_port/h/dwc_os - Provide local_irq_save() and local_irq_restore() implementations, as used by the scheduling patch
      Admin:
        Tested on Raspberry Pi with high processor vectors
        Appears to fix problems with devices becoming unresponsive once too many periodic transfers are active (e.g. too many interrupt pipes open)
      
      
      Version 0.06. Tagged as 'DWCDriver-0_06'
      153b386d
  9. 21 Jul, 2012 1 commit
    • Jeffrey Lee's avatar
      Track latest developments on Raspberry Pi github · c0223aea
      Jeffrey Lee authored
      Detail:
        Makefile, c/cmodule, h/module, dwc/driver/c/dwc_otg_driver, dwc/driver/c/dwc_otg_hcd, dwc/driver/c/dwc_otg_hcd_ddma, dwc/driver/c/dwc_otg_hcd_intr, dwc/driver/c/dwc_otg_hcd_linex, dwc/driver/h/dwc_otg_hcd, dwc/dwc_common_port/c/dwc_common_linux - Track latest developments on Raspberry Pi github. Includes fixes for buffer overruns when unexpectedly receiving too much data, and changes to allow SOF interrupt spam to be reduced.
        c/dwc_common_riscos - Make sure we always round up delay values when converting from msec to csec. Avoids issues with high frequency timers (e.g. SOF re-enable timer) hogging all the CPU time. May be the cause of some other bad behaviour that I've experienced in the past?
      Admin:
        Tested on Raspberry Pi with high processor vectors
        Note - SOF fix is currently disabled, as it was causing too many interrupt packets (e.g. mouse clicks) to be lost. Probable cause is that we're running the SOF re-enable timer at 100Hz instead of 1kHz. May be worth investigating moving all timer/thread scheduling over to a HAL timer which can provide us a 1kHz ticker interrupt.
      
      
      Version 0.05. Tagged as 'DWCDriver-0_05'
      c0223aea
  10. 24 Jun, 2012 1 commit
    • Jeffrey Lee's avatar
      Update to latest code from Raspberry Pi github. Improve debugging. Fix race... · eb6b48ef
      Jeffrey Lee authored
      Update to latest code from Raspberry Pi github. Improve debugging. Fix race condition that could lead to timeout callbacks inappropriately firing.
      
      Detail:
        Makefile, dwc/* - Updated to latest code from Raspberry Pi github. Tweaks specific to Broadcom hardware have been placed in BCM2835 #ifdef's to allow them to easily be identified/controlled if we need the driver to support different SoCs in future
        c/cmodule, c/dwc_common_riscos, c/port, c/softc_device, h/cmodule - Improved debugging code
        c/softc_device - Schedule timeout before starting transfer instead of after. Fixes issue where a transfer that completes inbetween dwc_otg_hcd_urb_enqueue() and callout_reset() would result in the timeout being enabled even though the transfer is already complete
        s/triggercbs - Synced with latest USBDriver version for consistency
      Admin:
        Tested on Raspberry Pi with high processor vectors
        Fixes some, if not all, stability issues
      
      
      Version 0.04. Tagged as 'DWCDriver-0_04'
      eb6b48ef
  11. 15 Jun, 2012 1 commit
    • Jeffrey Lee's avatar
      Add memory barriers to register reads/writes. Reduce frequency of memory allocations. · 5ae117ef
      Jeffrey Lee authored
      Detail:
        s/regaccess - New file containing assembler register access routines, with memory barriers to protect against the BCM2835 AXI bus returning device loads out-of-order
        Makefile, dwc/dwc_common_port/h/dwc_os - Updated to use register access functions instead of inline code
        c/dwc_common_riscos - Added a simple bucket-and-chain data structure to dwc_alloc/dwc_free, to collect free memory blocks and allow them to be reused later, to reduce the load on the heap manager.
      Admin:
        Tested in BCM2835 ROM
      
      
      Version 0.03. Tagged as 'DWCDriver-0_03'
      5ae117ef
  12. 06 Jun, 2012 1 commit
    • Jeffrey Lee's avatar
      Misc housekeeping · fb5f8bf6
      Jeffrey Lee authored
      Detail:
        Makefile, !MkDebug,fd7 - Debug version of module can now be built just be passing "DEBUG=TRUE" to amu
        c/cmodule - Only accept USB controllers if HAL_USBControllerInfo says the struct size is an exact match with what we expect
        c/dwc_otg_riscos - Remove incorrect comment; both dwc_dma_alloc and malloc_contig zero memory
        s/bufman - Delete unused file
        s/call_veneer, s/triggercbs - Use Entry/EXIT macros to avoid single-reg LDM/STM performance warnings. Convert tabs to spaces.
      Admin:
        Tested in BCM2835 ROM
      
      
      Version 0.02. Tagged as 'DWCDriver-0_02'
      fb5f8bf6
  13. 03 Jun, 2012 2 commits
    • Jeffrey Lee's avatar
      Add initial version of DWCDriver - USB driver for Synopsys DWC OTG controllers · 6b7ce280
      Jeffrey Lee authored
      Detail:
        A fairly simple wrapper for Synopsys's open source "DWC_otg" Linux driver, based around a GPL-free version of the DWC_otg 2.90a sources received from the Raspberry Pi foundation.
        Instead of interfacing with the Linux USB stack a new host interface layer has been implemented to allow it to talk to the standard BSD-derived RISC OS stack.
        RTSupport is used to provide the threading functionality that the DWC driver relies upon.
        Interesting files:
        - c/cmodule, h/cmodule - Main module frontend
        - c/dwc_common_riscos, h/dwc_common_riscos - Implementation of the OS support layer required by the DWC driver
        - c/dwc_otg_riscos, h/dwc_otg_riscos - Core code for the BSD driver implementation, driver init/shutdown, and for handling calls from the DWC host driver to us
        - c/port - Some support functions required by BSD-style code inherited from the other USB drivers
        - c/softc_device - Code to handle requests from the BSD layer to attached USB devices
        - c/softc_root - Code to handle requests from the BSD layer to the controller root hub
        - dwc/doc/* - Original Synopsys release notes & user guide pdfs
        - dwc/driver/*, dwc/dwc_common_port/* - Synopsys code and documentation. A few tweaks were required to allow it to compile under Norcroft, but otherwise it's functionally equivalent to the original sources.
      Admin:
        Tested in BCM2835 ROM
        There are a few loose ends still to tidy up (search for "DWCTODO"), mainly regarding implementation of Isochronous support, but otherwise the driver seems stable enough for daily use.
      
      
      Version 0.01. Tagged as 'DWCDriver-0_01'
      6b7ce280
    • Jeffrey Lee's avatar
      created by srccommit. · 1c125993
      Jeffrey Lee authored
      1c125993