Commit graph

52 commits

Author SHA1 Message Date
Rafaël Carré
d7ead706a7 AMSv1: rename USB interrupt handler
Fix FS#12660 (broken in c9c13497)
2012-04-30 14:24:34 -04:00
Rafaël Carré
568c441fd8 usb-target.h: remove
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31498 a1c6a512-1295-4272-9138-f99709370657
2011-12-31 18:44:55 +00:00
Michael Sevakis
6a67707b5e Commit to certain names for cache coherency APIs and discard the aliases.
Wouldn't surprise me a bit to get some non-green.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31339 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 07:27:24 +00:00
Michael Sevakis
82259b7af5 Move AMSv1 (AMSv2 had been done already) to using setup packet request to detect a host.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30547 a1c6a512-1295-4272-9138-f99709370657
2011-09-14 15:26:57 +00:00
Michael Sevakis
12375d1d3a Merge functionality of wakeups and semaphores-- fewer APIs and object types. semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657
2011-03-02 08:49:38 +00:00
Frank Gevaerts
ecd80d888e Move AMSv1 USB to the USB_DETECT_BY_DRV model, so connecting to a dumb charger works without interrupting playback
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28819 a1c6a512-1295-4272-9138-f99709370657
2010-12-12 20:03:42 +00:00
Rafaël Carré
e20fb32862 usb-drv-as3525: only give physical addresses to USB HW
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27877 a1c6a512-1295-4272-9138-f99709370657
2010-08-25 11:10:48 +00:00
Bertrik Sikken
57933f2bc6 Make some global function/variables local (by making them static)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27631 a1c6a512-1295-4272-9138-f99709370657
2010-07-30 23:47:49 +00:00
Rafaël Carré
1ebdb8988f as3525v1 USB: remove stubs if !defined(USE_ROCKBOX_USB)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27519 a1c6a512-1295-4272-9138-f99709370657
2010-07-22 13:32:01 +00:00
Michael Sevakis
0f47ffe0e4 AMS SoC's: Some register bit changes need interrupt protection: timer API and CGU_PERI.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27236 a1c6a512-1295-4272-9138-f99709370657
2010-07-02 06:00:00 +00:00
Tobias Diedrich
31cf6d5013 Enable HID support, clean up usb-drv-as3525.c a bit, add a workaround for weird Linux behaviour (don't have Windows to test with), we don't need to set up USB_PHY_EPx_INFO (OF doesn't bother either).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27164 a1c6a512-1295-4272-9138-f99709370657
2010-06-28 09:46:13 +00:00
Tobias Diedrich
04f9aa8e55 Include usb-target.h for usb_remove_int().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27150 a1c6a512-1295-4272-9138-f99709370657
2010-06-27 03:10:20 +00:00
Tobias Diedrich
d538db0259 Add one second timeout for USB enumeration, so we don't get stuck in USB mode if it's just a charger.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27149 a1c6a512-1295-4272-9138-f99709370657
2010-06-27 03:04:44 +00:00
Tobias Diedrich
c9bbff571b Add transfer timeout, remove unused buf field
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27115 a1c6a512-1295-4272-9138-f99709370657
2010-06-24 19:14:47 +00:00
Tobias Diedrich
826508029b Unconditionally boost cpu and remove CNAK retry panic
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27054 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 13:58:34 +00:00
Tobias Diedrich
7ce6802b48 Remove '\n' from panicf
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27053 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 13:44:10 +00:00
Tobias Diedrich
f80c853c7e Threshold seems to affect the CNAK retries needed.
Maybe it's not possible to change NAK while the DMA engine is active.
Burst probably can't hurt.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27052 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 13:41:57 +00:00
Tobias Diedrich
bf7e632e86 Hardware too smart can complicate things... We have to intercept the usb_core reply to SET_CONFIGURATION.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27051 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 13:27:58 +00:00
Tobias Diedrich
d518359151 "lsusb -vv" now works too, but the real bug is probably still in here somewhere.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27048 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 10:33:05 +00:00
Tobias Diedrich
072c0a15cb usb_storage seems to be working now, enable USE_ROCKBOX_USB on C200v2, other AMSv1 untested.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27039 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 05:46:54 +00:00
Tobias Diedrich
9297a02d49 mps depends on endpoint, I wonder why gcc didn't warn about i being used uninitialized...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27005 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 06:22:36 +00:00
Tobias Diedrich
1510777266 Add mdelay
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26948 a1c6a512-1295-4272-9138-f99709370657
2010-06-19 02:34:56 +00:00
Tobias Diedrich
06fa365fef Comment on mps sizes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26947 a1c6a512-1295-4272-9138-f99709370657
2010-06-19 02:29:24 +00:00
Rafaël Carré
1d5cc0a505 usb-drv-as3525: set bulk max packet size according to speed
only dump/clean dcache for the needed range

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26946 a1c6a512-1295-4272-9138-f99709370657
2010-06-19 00:26:36 +00:00
Rafaël Carré
7a9033179f as3525*: make udelay() be a simple busy loop
it achieves all the requirements, work fine on c200v2, and is much simpler

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26933 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 19:14:08 +00:00
Rafaël Carré
fd715fa95c as3525*: enable MMU in bootloader
Reserve 1MB of DRAM for loading rockbox and use the rest as BSS
Write sdram setup in assembler and move it to a separate file, together
with MMU init code

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26926 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 17:33:51 +00:00
Tobias Diedrich
8260a79689 Avoid ifdefs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26908 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 05:07:00 +00:00
Tobias Diedrich
fe47966f0e Move usb-drv-as3525 defines into header file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26907 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 04:55:55 +00:00
Rafaël Carré
b812465bff as3525: bootloader USB mode
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-18 01:47:39 +00:00
Rafaël Carré
48313f58e3 usb-drv-as3525: use udelay() and not a C busy loop
Remove redundant "? true : false"

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26903 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 01:47:29 +00:00
Rafaël Carré
b43e15fe57 usb-drv-as3525: build with LOGF_ENABLE undefined
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26902 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 01:47:24 +00:00
Tobias Diedrich
8e8c8dce51 Either the removal of the unneeded flush or the additional epn_info setup
has made it more reliable.  It seems to basically work now, but
somehow when Linux tries to read the partition table and it gets the
"scsi read10" command, the storage_read_sectors(drive=0, start=0, count=8)
call never returns...


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26894 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 17:50:48 +00:00
Tobias Diedrich
253cfbcd47 Prevent a race condition when writing VIC_INT_EN_CLEAR. Should be very difficult to hit in this case though...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26451 a1c6a512-1295-4272-9138-f99709370657
2010-06-01 19:29:01 +00:00
Rafaël Carré
6b46cc08ed as3525: hide our UNCACHED_ADDR from usb_storage.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26178 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 18:13:06 +00:00
Rafaël Carré
2e188a4dad revert part of r26176 to avoid large static allocation
we still need to convert uncached addresses to physical addresses

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26177 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 18:08:32 +00:00
Rafaël Carré
bae0756acf as3525: don't use IRAM for usb, and avoid usb storage using uncached addresses behind our back
No need for special address handling, all addresses are equal to their physical address

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26176 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 17:56:47 +00:00
Tobias Diedrich
12af4986b9 Handshake still grinds to a halt at some point, but it works better now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26167 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 15:43:53 +00:00
Tobias Diedrich
0f6b5f03d9 Enable/disable second pll dynamically on usb plugin/remove.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26145 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 16:23:11 +00:00
Rafaël Carré
f8f3fab62c as3525 usb: build as3525v2 file based on CONFIG_USBOTG, and fix warnings
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-18 12:56:14 +00:00
Tobias Diedrich
ed96c935ec Ok, this time I double-checked for warnings...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26131 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:27:04 +00:00
Tobias Diedrich
3bb2afc741 And don't forget the return values...
Note to self: Next time don't forget to check a AMSv2 build before committing...


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26130 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:24:54 +00:00
Tobias Diedrich
e36cfed9bf And of course the stubs still need to be there...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26129 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:20:12 +00:00
Tobias Diedrich
ecdbab95f4 Obviously this should not be built on AS353x...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26128 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:08:55 +00:00
Tobias Diedrich
922f83e647 Not quite working yet, but almost.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26126 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 07:00:57 +00:00
Rafaël Carré
b9beeccbcf as3525v1 use an as3515 audio codec/PMU, not an as3517 as previously thought
-> Change references to as3517 into as3515

there is a reference to the as3515 in the public as3525 datasheet to
support this fact

as3517 is used in the as3527 SoC, the (public) as3527 datasheet has
detailed information on its registers
the audio codec/PMU used in as3525v2 (thought to be as3543) appears to be
compatible (identical?) with as3517

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26075 a1c6a512-1295-4272-9138-f99709370657
2010-05-16 09:22:02 +00:00
Tobias Diedrich
990179e1aa Correct register defines. I had to look at the disassembly to spot this bug. orz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25996 a1c6a512-1295-4272-9138-f99709370657
2010-05-13 14:07:59 +00:00
Rafaël Carré
7042c96b4a Clip+: enable sound on "as3514" (as3543 in fact)
as3525 comes with a as3517, as3525v2 with a as3543, rename specific
registers accordingly

Existing problems: FM (line out) doesn't work, volume can't go below a
certain point

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25260 a1c6a512-1295-4272-9138-f99709370657
2010-03-20 17:09:44 +00:00
Rafaël Carré
ed13fd6dca Sansa AMS: VIC_INT_ENABLE register is not a mask
When read it returns all enabled interrupt sources
When written it enables interrupt sources for each bit set
So just like VIC_INT_EN_CLEAR, we don't have to read the previous value
before writing to it (VIC_INT_EN_CLEAR is write-only anyway)

Thanks to Fred Bauer for spotting

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23734 a1c6a512-1295-4272-9138-f99709370657
2009-11-24 12:05:53 +00:00
Michael Chicoine
a06feaa7ec Fix FS#10751 - Fuze freezes when using radio while charging
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23517 a1c6a512-1295-4272-9138-f99709370657
2009-11-04 15:58:18 +00:00
Jeffrey Goode
9d842683eb Comment out LOGF_ENABLE defines everywhere, replace evil comments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23497 a1c6a512-1295-4272-9138-f99709370657
2009-11-03 16:25:03 +00:00