[PATCH 3/3] Add support for Atmel USBA device controller
Haavard Skinnemoen <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
Support high/full speed bulk/int/iso endpoints on Atmel AT32AP700x processors. Iso support added by Lars Häring <[email protected]> Signed-off-by: Haavard Skinnemoen <[email protected]> --- usb.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git a/usb.c b/usb.c index 835317a..de9b3df 100644 --- a/usb.c +++ b/usb.c @@ -402,6 +402,26 @@ static int autoconfig () fs_status_desc.bEndpointAddress = USB_DIR_IN | 3; EP_STATUS_NAME = "ep3in-int"; + /* Atmel AT32AP700x processors, high/full speed */ + } else if (stat (DEVNAME = "atmel_usba_udc", &statb) == 0) { + HIGHSPEED = 1; + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0108); + + fs_source_desc.bEndpointAddress + = hs_source_desc.bEndpointAddress + = USB_DIR_IN | 1; + EP_IN_NAME = "ep1in-bulk"; + fs_sink_desc.bEndpointAddress + = hs_sink_desc.bEndpointAddress + = USB_DIR_OUT | 2; + EP_OUT_NAME = "ep2out-bulk"; + + source_sink_intf.bNumEndpoints = 3; + fs_status_desc.bEndpointAddress + = hs_status_desc.bEndpointAddress + = USB_DIR_IN | 3; + EP_STATUS_NAME = "ep3in-int"; + } else { DEVNAME = 0; return -ENODEV; @@ -597,6 +617,46 @@ static int iso_autoconfig () fs_status_desc.bEndpointAddress = USB_DIR_IN | 3; EP_STATUS_NAME = "ep3-int"; + /* Atmel AT32AP700x processors, high/full speed */ + } else if (stat (DEVNAME = "atmel_usba_udc", &statb) == 0){ + HIGHSPEED = 1; + + device_desc.bcdDevice = __constant_cpu_to_le16 (0x0105); + + fs_source_desc.bEndpointAddress + = hs_source_desc.bEndpointAddress + = USB_DIR_IN | 5; + fs_source_desc.bmAttributes + = hs_source_desc.bmAttributes + = USB_ENDPOINT_XFER_ISOC; + fs_source_desc.wMaxPacketSize + = hs_source_desc.wMaxPacketSize + = __cpu_to_le16(min (bufsize, 1024)); + fs_source_desc.bInterval + = hs_source_desc.bInterval + = interval; + EP_IN_NAME = "ep5in-iso"; + + fs_sink_desc.bEndpointAddress + = hs_sink_desc.bEndpointAddress + = USB_DIR_OUT | 6; + fs_sink_desc.bmAttributes + = hs_sink_desc.bmAttributes + = USB_ENDPOINT_XFER_ISOC; + fs_sink_desc.wMaxPacketSize + = hs_sink_desc.wMaxPacketSize + = __cpu_to_le16(min (bufsize, 1024)); + fs_sink_desc.bInterval + = hs_sink_desc.bInterval + = interval; + EP_OUT_NAME = "ep6out-iso"; + + source_sink_intf.bNumEndpoints = 3; + fs_status_desc.bEndpointAddress + = hs_status_desc.bEndpointAddress + = USB_DIR_IN | 3; + EP_STATUS_NAME = "ep3in-int"; + } else { DEVNAME = 0; return -ENODEV; -- 1.5.3.1 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel