4d3825c1 | 29-Nov-2018 |
Jean-Jacques Hiblot <jjhiblot@ti.com> |
usb: dwc3: Fix a compilation error with the edison defconfig
The error is: In file included from include/part.h:10:0, from include/usb.h:18, from include/linux/usb/
usb: dwc3: Fix a compilation error with the edison defconfig
The error is: In file included from include/part.h:10:0, from include/usb.h:18, from include/linux/usb/gadget.h:22, from drivers/usb/dwc3/ep0.c:20: include/ide.h:62:14: error: unknown type name ‘uchar’ void ide_led(uchar led, uchar status);
Fixing it by including common.h that defines the uchar type.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
show more ...
|
93991cf1 | 29-Nov-2018 |
Jean-Jacques Hiblot <jjhiblot@ti.com> |
dwc3-generic: Add select_dr_mode operation
The select_dr_mode operation is executed when the glue driver is probed. The role of this optional function is to configure the operating mode of the contr
dwc3-generic: Add select_dr_mode operation
The select_dr_mode operation is executed when the glue driver is probed. The role of this optional function is to configure the operating mode of the controller at the glue level.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
show more ...
|
446e3a20 | 29-Nov-2018 |
Jean-Jacques Hiblot <jjhiblot@ti.com> |
dwc3-generic: Handle the PHYs, the clocks and the reset lines
This make the driver more generic. At this point this driver can replace the dwc3-of-simple implementation. Make the description in the
dwc3-generic: Handle the PHYs, the clocks and the reset lines
This make the driver more generic. At this point this driver can replace the dwc3-of-simple implementation. Make the description in the Kconfig more generic too.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
show more ...
|
ff8d7558 | 29-Nov-2018 |
Jean-Jacques Hiblot <jjhiblot@ti.com> |
usb: udc: implement DM versions of usb_gadget_initialize()/_release()/_handle_interrupt()
When DM_USB_GADGET the platform code for the USB device must be replaced by calls to a USB device driver.
u
usb: udc: implement DM versions of usb_gadget_initialize()/_release()/_handle_interrupt()
When DM_USB_GADGET the platform code for the USB device must be replaced by calls to a USB device driver.
usb_gadget_initialize() probes the USB device driver. usb_gadget_release() removes the USB device driver.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
show more ...
|
889239d6 | 06-Apr-2017 |
Philipp Tomsich <philipp.tomsich@theobroma-systems.com> |
usb: dwc3: gadget: make cache-maintenance on event buffers more robust
Merely using dma_alloc_coherent does not ensure that there is no stale data left in the caches for the allocated DMA buffer (i.
usb: dwc3: gadget: make cache-maintenance on event buffers more robust
Merely using dma_alloc_coherent does not ensure that there is no stale data left in the caches for the allocated DMA buffer (i.e. that the affected cacheline may still be dirty).
The original code was doing the following (on AArch64, which translates a 'flush' into a 'clean + invalidate'): # during initialisation: 1. allocate buffers via memalign => buffers may still be modified (cached, dirty) # during interrupt processing 2. clean + invalidate buffers => may commit stale data from a modified cacheline 3. read from buffers
This could lead to garbage info being written to buffers before reading them during even-processing.
To make the event processing more robust, we use the following sequence for the cache-maintenance: # during initialisation: 1. allocate buffers via memalign 2. clean + invalidate buffers (we only need the 'invalidate' part, but dwc3_flush_cache() always performs a 'clean + invalidate') # during interrupt processing 3. read the buffers (we know these lines are not cached, due to the previous invalidation and no other code touching them in-between) 4. clean + invalidate buffers => writes back any modification we may have made during event processing and ensures that the lines are not in the cache the next time we enter interrupt processing
Note that with the original sequence, we observe reproducible (depending on the cache state: i.e. running dhcp/usb start before will upset caches to get us around this) issues in the event processing (a fatal synchronous abort in dwc3_gadget_uboot_handle_interrupt on the first time interrupt handling is invoked) when running USB mass storage emulation on our RK3399-Q7 with data-caches on.
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
show more ...
|