Commit Graph

8 Commits

Author SHA1 Message Date
Hans Petter Selasky
4f27ddac0e Use correct length mask for split transactions. The hardware would
sometimes put non-zero values in the upper length bits, which are
available for high-speed-only USB transactions, breaking the reception
of data.
2014-11-22 08:47:04 +00:00
Hans Petter Selasky
dd5a01badc Add basic support for isochronous transfers in host mode to the
ISP/SAF1761 driver.

Sponsored by:	DARPA, AFRL
2014-06-01 10:22:18 +00:00
Hans Petter Selasky
4272b84663 Fixes for ISP/SAF1761 host mode:
- Make the USB hardware skip PTDs which are not allocated.
- Peek host memory twice. Sometimes the PTD status is incorrectly
returned as zero.
- Ensure the host channel is always freed when software TD
is completing.
- Add correct configuration of interrupt polarity and type.
- Set CERR to 2 for asynchronous traffic to avoid having to
reactivate the PTD when a NAK token is received.
- Fix detection of STALL PID.

Sponsored by:	DARPA, AFRL
2014-05-28 16:28:22 +00:00
Hans Petter Selasky
21c85d9d3b Multiple fixes and improvements:
- Put "_LE_" into the register access macros to indicate little endian
byte order is expected by the hardware.
- Avoid using the bounce buffer when not strictly needed. Try to move
data directly using bus-space functions first.
- Ensure we preserve the reserved bits in the power down mode
register. Else the hardware goes into a non-recoverable state.
- Always use 32-bit access when writing or reading registers or FIFOs,
because the hardware is 32-bit oriented and don't really understand 8-
and 16-bit access.
- Correct writes to the memory address register. There is no need to
shift the register offset.
- Correct interval for interrupt endpoints.
- Optimise 90ns internal memory buffer read delay.
- Rename PDT into PTD, which is how the datasheet writes it.
- Add missing programming for activating host controller PTDs.

Sponsored by:	DARPA, AFRL
2014-05-27 10:01:19 +00:00
Hans Petter Selasky
c13c64fa63 - Replace some constants with macros.
- Need to set the pre-fetch memory address when reading the host memory.
- We currently assume that no endianness conversion is needed.

Sponsored by:	DARPA, AFRL
2014-05-21 09:26:02 +00:00
Hans Petter Selasky
6804df87a9 Correct some programming details. The layout of the PDTs were
different from what was initially thought. Fix re-programming of
hardware mode register after reset.

Sponsored by:	DARPA, AFRL
2014-05-20 14:15:03 +00:00
Hans Petter Selasky
dfe11c1395 Enable host controller interrupts.
Sponsored by:	DARPA, AFRL
2014-05-16 16:36:07 +00:00
Hans Petter Selasky
f46e2f146b Rename "saf1761_dci_xxx" into "saf1761_otg_xxx" to reflect that this
driver supports both host and device side mode.

Sponsored by:	DARPA, AFRL
2014-05-16 15:50:21 +00:00