summaryrefslogtreecommitdiff
path: root/firmware/usb.c
AgeCommit message (Collapse)Author
2010-10-24AMSv2: fix bootloader build with USB enabledRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28342 a1c6a512-1295-4272-9138-f99709370657
2010-06-18as3525: bootloader USB modeRafaël Carré
not working yet : an empty drive is detected won't link on fuzev1: drivers allocated in usb_storage.c are too large git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26905 a1c6a512-1295-4272-9138-f99709370657
2010-06-05Put an #ifdef in the technically correct place. No functional change.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26599 a1c6a512-1295-4272-9138-f99709370657
2010-06-05New USB charging system, part 2 - "Force" charging modeTorne Wuff
Enable support for the "force" mode of USB charging. This should work on Gigabeat S and Nano2g (and any other future target which has a RB usb stack and supports charging) - if a host connection is not detected within 10 seconds of USB insertion, assume that the connected device is an AC charger and charge anyway, if the user has specified "force" as the mode. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26594 a1c6a512-1295-4272-9138-f99709370657
2010-05-06Move c/h files implementing/defining standard library stuff into a new libc ↵Thomas Martitz
directory, also standard'ify some parts of the code base (almost entirely #include fixes). This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2009-10-23Revert disabling of USB HID while in charging mode (introduced by r23322), inTomer Shalev
order to prevent having no interface at all when USB HID is disabled and the DAP is connected in charge-only mode (thanks for gevaerts for noticing). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23323 a1c6a512-1295-4272-9138-f99709370657
2009-10-23FS#10704 - Make a configuration option to disable USB HID Tomer Shalev
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23322 a1c6a512-1295-4272-9138-f99709370657
2009-10-20Fix redMichael Sparmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23286 a1c6a512-1295-4272-9138-f99709370657
2009-10-20iPod Nano 2G USB support based on the S3C6400X datasheet. Disabled by ↵Michael Sparmann
default for now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23285 a1c6a512-1295-4272-9138-f99709370657
2009-10-13Fixed a confusing typoMichael Sparmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23150 a1c6a512-1295-4272-9138-f99709370657
2009-06-08M:Robe 500: Mostly complete USB driver, supports BULK mode currently and ↵Karl Kurbjun
gets about 2 MB/s writes vs 1.1 MB/s on the OF. Mostly tested against Linux, preliminary testing in Windows appears to work. There is currently a bug in the attach process where it only works once per boot that needs to be fixed. There are a few other minor M:Robe 500 changes as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21208 a1c6a512-1295-4272-9138-f99709370657
2009-05-23Reorganise USB stack defines. Now config.h decides which class drivers get ↵Frank Gevaerts
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-16fix DEBUGF statement to print variables that actually exist (FS#10212 by ↵Frank Gevaerts
Tomer Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20964 a1c6a512-1295-4272-9138-f99709370657
2009-05-16Add working USB HID driver, by Tomer Shalev (part of his GSoC work).Frank Gevaerts
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-18USB related Cosmetics, whitespace and readability fixes (FS#10147 by Tomer ↵Frank Gevaerts
Shalev) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20737 a1c6a512-1295-4272-9138-f99709370657
2009-02-28Leave "usb mode" when all LUNs are ejected againFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20139 a1c6a512-1295-4272-9138-f99709370657
2009-02-25Don't use inverted button behaviour on H10 when using Rockbox USB (as ↵Frank Gevaerts
opposed to the OF diskmode) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20104 a1c6a512-1295-4272-9138-f99709370657
2009-02-21Only enable drivers if they exist. This should probably be handled ↵Frank Gevaerts
differently to avoid #ifdef hell, but at least this way works git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20074 a1c6a512-1295-4272-9138-f99709370657
2009-02-10Move screendump from apps to firmware, solving two nasty firmware-to-apps ↵Jens Arnold
calls. This required to move the filename creation functions as well. * Fix bug in the BMP header of Clip screendumps. * Add remote screendump for targets with an LCD remote. * Simplify some ifdefs and rename a macro in the sim. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19967 a1c6a512-1295-4272-9138-f99709370657
2009-01-22Use bus reset detection for all ARC OTG devices. Remove conflict from ↵Michael Sevakis
LV24020LP driver with some GPIO-by-number macros for PP502x. Start monitoring for USB stack once all core threads and queues are created otherwise queues will likely be registered after USB acks. Putting PP502x system_reboot in IRAM (unmapped, uncached) memory seems to help it work more consistently. Hopefully I got all the PP USB connect handlers in the right spot in irq_handler. If device seems unresponsive to cable, check there first. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19819 a1c6a512-1295-4272-9138-f99709370657
2009-01-19USB detection changes. c200/e200: Consider USB to be powered when charger is ↵Michael Sevakis
plugged but detect USB connection by bus reset. When received, disconnect and restart the driver fully enabled. imx31: Fix hack used to make initial connect succeeded-- set PHY type before initial reset. General: Move some target code out of usb-drv-arc.c and implement it in respective usb sources and CPU headers so things stay clean. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19797 a1c6a512-1295-4272-9138-f99709370657
2009-01-14Do penance. Fix yellow.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19769 a1c6a512-1295-4272-9138-f99709370657
2009-01-14Gigabeat S has no need for a USB tick. Put in a simple framework that allows ↵Michael Sevakis
USB monitoring by event. Also add a couple missed usb_enable calls when the connection is not for 'slave mode'. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19768 a1c6a512-1295-4272-9138-f99709370657
2009-01-13Fix more red. Missed one other place it needed #ifdef HAVE_USB_POWER.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19764 a1c6a512-1295-4272-9138-f99709370657
2009-01-13Fix red. Forgot to add a #ifdef HAVE_USB_POWER in one spot.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19763 a1c6a512-1295-4272-9138-f99709370657
2009-01-13USB retweaking: Take out the USB_REQUEST/RELEASE_DISK scheme and simply ask ↵Michael Sevakis
the USB core whether or not any drivers require exclusive access at the moment of connect. Doing anthing else just produces nasty effects on Windows because it expects some communication just for enabling the PHY and not allowing it to mount volumes if a thread doesn't ack causes annoying error message boxes. Make behavior of each USB type identical from the system perspective. Some miscellaneous changes (simplify, ata->storage naming, define only used USB_* enums values were possible). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19762 a1c6a512-1295-4272-9138-f99709370657
2008-12-13Keyclick fixup take two. It is only 88 samples (2msec) long so keep a small ↵Michael Sevakis
static buffer around for beeps less than or equal to keyclick duration. This way it operates no matter the buffer state and still won't interfere with alternate PCM operations like recording or plugin playback. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19415 a1c6a512-1295-4272-9138-f99709370657
2008-12-13PCM buffer beeping needs the audio buffer reset in order to work after ↵Michael Sevakis
operations that trash the buffer or keyclick won't be audible until playback is restarted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19413 a1c6a512-1295-4272-9138-f99709370657
2008-12-10Fix red and a couple other things I somehow missed.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19378 a1c6a512-1295-4272-9138-f99709370657
2008-12-10Use cookies for thread identification instead of pointers directly which ↵Michael Sevakis
gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
2008-12-03Hopefully mop-up remaining red.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19317 a1c6a512-1295-4272-9138-f99709370657
2008-12-03Straighten out some powermanagement stuff. Give target complete control over ↵Michael Sevakis
how power inputs are sensed. Clean SIMULATOR stuff out of target files. Get rid of USB charging option on targets that don't support it or don't implement it yet. Menu string remains to avoid language incompatibility but should be removed on next cleanup for targets not using it (notice in english.lang). global_settings becomes incompatible for some builds and so plugin API version is incremented. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19315 a1c6a512-1295-4272-9138-f99709370657
2008-11-30don't waste time and binsize enabling the usb controller just before rebootingFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19277 a1c6a512-1295-4272-9138-f99709370657
2008-11-21Commit some USB and ATA rework/refactoring (+ USB GPIO detection).Maurus Cuelenaere
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19165 a1c6a512-1295-4272-9138-f99709370657
2008-11-09Properly guard usb_mmc_countdown with the proper #ifs everywhereFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19053 a1c6a512-1295-4272-9138-f99709370657
2008-11-01Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do ↵Frank Gevaerts
that, it also introduces sd_*, nand_*, and mmc_*. This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
2008-10-31cleanup storage definesFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18950 a1c6a512-1295-4272-9138-f99709370657
2008-10-14telechips usb: not ready for use but, something is working, needs improvement.Vitja Makarov
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18806 a1c6a512-1295-4272-9138-f99709370657
2008-10-07add HAVE_DISK_STORAGE, and use that instead of HAVE_FLASH_STORAGE when ↵Frank Gevaerts
checking for an actual disk (i.e. related to spindown, skipping,...) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18735 a1c6a512-1295-4272-9138-f99709370657
2008-09-24Fix red.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18633 a1c6a512-1295-4272-9138-f99709370657
2008-09-24Repair bootbox on the archoses (that bug went undetected for >2.5 years), ↵Jens Arnold
and get rid of some old debug cruft in order to save space. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18631 a1c6a512-1295-4272-9138-f99709370657
2008-09-16Fix wrong #endif placement.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18534 a1c6a512-1295-4272-9138-f99709370657
2008-08-20properly remount the filesystem after usb disconnect with software usbFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18323 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
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-141) Use a separate config-<target>.h for Zen Vision(:M) (60GB)Maurus Cuelenaere
2) Other unrelated cleanups git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17503 a1c6a512-1295-4272-9138-f99709370657
2008-05-10Bring Gigabeat S bootloader one step close to a release version.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17442 a1c6a512-1295-4272-9138-f99709370657
2008-04-24Commit whole Creative Zen Vision:M target tree + all related firmware/ Maurus Cuelenaere
changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17241 a1c6a512-1295-4272-9138-f99709370657
2008-04-18UMS for the Gigabeat S. Bootloader USB mode. Has a couple quirks 1) First ↵Michael Sevakis
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-04-07Hopefully fix FS#8506 (OF cant be loaded on some PP targets). also hopefully ↵Jonathan Gordon
fixes usb detection for at least e200 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17017 a1c6a512-1295-4272-9138-f99709370657
2008-03-26Do core interrupt masking in a less general fashion and save some ↵Michael Sevakis
instructions to decrease size and speed things up a little bit. Small fix to a few places where interrupts would get enabled again where they shouldn't have been (context switching calls when disabled). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16811 a1c6a512-1295-4272-9138-f99709370657