summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/usb-drv-as3525v2.c
AgeCommit message (Collapse)Author
2011-02-04AMSv2 USB: Remove usb_enable call that occurs after core is already ↵Michael Sevakis
initialized and the usb_disable call while in ISR. Also, no point in panicing over a disconnect. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29205 a1c6a512-1295-4272-9138-f99709370657
2011-01-29AMSv2 USB: Delay after sftdiscon should be far longer.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29154 a1c6a512-1295-4272-9138-f99709370657
2011-01-28AS3525v2 USB: Set disconnect before stopping module clock. Seems to cure ↵Michael Sevakis
reconnect weirdness for me and is probably the proper method anyway since otherwise the module will still be running when the clock is cut (bad). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29149 a1c6a512-1295-4272-9138-f99709370657
2011-01-27as3525v2-usb: fix logf format, don't mask the interrupt using the VIC as it ↵Amaury Pouly
seems to trigger spurious irq git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29146 a1c6a512-1295-4272-9138-f99709370657
2011-01-24as3525v2-usb: mask usb interrupt when setting up a transferAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29130 a1c6a512-1295-4272-9138-f99709370657
2011-01-24as3525v2-usb: only call wakeup_signal when a thread is actually waitingAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29129 a1c6a512-1295-4272-9138-f99709370657
2010-10-14as3525v2-usb! fix suspicious calculation of next endpoint in INs chaining codeAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28281 a1c6a512-1295-4272-9138-f99709370657
2010-09-12AMS USBv2: use OF settings for undocumented registerRafaël Carré
still failing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28061 a1c6a512-1295-4272-9138-f99709370657
2010-09-08USB AMSv2: use tables for usb_drv_port_speed() and usb_drv_mps_by_type()Rafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28044 a1c6a512-1295-4272-9138-f99709370657
2010-09-08USB AMSv2: split handle_ep_int()Rafaël Carré
IN & OUT interrupts have not much in common so move each to its own function git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28043 a1c6a512-1295-4272-9138-f99709370657
2010-09-08USB AMSv2: smaller struct usb_endpointRafaël Carré
- reorder members (largest members first) - int status -> int8_t status (we only use 0 or -1) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28042 a1c6a512-1295-4272-9138-f99709370657
2010-09-08USB AMSv2: only read endpoint interrupt status register onceRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28041 a1c6a512-1295-4272-9138-f99709370657
2010-09-08usb-drv-as3525v2.c: cosmetics (remove trailing spaces)Rafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28040 a1c6a512-1295-4272-9138-f99709370657
2010-09-08USB AMSv2: Reduce the size of (in/out)_ep_listRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28039 a1c6a512-1295-4272-9138-f99709370657
2010-09-08USB AMSv2: simplify FOR_EACH* macrosRafaël Carré
- use a single table to store endpoints numbers (1 table by direction) - drop __ prefix since the table isn't meant to be hidden (it is used in reset_endpoints() - the tables won't change at runtime: mark const git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28038 a1c6a512-1295-4272-9138-f99709370657
2010-09-08USB AMSv2: use status == -1 to signal errorsRafaël Carré
set status to failure before signaling usb_drv_send_nonblocking() in reset_endpoints() git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28037 a1c6a512-1295-4272-9138-f99709370657
2010-09-08USB AMSv2: cosmeticsRafaël Carré
Use ep0_setup_pkt as a pointer Fix comment for CGU_USB clk source Remove comment about physical address, the macro handles that for us git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28035 a1c6a512-1295-4272-9138-f99709370657
2010-09-08USB AMSv2: update endpoint->len on transferRafaël Carré
cosmetics: x ? true : false -> x git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28034 a1c6a512-1295-4272-9138-f99709370657
2010-09-08usb-drv-as3525v2: use dump_dcache_range()Rafaël Carré
Since we'll receive data from DMA in this buffer we don't need to write-back git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28032 a1c6a512-1295-4272-9138-f99709370657
2010-09-08usb-drv-as3525v2: fixesRafaël Carré
- don't use *_dcache_range() on uncached memory - remove unused struct endpoint->buffer - use correct *_dcache_range() in usb_drv_transfer() for each direction - halve FIFO size sometimes mounts / sometimes fails git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28031 a1c6a512-1295-4272-9138-f99709370657
2010-09-07as3525v2-usb: don't disable data transfers !Amaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28030 a1c6a512-1295-4272-9138-f99709370657
2010-09-07as3525v2-usb: fix red and fix stupid typo about endpoint statusAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28029 a1c6a512-1295-4272-9138-f99709370657
2010-09-07as3525v2-usb: all control operations are working, there is a problem with ↵Amaury Pouly
UMS: the IN transfer to respond to inquiry does not start, resulting in not lun being detected - implement request_endpoint - setup nextep chain for in endpoints - remove useless dcache operation on IN transfer completion - fix transfers to use correct max packet size git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28028 a1c6a512-1295-4272-9138-f99709370657
2010-09-07as3525v2-usb:Amaury Pouly
- use uncached address to access setup packet - implement driver exit - stop forcing full speed - change fifo sizes on init - don't call invalid_dache() on setup packet because it makes everything fail git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28027 a1c6a512-1295-4272-9138-f99709370657
2010-09-02as3525v2: revert the USB_DEVBSS_ATTR and the panicf redefinition, don't ↵Amaury Pouly
protected #undef of USB_NUM_ENDPOINTS git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27987 a1c6a512-1295-4272-9138-f99709370657
2010-09-02as3525v2:Amaury Pouly
- change buffer alignement to 32 bytes (not sure if it's useful) - flush rx fifo on reset - use AS3525_PHYSICAL_ADDR for DMA - reset endpoints structure states on reset - force full speed for debugging purpose - add more debugging code git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27986 a1c6a512-1295-4272-9138-f99709370657
2010-07-30Make some global function/variables local (by making them static)Bertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27631 a1c6a512-1295-4272-9138-f99709370657
2010-07-22CCU_BASE+0x20 is specific to AMSv2 -> move to as3525v2.hRafaël Carré
Rename to simply 'CCU_USB' git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27518 a1c6a512-1295-4272-9138-f99709370657
2010-07-02AMS SoC's: Some register bit changes need interrupt protection: timer API ↵Michael Sevakis
and CGU_PERI. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27236 a1c6a512-1295-4272-9138-f99709370657
2010-06-29as3525v2-usb: fix yellowAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27181 a1c6a512-1295-4272-9138-f99709370657
2010-06-29usb-drv-as3525v2.c: fix compilation (typo)Rafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27179 a1c6a512-1295-4272-9138-f99709370657
2010-06-29as3525v2-usb: fix bug in ep listing macro, rewrite EP0 handling using a stateAmaury Pouly
There was a stupid bug in endpoint listing which caused random cancelling of EP0 transfers. The new scheme to handle EP0 transfers should avoid an unexpected setup packet which might cause a deadlock or confuse the core. There is still an issue with the cancel_transfers function is still. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27178 a1c6a512-1295-4272-9138-f99709370657
2010-06-27as3525v2-usb: rework ep listing&xfers cancelling, implement speed reporting, ↵Amaury Pouly
first try at implementing disconnection There is still a problem after the set address request which makes the driver working randomly. I still didn't manage do get a proper disconnect interrupt. From time to time, when unplugging cable, neither rockbox nor usb driver reports disconnect even. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27161 a1c6a512-1295-4272-9138-f99709370657
2010-06-23as3525v2-usb: beginning of a real driver. Setup packet and control transfers ↵Amaury Pouly
work. There is still a problem with the set address request. Still much work to be done. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27099 a1c6a512-1295-4272-9138-f99709370657
2010-06-23as3525v2-usb: define number of enpoints correctly, write interrupt handlerAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27098 a1c6a512-1295-4272-9138-f99709370657
2010-06-21as3525v2-usb: definitely switch to this clock handling, it is the good oneAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27033 a1c6a512-1295-4272-9138-f99709370657
2010-06-21as3525-usb: change clock handlingAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27032 a1c6a512-1295-4272-9138-f99709370657
2010-06-21as3525v2-usb: add support to derive usb clock from pllb, correct endpoint ↵Amaury Pouly
listing, simplify a few things. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27031 a1c6a512-1295-4272-9138-f99709370657
2010-06-19as3525v2-usb: fix yellow about unused functions (they can be resurrected ↵Amaury Pouly
from an older revision if needed) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26976 a1c6a512-1295-4272-9138-f99709370657
2010-06-19as3525v2-usb: end of massive renamingAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26972 a1c6a512-1295-4272-9138-f99709370657
2010-06-19as3525v2-usb: major code renamingAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26971 a1c6a512-1295-4272-9138-f99709370657
2010-06-19as3525v2-usb: tweaks things but still doesn't work.Amaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26968 a1c6a512-1295-4272-9138-f99709370657
2010-06-19as3525v2-usb: rework thing, simplifyAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26967 a1c6a512-1295-4272-9138-f99709370657
2010-06-19as3525v2-usb: reorganize thing, don't renable ep0 on enum because it's ↵Amaury Pouly
already done git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26966 a1c6a512-1295-4272-9138-f99709370657
2010-06-19as3525v2-usb: don't disable interrupts on bus reset (that was for debug purpose)Amaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26965 a1c6a512-1295-4272-9138-f99709370657
2010-06-12usb-as3535v2: add more defines, reorganize/simplify things, add code for ↵Amaury Pouly
interrupt handling git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26810 a1c6a512-1295-4272-9138-f99709370657
2010-05-20usb-as3525v2:Amaury Pouly
- forgot a ccu undocumented thing in init - finish init code (following linux patch) - enable interrupts - don't use dynanmic fifo sizing by default - move to a more static configuration of usb hardware parameters (it might be necessary to move them to config* files later). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26195 a1c6a512-1295-4272-9138-f99709370657
2010-05-19as3525v2: add partial usb init codeAmaury Pouly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26157 a1c6a512-1295-4272-9138-f99709370657
2010-05-18as3525 usb: build as3525v2 file based on CONFIG_USBOTG, and fix warningsRafaël Carré
build it on fuzev2 and clipv2 too, it should be the same controller as3525v1 file is only build for CONFIG_USBOTG == USBOTG_AS3525, no need to check for it in the .c file git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26142 a1c6a512-1295-4272-9138-f99709370657
2010-05-18as3525v2: add usb driver stub, enable usb phy&core initAmaury Pouly
clip+: add USBOTG_ define and enable usb stack git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26132 a1c6a512-1295-4272-9138-f99709370657