[Balloon] sa1100_udc gadget driver of 2.6.12-tcl1 awakes

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Nick Bane
Date:  
To: balloon@balloonboard.org
CC: David Mason, Toby Churchill
Subject: [Balloon] sa1100_udc gadget driver of 2.6.12-tcl1 awakes
I have at long last spotted the main problem preventing the the 2.6
kernel sa1100_udc driver from being used and therfore being a
showstopper for Toby Churchill Ltd being able to use the 2.6 kernel in
its products.
It was of course obvious in retrospect.

The endpoint naming conventions in the shell sa1100_udc.c was very
similar to the pxa driver and I was beguiled by its symmetry. These by
default have the first and second bulk endpoints declared as tx and rx.
The sa1100 bulk endpoints are fixed and the other way round as rx and
tx. Accordingly, ep[1] was mapped ep2 and ep[2] was mapped to ep1 (in
the old usbf naming scheme) and were expected to work ok but they didn't.

After laborious inspection and dma frustration it dawned on me that
ep[1] was actually enumerated to endpoint address #1 not #2 by the 2.6
gadget registration process (the 2.4 version had embedded addressing
that changed in 2.6) which therefore swapped the endpoint addresses. For
example, the ep[2] which was being used as ep1 had an address of 2 and
therefore was the tx endpoint but had the attribute of OUT which is a
slave input - confusing isn't it?

Fixing that opened the floodgates for data and I am able to tx and rx
packets though there are still some problems. I hope to have this
running properly by the end of the weekend whereupon I will post news to
the list.

Nick Bane