Commit graph

531 commits

Author SHA1 Message Date
Rafaël Carré
482fefd928 Fuzev2: simplify button_read_device()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25636 a1c6a512-1295-4272-9138-f99709370657
2010-04-13 19:06:21 +00:00
Rafaël Carré
8a2187136f fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25602 a1c6a512-1295-4272-9138-f99709370657
2010-04-12 10:25:49 +00:00
Rafaël Carré
3b1c3881f0 as3525v2: only clear DIV0 bits in set_cpu_frequency() (not bit 6)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25595 a1c6a512-1295-4272-9138-f99709370657
2010-04-11 18:26:45 +00:00
Rafaël Carré
5a8b5f1ebf as3525v2: clarify the comment about write support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25594 a1c6a512-1295-4272-9138-f99709370657
2010-04-11 18:18:24 +00:00
Rafaël Carré
07ec3c9d69 as3525v2: extend a bit the delay after switching pclk/fclk
fix r25571 : Clipv2 would boot to a black screen

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25592 a1c6a512-1295-4272-9138-f99709370657
2010-04-11 16:22:56 +00:00
Rafaël Carré
07c08a6d89 as3525v2: set_cpu_frequency()
delay a bit after changing pclk/fclk
tiny refactoring

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25571 a1c6a512-1295-4272-9138-f99709370657
2010-04-10 20:00:15 +00:00
Jack Halpin
43304b87b0 sd-as3525v2: Add some comments, no functional changes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25546 a1c6a512-1295-4272-9138-f99709370657
2010-04-09 00:26:06 +00:00
Tobias Diedrich
f7b0224a9c Added battery profile change to correct file, removed unused powermgmt-as3525.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25541 a1c6a512-1295-4272-9138-f99709370657
2010-04-08 19:31:03 +00:00
Tobias Diedrich
12a6ef5c18 Use a real battery discharge curve for calibration data
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25540 a1c6a512-1295-4272-9138-f99709370657
2010-04-08 18:50:29 +00:00
Jack Halpin
d7c8d34999 Sansa AMSv2: Do not disable DMA synchronization logic for as3525v2. The DMA controller and the SD controller run at different clock speeds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25532 a1c6a512-1295-4272-9138-f99709370657
2010-04-08 06:12:51 +00:00
Jack Halpin
286fcfe8b1 sd-as3525v2: Start out with all MCI Interrupts masked.
Before the clock settings were fixed this setting actually caused the problem it now seems to solve.
Random freezups seem to be gone for clip+ at least.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25531 a1c6a512-1295-4272-9138-f99709370657
2010-04-08 06:12:44 +00:00
Jack Halpin
f25f17c5b6 sd-as3525v2: Set SD FIFO TX/RX watermarks once in init_controller() and leave them alone after that.
We only use DMA transfers so we should not need to change/reset the FIFO configuration.

Also add comment showing what we set as the TX/RX watermarks.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25507 a1c6a512-1295-4272-9138-f99709370657
2010-04-07 05:47:12 +00:00
Tobias Diedrich
48789c5361 Remove vim option line
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25505 a1c6a512-1295-4272-9138-f99709370657
2010-04-07 03:27:23 +00:00
Tobias Diedrich
ea907b31ae Detect C200v2 variant by reading A7, use A5 or A7 to control backlight and buttonlight depending on the result.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25499 a1c6a512-1295-4272-9138-f99709370657
2010-04-06 18:32:47 +00:00
Jack Halpin
36c16ea05d Sansa AMS: Split set_cpu_frequency() into 2 separate functions for as3525v1/v2 as the code is quite different for each model.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25498 a1c6a512-1295-4272-9138-f99709370657
2010-04-06 17:22:57 +00:00
Jack Halpin
48477f06bf AS3525v2: Set XPD to SD-MMC interface in sd_init() for HAVE_MULTIDRIVE.
XPD was being switched between SD-MMC interface and general i/o functions in the sd_enable() function similar to as3525v1.
Since the as3525v2's do not seem to use XPD as general i/o there's no need to switch it back.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25497 a1c6a512-1295-4272-9138-f99709370657
2010-04-06 17:22:51 +00:00
Jack Halpin
c0e416b1ff SansaAMS: Only use INT_MCIO with as3525v1, it is unused in as3525v2.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25496 a1c6a512-1295-4272-9138-f99709370657
2010-04-06 17:22:45 +00:00
Rafaël Carré
e7dcec5dde Revert unrelated part of r25491 : fuzev1 init code works again
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25495 a1c6a512-1295-4272-9138-f99709370657
2010-04-06 10:21:58 +00:00
Thomas Martitz
3f6e5668b3 Revert part of r25489 as it didn't fix the problem, that the CPU frequency debug screen shows the wrong frequency after boot, properly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25492 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 19:20:56 +00:00
Thomas Martitz
02afc271c9 as3525v2: Move codec into iram freeing 1MB for the audio buffer and also a small decoding speedup (iram seems to be 50% faster than dram when boosted and the same when unboosed). 32k is still reserved for the core and can be readjusted if needed. Codecs don't appear to ever need the 1MB (usually <350k only).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25491 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 19:18:15 +00:00
Thomas Martitz
527a2e64ab Correct comment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25490 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 16:11:50 +00:00
Thomas Martitz
2149199b90 Fuzev2: Use 40MHz as unboosted frequency. The lcd speed and ui responsiveness is good at this freq.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25489 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 16:09:51 +00:00
Rafaël Carré
59dbdabb71 as3525v2: show the correct freqs in debug menu, CGU_PERI uses fclk as source
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25485 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 15:22:36 +00:00
Thomas Martitz
e4cda5ff2c Fix yellow. Another function unneeded in the bootloader.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25484 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 12:23:30 +00:00
Thomas Martitz
ae69e92008 as2525(v2): We don't need yuv blitting/greylib support in the bootloader so don't compile it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25483 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 12:17:11 +00:00
Thomas Martitz
20003ec1c0 Add forgotten file (git was supposed to rename!).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25482 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 12:02:56 +00:00
Thomas Martitz
446a67698f Fuzev2: Reduce code duplication by reusing Fuzev1 code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25481 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 12:01:44 +00:00
Rafaël Carré
eefdd430f1 Fuzev2: YUV output adapted from Fuzev1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25479 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 07:47:31 +00:00
Rafaël Carré
0f951b1de8 Fuzev2: use RGB565SWAPPED (pointed out by amiconn) => 91fps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25478 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 07:10:01 +00:00
Rafaël Carré
5b8aca84dc Fuzev2: don't reinvent the wheel: swap pixels with existing swap_odd_even32
It is equally fast and doesn't need an additional mask
Thanks to amiconn for pointing to it

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25477 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 06:35:23 +00:00
Rafaël Carré
69186f6f85 Fuzev2: write pixel swapping in assembly for a some speed up
Unboosted: 73 fps -> 87.5 fps

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25476 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 05:41:51 +00:00
Rafaël Carré
7a90aa40c6 as3525v2: set PCLK correctly
PCLK doesn't use PLLA as a source but FCLK, so when changing FCLK with
CGU_PROC register, we must change PCLK as well with CGU_PERI register

Operate with 24MHz PCLK (and unboosted FCLK) for Clipv2/Clip+
Use 60MHz on Fuzev2 to keep the display fast enough (still slower than
Fuzev1 though)

µSD seems to function correctly now

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25475 a1c6a512-1295-4272-9138-f99709370657
2010-04-05 04:48:43 +00:00
Rafaël Carré
6cbbd1a756 Clipv2: read hold switch correctly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25462 a1c6a512-1295-4272-9138-f99709370657
2010-04-03 22:33:47 +00:00
Rafaël Carré
e1a1df69fc Clipv2: fix grey lcd output
We can write to DBOP_DOUT in 8 bits mode : bits 7..0 are mapped to the
LCD, not bits 15..12 and 3..0 like on Clipv1

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25455 a1c6a512-1295-4272-9138-f99709370657
2010-04-03 17:10:44 +00:00
Rafaël Carré
40849cbeb0 Clipv2/Clip+: lower DEFAULT/NORMAL frequency from 60MHz to 24MHz
1 more hour of battery life measured on Clip+ : 16h30 with mp3 @192kbps
Fuzev2 frequency isn't changed because the scrollwheel is less
responsive below 60MHz

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25448 a1c6a512-1295-4272-9138-f99709370657
2010-04-03 07:48:59 +00:00
Rafaël Carré
1c67444ed3 Clipv2: reboot to OF when USB is inserted
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25447 a1c6a512-1295-4272-9138-f99709370657
2010-04-03 05:45:44 +00:00
Rafaël Carré
722be53bf9 as3525v2: acknowledge USB connection/deconnection in SD thread
Fuzev2: detect USB connection and reboot to OF

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25446 a1c6a512-1295-4272-9138-f99709370657
2010-04-03 05:42:54 +00:00
Rafaël Carré
d3bad5b1ca as3525v2: disable interrupts when writing to the PMU registers
Brightness changes on the Fuzev2 now work flawlessly
This might also explain why my Clip+ would sometimes "not boot", that
could have been because the backlight was not enabled at all.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25445 a1c6a512-1295-4272-9138-f99709370657
2010-04-03 04:42:04 +00:00
Jeffrey Goode
e53ede9b2b Fix someone elses yellow and red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25434 a1c6a512-1295-4272-9138-f99709370657
2010-04-02 01:41:51 +00:00
Rafaël Carré
eef7f343c2 Clip+: remove button_hold() : we use software hold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25428 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 17:24:14 +00:00
Thomas Martitz
f376fd2f4a Fuzev2: Scrollwheel works like a charm :)
Move scrollwheel parsing function into separate file as it's reused.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25425 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 16:07:56 +00:00
Rafaël Carré
92411e8a96 Fuzev2 LCD: replace delays by calls to lcd_delay() (delays not changed)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25422 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 08:29:30 +00:00
Rafaël Carré
b79ca59194 Try to fix problems on Clip+ (not sure why they appear randomly)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25421 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 08:21:21 +00:00
Rafaël Carré
fa59c7b686 as3525v2: assume plla is the source for pclk (verified with timer frequency)
The frequencies are correctly displayed in the debug menu

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25418 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 06:05:24 +00:00
Rafaël Carré
a28a9210d0 Fix boosting on as3525v2
the arm926-ejs doesn't have synchronous/asynchronous/fastbus modes, so
just change CGU_PROC directly

Note: we could use a lower unboosted frequency now

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25417 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 04:37:17 +00:00
Rafaël Carré
49935f2fa8 as3525*: make sure fclk is 24MHz before using it as the clock source for pclk
Should fix Clip+ boot problems once for all

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25416 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 03:55:49 +00:00
Rafaël Carré
f4dcc69b51 as3525*: set up CGU_COUNT register before turning on / modifying PLLs
Write the setting before enabling the PLL
Fix booting problem (black screen) with Clip+

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25415 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 03:22:49 +00:00
Rafaël Carré
39e78993f3 as3525v2: adjustable CPU freq : CGU_PROC is identical to as3525 after all
Instead of modifying CGU_PROC to get 24MHz pclk, just switch to fastbus else Clip+ wouldn't boot
Tested on fuzev1/Clip+

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25413 a1c6a512-1295-4272-9138-f99709370657
2010-04-01 02:39:25 +00:00
Rafaël Carré
124188f41c Clipv2/Clip+ : use CHG_IN adc channel, it seems to work better than BVDD and RTCSUP
They're all the same when charger is unplugged, but when it's plugged:
- BVDD is way too high
- RTCSUP oscillates between 2 values
- CHG_IN acts like RTCSUP on some models but seems to works fine on my Clip+

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25405 a1c6a512-1295-4272-9138-f99709370657
2010-03-31 01:22:23 +00:00
Thomas Martitz
33e7e1d1c3 Fix bootloader red, it doesn't have backlight handling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25394 a1c6a512-1295-4272-9138-f99709370657
2010-03-29 23:14:44 +00:00