summaryrefslogtreecommitdiff
path: root/firmware/usb.c
AgeCommit message (Collapse)Author
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
2008-03-22Set usb_state to USB_POWERED on plugin for software usb device. Otherwise, ↵Frank Gevaerts
the state would remain USB_EXTRACTED when connected to a charger git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16752 a1c6a512-1295-4272-9138-f99709370657
2008-03-21fix H10 not rebooting on usb connect. Apologies to H10 users who enjoyed ↵Frank Gevaerts
their free but unintended USB stack. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16734 a1c6a512-1295-4272-9138-f99709370657
2008-03-21move an #endif to its proper place. This should not actually change anythingFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16732 a1c6a512-1295-4272-9138-f99709370657
2008-03-20move boosting for usb around a bit, so the cpu is boosted for the entire ↵Frank Gevaerts
duration of actual use of storage. On some setups just boosting for the actual transfers doesn't seem to work git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16726 a1c6a512-1295-4272-9138-f99709370657
2008-03-10remember to test a bit more when doing larger changes...Frank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16621 a1c6a512-1295-4272-9138-f99709370657
2008-03-10make the usb storage driver handle hotswap correctly, and exit the usb ↵Frank Gevaerts
screen once all drives are "ejected" (either as a command from the OS or physically) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16617 a1c6a512-1295-4272-9138-f99709370657
2008-03-06reorganise the usb stack to provide a clean separation between core and ↵Frank Gevaerts
class drivers git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16541 a1c6a512-1295-4272-9138-f99709370657
2008-03-02implement logf over usb-serial. Needs USB_SERIAL defined in usb_core.h to ↵Frank Gevaerts
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-03-02don't do small cleanups just before going to sleep...Frank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16474 a1c6a512-1295-4272-9138-f99709370657
2008-03-02small cleanupFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16473 a1c6a512-1295-4272-9138-f99709370657
2008-03-02Make it not reboot when plugged into a wall charger with USE_ROCKBOX_USB ↵Frank Gevaerts
diabled as well... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16472 a1c6a512-1295-4272-9138-f99709370657
2008-03-02Only show the usb screen once a real usb connection is established. In case ↵Frank Gevaerts
other threads are slow in acknowledging the SYS_USB_CONNECTED message, tell the OS that the disk is not ready yet (the OS interprets this as "spinning up") git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16471 a1c6a512-1295-4272-9138-f99709370657
2008-02-28HAVE_POWER isn't defined for any target. It should be HAVE_USB_POWER.Barry Wardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16442 a1c6a512-1295-4272-9138-f99709370657
2008-02-27check for HAVE_POWER outside all uses of USBPOWER_BUTTONFrank Gevaerts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16436 a1c6a512-1295-4272-9138-f99709370657
2008-02-27move the usb_core thread functionality to the main usb threadFrank Gevaerts
fix button-detection so screenshots and charge-only mode work without enabling UMS firewire detection is now handled separately from usb detection increase the usb thread priority while an UMS connection is active git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16435 a1c6a512-1295-4272-9138-f99709370657
2007-11-22New USB stackBjörn Stenberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15758 a1c6a512-1295-4272-9138-f99709370657