- 19 Mar, 2021 1 commit
-
-
Colin Granville authored
Detail: cmodule.c, dwc_otg_riscos.c, dwc_otg_riscos.h, softc_device.c - modified to allow isochronous xfers. Admin: Tested on pi b+ and pi 4
-
- 04 Jul, 2020 1 commit
-
-
Robert Sprowson authored
The prototype for vtophys returns an unsigned value, update this driver to match the port header file from USBDriver-1_31. Version 0.37. Tagged as 'DWCDriver-0_37'
-
- 22 Apr, 2020 1 commit
-
-
Jeffrey Lee authored
TCPIPLibs-5_69's version of sys/time.h now includes the TCPIPLibs version of sys/types.h, which contains duplicate/conflicting definitions of CLib's clock_t & time_t from time.h. DWCDriver's port.c was including both sys/time.h and time.h, which means that for the past few weeks Norcroft has been throwing errors about the duplicate definitions (but still producing a valid object). However both of those includes appear to be redundant, so just remove them. Resulting binary is unchanged. Version 0.36. Not tagged
-
- 29 Feb, 2020 1 commit
-
-
Robert Sprowson authored
The MPHI is (ab)used by DWCDriver as a means to do a FIQ downgrade to IRQ, but Pi 4 has no MPHI, so instead we substitute the GIC. This is essentially a GIC based equivalent to the changes in https://github.com/raspberrypi/linux/commit/0a1cf0d. Apply these diffs then, in dwc_otg_riscos.c: * deduce use_swirq by noticing the MPHI base happens to have all 13 LSB clear whereas the GIC doesn't, in just as horrendously Pi specific manner as Linux looking at the size of the memory region to deduce same * setup the pointers to swirq_set and swirq_clr at GICD_ISPENDRn GICD_ICPENDRn Version 0.36. Tagged as 'DWCDriver-0_36'
-
- 02 Jun, 2018 1 commit
-
-
ROOL authored
Detail: Reflects change made here https://github.com/raspberrypi/linux/commit/7956536a3d78ba0ef8ec990651b315664ed70f90 after wider testing by the Linux community. Admin: Submission from Colin Granville. Version 0.35. Tagged as 'DWCDriver-0_35'
-
- 27 Jan, 2018 1 commit
-
-
ROOL authored
Detail: Listen for Service_USB_USBDriverDead then shut down the driver, rather than Service_ModulePostFinal. Ensure the returned status is defined if USBDriver_InsertTransfer fails (because USBDriver has gone). Admin: Submission from Colin Granville. Version 0.34. Tagged as 'DWCDriver-0_34'
-
- 25 Nov, 2017 1 commit
-
-
ROOL authored
Detail: For high speed interrupt endpoints, and full/high speed isochronous, the bInterval value is held in log2 form. Take this into account. Correct the built in root hub device descriptor similarly - 255 is not valid for a HSHUBSTT (USB 2.0 errata 07-Dec-2000 corrected the mistake on page 412 of the USB 2.0 spec). Admin: Based on a submission from Colin Granville, with edits. Version 0.33. Tagged as 'DWCDriver-0_33'
-
- 19 Sep, 2017 1 commit
-
-
ROOL authored
Detail: A few sections of code guarded by USBHAL defines carried over from MUSBDriver, but were never finished due to the complexity of DWCDriver. These are no longer needed now the kernel scans for keys, so remove them. Admin: Couple of warnings in cmodule.c also attended to. Submission for USB bounty. Version 0.32. Tagged as 'DWCDriver-0_32'
-
- 19 Aug, 2017 2 commits
- 15 Jul, 2017 1 commit
-
-
ROOL authored
Admin: Reach into USBDriver rather than NetBSD. Version 0.30. Tagged as 'DWCDriver-0_30'
-
- 17 Dec, 2016 1 commit
-
-
ROOL authored
Detail: Add support for standalone messages registration, and actually use the messages rather than just exporting them in ROM builds. Changed to use allocated error bases rather than 0. Sync controller hunting loop with other HC for ease of comparison. Admin: Submission for USB bounty. Tested on a Pi 2. Version 0.29. Tagged as 'DWCDriver-0_29'
-
- 10 Dec, 2016 1 commit
-
-
ROOL authored
Admin: Requires NetBSD-1_17
-
- 15 Jun, 2016 1 commit
-
-
Jeffrey Lee authored
Detail: s/regaccess - Issue CLREX on return from the FIQ handler, just in case we start using exclusive access instructions from within the handler. Update PSR manipulation code to use CPS in preference to MSR. Admin: Tested on Raspberry Pi Version 0.28. Tagged as 'DWCDriver-0_28'
-
- 02 May, 2016 1 commit
-
-
Robert Sprowson authored
From a tip off in https://www.riscosopen.org/forum/forums/4/topics/3990 Version 0.27. Tagged as 'DWCDriver-0_27'
-
- 27 Mar, 2016 2 commits
-
-
Jeffrey Lee authored
Version 0.26. Tagged as 'DWCDriver-0_26'
-
Jeffrey Lee authored
Detail: c/port - Fix vtophys requesting that pages are made uncacheable. They're already uncacheable (all allocated via PCI_RAMAlloc), and once we're done with the pages we never do a 'make cacheable' call to balance it out Admin: Tested on Pi 2B Version 0.25. Tagged as 'DWCDriver-0_25'
-
- 04 Mar, 2016 2 commits
-
-
ROOL authored
Admin: These changes are currently subject to rework via the normal submissions channel.
-
John Ballance authored
Detail: Changes to the RISC OS part of the DWCDriver (Raspberry Pi) necessary to get isochronous transfers working on a pi. DWCDriver.c.cmodule DWCDriver.c.dwc_otg_riscos DWCDriver.c.softc_device DWCDriver.h.dwc_otg_riscos Admin: submitted by Colin Granville tested on pi Version 0.25. Tagged as 'DWCDriver-0_25'
-
- 11 Dec, 2015 1 commit
-
-
Jeffrey Lee authored
Detail: dwc/driver/c/dwc_otg_cil - Set the force_host_mode bit to make the controller ignore the ID pin for devices with OTG ports (e.g. Pi Zero). This matches a recent change to the Linux version of the driver (https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=127003&start=50#p850028) and allows a plethora of non-OTG cables to be successfully used with the Pi Zero. Admin: Tested on Raspberry Pi B, Pi Zero Changes supplied by Colin Granville/Chris Evans Version 0.24. Tagged as 'DWCDriver-0_24'
-
- 18 Nov, 2015 1 commit
-
-
Robert Sprowson authored
Copy of the change in NetBSD-1_09. Version 0.23. Tagged as 'DWCDriver-0_23'
-
- 15 Nov, 2015 1 commit
-
-
ROOL authored
Detail: Play safe, put NULLs in for the unused HC overrides Version 0.22. Tagged as 'DWCDriver-0_22'
-
- 07 Oct, 2015 1 commit
-
-
Jeffrey Lee authored
Detail: Makefile, dwc/* - Updated to latest-ish code from Raspberry Pi github (rev c8baa9702c). Includes the 'FIQ FSM' USB driver, which replaces the older 'FIQ fix'. Note that many files appear to have no functional changes - just trailing whitespace removal to keep things in sync with github. Makefile - add DEBUGLIBS back into the debug libs listing to fix debug builds c/cmodule - Update to work with new FIQ FSM flags c/dwc_otg_riscos - Update to work with new FIQ FSM flags. Update initialisation procedure. Change IRQ handling to try both the HCD & CIL interrupt handlers (HCD can claim interrupt is handled when there's still a CIL interrupt pending). Disable support for falling back to IRQ if the FIQ vector is claimed by someone else - will need new implementation to cope with starting & stopping the FIQ FSM. s/regaccess - Update FIQ veneer & install routine to allow operation with either the dwc_otg_fiq_fsm or dwc_otg_fiq_nop functions. Admin: Tested on Raspberry Pi 1 & 2 Version 0.21. Tagged as 'DWCDriver-0_21'
-
- 21 Aug, 2015 1 commit
-
-
Robert Sprowson authored
cmodule.c: Use USBDriver.h from interface exports Makefile: Remove duplicated libs from debug build Remove relative reference to NetBSD component from VPATH !MkDebug: Select debug target so the right compiler switches are used Built, but not tested. Version 0.20. Tagged as 'DWCDriver-0_20'
-
- 28 Mar, 2015 1 commit
-
-
Jeffrey Lee authored
Detail: c/softc_device - Fix softc_device_start() to call usb_transfer_complete() with the appropriate status code if a transfer fails to start - returning the status to the caller isn't enough. Also tweak debug output and add extra safety checks to timeout cancellation. Admin: Tested on Raspberry Pi Version 0.19. Tagged as 'DWCDriver-0_19'
-
- 31 Oct, 2014 1 commit
-
-
Robert Sprowson authored
Having updated the central 'usb.h' to include some of the more recent definitions this has created a clash here. UHF_PORT_L1 isn't 5 according to the USB 2.0 spec, but since the only use of it in DWCDriver is wrapped in CONFIG_USB_DWC_OTG_LPM which isn't enabled in this port, just delete it. UHF_C_PORT_L1 is now defined in 'usb.h', delete local copy. UHF_PORT_HIGH_SPEED remains. In fact, it looks like the ported driver got confused when responding to GET_PORT_STATUS as it builds the status word out of bitmasks defined for hub feature manipulation (UHF) not port status (UPS) which are different number spaces. Oops. Version 0.18. Tagged as 'DWCDriver-0_18'
-
- 18 Oct, 2014 1 commit
-
-
Jeffrey Lee authored
Detail: c/dwc_otg_riscos - Round all IO buffers out to a multiple of 512 bytes. This is a workaround for the way dwc_otg_hc_start_transfer rounds IN transfer request sizes up to a multiple of the max packet size (due to hardware limitations?). Without this workaround, we can easily get memory corruption if a device sends a short packet which is longer than we're expecting. Admin: Tested on Raspberry Pi Believed to fix crashes seen when using some keyboards/mice: https://www.riscosopen.org/forum/forums/4/topics/2383?page=3#posts-33881 Version 0.17. Tagged as 'DWCDriver-0_17'
-
- 08 Jul, 2014 1 commit
-
-
Jeffrey Lee authored
Detail: This enables support for the code which handles split transactions in the FIQ handler. This requires some extra logic to allow the FIQ handler to gracefully terminate its state machine when we need to release our hold on the FIQ vector. c/dwc_otg_riscos - Update FIQ claim/release functions to initialise and terminate fiq_split_enable. Make FIQ usage bools static const as nothing needs to change them at runtime. h/dwc_otg_riscos - Remove unused use_fiq_fix extern dwc/driver/c/dwc_otg_hcd_intr - Modify fiq_hcintr_handle() to allow for graceful termination - when terminating, suppress adding new xfers to the schedule and instead force the IRQ handler to deal with them Admin: Tested on Raspberry Pi Thrashing Service_ClaimFIQ/Service_ReleaseFIQ didn't result in any obvious problems while split xfers were occuring Version 0.16. Tagged as 'DWCDriver-0_16'
-
- 19 Jun, 2014 1 commit
-
-
Jeffrey Lee authored
Detail: This change enables the basic 'FIQ fix', where SOF interrupts are handled by a FIQ handler and all other interrupts are delegated to IRQ. During testing it was observed that when the FIQ fix was enabled, what appears to be the host-side VCHIQ process would randomly die. It could take anywhere from several seconds (including during ROM init) or several hours for this to happen. After much investigation it looks like the cause was the use of the MPHI peripheral as a mechanism to trigger an IRQ from the FIQ handler. Changing the code in dwc_otg_hcd_handle_intr() so that it 'flushes' MPHI more often (after every interrupt instead of after every 60) seemed to reduce the problem, while changing the IRQ generation mechanism to use a different IRQ source (e.g. timer) made the crash go away entirely In the end I've settled on the compromise of using the MPHI peripheral, but in a way in which we only need to poke it once on startup, instead of once for every desired IRQ. Once we have it generating an IRQ we then rely on masking/unmasking the IRQ in the interrupt controller to get the desired effect of downgrading FIQs to IRQs. See the RISCOS_FIQ_DOWNGRADE #define. Changed files: - c/cmodule - Use symbolic constant for the USB controller ID instead of a magic number. Get the MPHI details from HAL_USBControllerInfo. Pay attention to Service_ClaimFIQ/Service_ReleaseFIQ and enable/disable the FIQ fix as appropriate. - c/dwc_common_riscos - Disable some debug functions which were accidentally left in non-debug builds. Change work queue/tasklet thread initialisation to fix a deadlock issue seen on reboot. - c/dwc_otg_riscos - Set up the MPHI and enable/disable the FIQ handler as required - cmhg/modhead - Pay attention to Service_ClaimFIQ/Service_ReleaseFIQ - dwc/driver/c/dwc_otg_hcd_intr, dwc/driver/h/dwc_otg_mphi_fix - RISCOS_FIQ_DOWNGRADE code - dwc/dwc_common_port/h/dwc_os - Make sure __DWC_WARN, __DWC_ERROR, DWC_EXCEPTION are compiled out in non-debug builds - h/dwc_otg_riscos - declare extra functions/variables related to FIQ fix - s/regaccess - Routine to install the FIQ handler on the FIQ vector, and simple HAL call wrapper Admin: Tested on Raspberry Pi Requires Kernel-5_35-4_79_2_227, BCM2835-0_34 Version 0.15. Tagged as 'DWCDriver-0_15'
-
- 01 Jun, 2014 1 commit
-
-
Jeffrey Lee authored
Detail: c/cmodule - Don't use NetBSD/build/service.h, it no longer exists. Use the exported USB/USBDevFS.h instead. Fix service call reason codes to use USBDevFS names. Admin: Tested in BCM2835 ROM build Build output is binary-identical to previous version Requires NetBSD-0_85 Version 0.14. Tagged as 'DWCDriver-0_14'
-
- 06 May, 2014 1 commit
-
-
Robert Sprowson authored
Version 0.13. Tagged as 'DWCDriver-0_13'
-
- 29 Apr, 2014 1 commit
-
-
Ben Avison authored
Version 0.12. Tagged as 'DWCDriver-0_12'
-
- 26 Apr, 2014 1 commit
-
-
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'
-
- 30 Mar, 2013 1 commit
-
-
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'
-
- 17 Sep, 2012 1 commit
-
-
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'
-
- 04 Aug, 2012 1 commit
-
-
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'
-
- 02 Aug, 2012 1 commit
-
-
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'
-
- 22 Jul, 2012 1 commit
-
-
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'
-
- 21 Jul, 2012 1 commit
-
-
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'
-
- 24 Jun, 2012 1 commit
-
-
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'
-