summaryrefslogtreecommitdiffstats
path: root/firmware/usbstack/usb_serial.c
AgeCommit message (Collapse)AuthorFilesLines
2016-08-04usb_serial: fix send buffer alignmentCástor Muñoz1-16/+11
Change-Id: Ib2635c905462cd34befa3ca61e5d55c869686b48
2016-08-02Introduce new USB driver for Synopsys DesignWare USB OTG core.Cástor Muñoz1-0/+11
Based on g#844 and g#949, it is intended as a replacement for the current s3c6400x USB driver. The DesignWare USB OTG core is integrated into many SoC's, however HW core version and capabilities (mainly DMA mode, Tx FIFO mode, FIFO size and number of available IN/OUT endpoins) may differ: CPU targets HW ver DMA NPTX FIFO FIFO sz #IN/OUT -------- ------------- ------ --- --------- ------- ------- as3525v2 sansaclipplus 2.60a Yes Dedicated 0x535 4/4 sansaclipv2 sansaclipzip sansafuzev2 s5l8701 ipodnano2g 2.20a Yes Shared 0x500 4/5 s5l8702 ipod6g 2.60a Yes Dedicated 0x820 7/7 ipodnano3g s5l8720 ipodnano4g ? ? ? ? ? Functionality supported by this driver: - Device mode, compatible with USB 1.1/2.0 hosts. - Shared FIFO (USB_DW_SHARED_FIFO) or dedicated FIFOs. - No DMA (USB_DW_ARCH_SLAVE) or internal DMA mode. - Concurrent transfers: control, bulk (usb_storage, usb_serial) and interrupt (usb_hid). Actually this driver is not used by any CPU, it will be enabled for each individual CPU/target in next patches. Change-Id: I74a1e836d18927a31f6977d71115fb442477dd5f
2011-12-29usb PACK_DATA: use a static inline to enable type checkingRafaël Carré1-3/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31467 a1c6a512-1295-4272-9138-f99709370657
2010-01-11Fix a bug in usbserial that would allow to send messages on EP_CONTROL ↵Amaury Pouly1-1/+0
between usb init and endpoints allocation via logf. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24214 a1c6a512-1295-4272-9138-f99709370657
2009-11-03Comment out LOGF_ENABLE defines everywhere, replace evil commentsJeffrey Goode1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23497 a1c6a512-1295-4272-9138-f99709370657
2009-08-19Add const to usb_serial_send() buffer.Frank Gevaerts1-1/+1
Flyspray: FS#10519 Author: Amaury Pouly git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22422 a1c6a512-1295-4272-9138-f99709370657
2009-08-12Limit usb_serial packets to 32 bytes. It's unclear why this is needed, but ↵Frank Gevaerts1-0/+3
usb serial packets larger than 96 bytes seem to never be sent. Thanks to Amaury Pouly for investigating this git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22285 a1c6a512-1295-4272-9138-f99709370657
2009-05-23Reorganise USB stack defines. Now config.h decides which class drivers get ↵Frank Gevaerts1-4/+0
enabled instead of usb_core.h Also enable HID, and use that as the dummy class instead of charging-only for controllers that have working interrupt transfers. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21053 a1c6a512-1295-4272-9138-f99709370657
2009-05-16Add working USB HID driver, by Tomer Shalev (part of his GSoC work).Frank Gevaerts1-5/+6
This needs support for usb interrupt transfers, so there are some changes in various USB drivers as well (only usb-drv-arc supports it at this point, others won't have working HID yet). HID is disabled for now, as the apps/ part is not included yet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20962 a1c6a512-1295-4272-9138-f99709370657
2009-04-19simplify and cleanup usb_serial.c (FS#10149 by Tomer Shalev)Frank Gevaerts1-36/+28
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20746 a1c6a512-1295-4272-9138-f99709370657
2009-04-18USB related Cosmetics, whitespace and readability fixes (FS#10147 by Tomer ↵Frank Gevaerts1-11/+6
Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20737 a1c6a512-1295-4272-9138-f99709370657
2009-04-18Allow class drivers to reuse the core data buffer for control transfers. ↵Frank Gevaerts1-1/+3
This doesn't make much difference right now, but it should keep HID memory usage lower (once HID is ready) (FS#10146 by Tomer Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20735 a1c6a512-1295-4272-9138-f99709370657
2009-04-18Add a PACK_DESCRIPTOR macro to make the class drivers a bit more readable ↵Frank Gevaerts1-9/+6
(FS#10145 by Tomer Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20733 a1c6a512-1295-4272-9138-f99709370657
2009-02-21small usb serial fixes. This seems to work fine on imx31, but for some ↵Frank Gevaerts1-8/+1
reason it sometimes stops sending data on portalplayer git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20077 a1c6a512-1295-4272-9138-f99709370657
2009-02-21more fixes. There's still something wrong as it sometimes suddenly stops ↵Frank Gevaerts1-25/+21
sending data. Disconnecting and reconnecting gets it going again git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20072 a1c6a512-1295-4272-9138-f99709370657
2009-02-20Fix ringbuffer handling. This will hopefully fix the hang-on-fast-send issueFrank Gevaerts1-33/+42
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20064 a1c6a512-1295-4272-9138-f99709370657
2009-02-16usb serial on PP seems to have broken. Fix itFrank Gevaerts1-3/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20023 a1c6a512-1295-4272-9138-f99709370657
2008-10-03reorganise the USB stack a bit to allow for easier integration of non-ARC ↵Frank Gevaerts1-14/+25
controller drivers git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18703 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg1-2/+4
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-05-06typo fixes (; instead of , at the end of two assignments)Frank Gevaerts1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17398 a1c6a512-1295-4272-9138-f99709370657
2008-05-03Added missing usb #includes to usb source files.Bertrik Sikken1-0/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17309 a1c6a512-1295-4272-9138-f99709370657
2008-04-26- change the usb class driver framework to allow for device classes with ↵Frank Gevaerts1-15/+28
more than one interface or more than one endpoint pair - move the charging-only dummy driver out of usb_core git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17252 a1c6a512-1295-4272-9138-f99709370657
2008-04-20Put USB controller structures in IRAM. This seems to make the connection ↵Frank Gevaerts1-1/+7
much more stable on PP502x git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17191 a1c6a512-1295-4272-9138-f99709370657
2008-04-18UMS for the Gigabeat S. Bootloader USB mode. Has a couple quirks 1) First ↵Michael Sevakis1-11/+8
plug has problems if cold. Replug if it doesn't connect or not at high speed 2) Linux doesn't like the odd bootable flag value used in the partitions so it won't mount but Windows works. Fix minor OTG driver bugs and clean up device memory handling. Generic name for ARC controller driver. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17154 a1c6a512-1295-4272-9138-f99709370657
2008-03-06reorganise the usb stack to provide a clean separation between core and ↵Frank Gevaerts1-36/+88
class drivers git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16541 a1c6a512-1295-4272-9138-f99709370657
2008-03-02extra input checkingFrank Gevaerts1-2/+9
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16493 a1c6a512-1295-4272-9138-f99709370657
2008-03-02remove a reundant MIN(), and reduce the buffer. We really don't need 16k for ↵Frank Gevaerts1-2/+2
this. It seems to work reliably at full speed. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16491 a1c6a512-1295-4272-9138-f99709370657
2008-03-02implement logf over usb-serial. Needs USB_SERIAL defined in usb_core.h to ↵Frank Gevaerts1-17/+102
work, and needs to be enabled in the debug menu. It stops sending data after a while for unknown reasons. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16486 a1c6a512-1295-4272-9138-f99709370657
2008-02-20Major USB stack improvements. It now works at nearly the maximum speed for a ↵Frank Gevaerts1-13/+21
full speed connection, and does seem stable. Still not enabled by default, #define USE_ROCKBOX_USB is still required to enable it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16360 a1c6a512-1295-4272-9138-f99709370657
2007-11-30Add a working serial driver to usb stack. At the moment it simply echos back ↵Christian Gmeiner1-0/+74
what it gets. You can test it on linux by 0) change relevant defines in usb_core.c 1) modprobe usbserial vendor=0x0781 product=0x7421 debug=1 2) picocom /dev/ttyUSB0 3) look at your logf screen if you build with logf support and enabled LOGF_ENABLE define in usb_serial.c I also modified usb_core so that storage and serial both can make use the the 'usb_core'-thread. More will come :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15850 a1c6a512-1295-4272-9138-f99709370657