Commit graph

474 commits

Author SHA1 Message Date
Rafaël Carré
f04ee9436c Fuzev2: it seems we need to set bit 3 when selecting PMU subregister
backlight still not working properly

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25371 a1c6a512-1295-4272-9138-f99709370657
2010-03-28 06:05:48 +00:00
Rafaël Carré
ce3d38c0fa Fuzev2: cleanup backlight code (still not working correctly)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25370 a1c6a512-1295-4272-9138-f99709370657
2010-03-28 04:33:26 +00:00
Rafaël Carré
a8adcf36f1 Fuzev2: fix LCD
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25368 a1c6a512-1295-4272-9138-f99709370657
2010-03-28 04:10:36 +00:00
Rafaël Carré
7cd24fa13d Fuzev2: fix lcd
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25360 a1c6a512-1295-4272-9138-f99709370657
2010-03-28 01:53:42 +00:00
Rafaël Carré
6fa93436ea Fuzev2: fix normal build: enable charging properly, disable FM, use as3525v2 cpu
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25354 a1c6a512-1295-4272-9138-f99709370657
2010-03-27 16:53:13 +00:00
Rafaël Carré
148a5fb631 Fuzev2: µSD detect pin is A2 like Clip+, but the meaning is reversed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25353 a1c6a512-1295-4272-9138-f99709370657
2010-03-27 16:53:08 +00:00
Jack Halpin
4b0c43da8f sd-as3525v2.c Organize construction of MCI_COMMAND so it is more apparent which bits are being set and why.
I have also made the CMD_CHECK_CRC_BIT unused for now since we do not check any response crc values yet.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25343 a1c6a512-1295-4272-9138-f99709370657
2010-03-26 17:00:25 +00:00
Rafaël Carré
d3312b7f16 Fuzev2: fix build, use suited bitmap tool
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25342 a1c6a512-1295-4272-9138-f99709370657
2010-03-26 11:41:15 +00:00
Rafaël Carré
ea1b3676de Clip+: fix battery voltage reading when charging : use ADC_RTCSUP like e200v1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25340 a1c6a512-1295-4272-9138-f99709370657
2010-03-26 07:11:03 +00:00
Jack Halpin
9d9c090cba sd-as3525v2.c Implement HS timings for those cards that are capable.
The internal card does not appear to be HS capable, at least not in 2GB clip+

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25316 a1c6a512-1295-4272-9138-f99709370657
2010-03-24 05:41:33 +00:00
Jack Halpin
0466a11028 sd-as3525v2.c Don't reset controller on every pass through the transfer loop.
The controller only needs to be reset if we had an error to clean up any leftover trash...

Move comment pertaining to retry variable so it's actually nearby.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25315 a1c6a512-1295-4272-9138-f99709370657
2010-03-24 05:41:25 +00:00
Jack Halpin
66f011e8c1 sd-as3525v2.c Adjust comments for MCI_INT bits to show if they are related to CMD, DATA, or a termination signal.
Adjust the initial MCI_MASK value to also mask the MCI_INT_RXDR and MCI_INT_TXDR bits as it seems we don't use them for dma transfers.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25314 a1c6a512-1295-4272-9138-f99709370657
2010-03-24 02:48:38 +00:00
Jack Halpin
19fc7297ba SansaAMSv2: Give register CGU_BASE + 0x3C the name CGU_SDSLOT.
Move CLKDIV macros into clock-target.h.
Only enable the necessary interfaces for the 3 clock registers used for SD.
Add MEMSTICK and SDSLOT registers to bottom of register display in View HW info debug page.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25309 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 17:00:59 +00:00
Björn Stenberg
2d174af443 No intentional warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25308 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 13:21:19 +00:00
Tobias Diedrich
06653d982a Make this properly dependend on the right defines instead of a blacklist.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25306 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 11:22:21 +00:00
Tobias Diedrich
c4e4ffb541 Limit AUDIO_IRQ handling to AS3525, since it doesn't work on the newer SoC in SANSA_CLIPPLUS yet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25305 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 11:13:17 +00:00
Rafaël Carré
f5988d4fbd fix previous revision by using correct definition of i2c prescaler
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25304 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 09:22:03 +00:00
Rafaël Carré
e4972b08f7 as3525: do not read i2c2_cpsr* registers because the clock might be disabled
The registers value does not change so we don't need to read them
This avoids dividing by 0

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25303 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 09:20:12 +00:00
Rafaël Carré
83fe35f4a1 fix r25297 : make ascodec-target.h empty when building sim
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25301 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 07:52:55 +00:00
Tobias Diedrich
62ff88b717 Implement software pwm to control c200v2 display brightness.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25300 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 05:27:32 +00:00
Tobias Diedrich
47ab95904e Add handler for audio irq.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25299 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 05:02:37 +00:00
Tobias Diedrich
946d3d177e Rewrite ascodec_as3514.c to use interrupts.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25297 a1c6a512-1295-4272-9138-f99709370657
2010-03-23 04:40:38 +00:00
Rafaël Carré
1657174561 sd-as3525v2: read cid & csd in the correct order, fix disk info
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25292 a1c6a512-1295-4272-9138-f99709370657
2010-03-22 12:12:09 +00:00
Jack Halpin
beaa292199 sd-as3525v2.c We don't need to disable/enable MCI_CLKENA in send_cmd().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25286 a1c6a512-1295-4272-9138-f99709370657
2010-03-22 06:09:19 +00:00
Jack Halpin
2a75da37ae sd-as3525v2.c Enable disk access icon.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25285 a1c6a512-1295-4272-9138-f99709370657
2010-03-22 06:09:14 +00:00
Jack Halpin
d2a264e7da sd-as3525v2.c Use MCI_MASK instead of data_transfer flag to determine if data transfer is happening.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25284 a1c6a512-1295-4272-9138-f99709370657
2010-03-22 06:09:08 +00:00
Jack Halpin
3ee301248d sd-as3525v2.c Add macros to distinguish between a CMD error and a DATA error.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25283 a1c6a512-1295-4272-9138-f99709370657
2010-03-22 02:30:00 +00:00
Jack Halpin
48b8080330 sd-as3525v2 Remove post transfer wait for state call and move pre transfer wait for state call inside the transfer loop.
We don't need the post transfer call this way.  We check on TRAN state before each partial transfer.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25282 a1c6a512-1295-4272-9138-f99709370657
2010-03-22 02:29:53 +00:00
Jack Halpin
6357c5a085 sd-as3525v2.c Use SD_DESELECT_CARD instead of SD_SELECT_CARD to make the code easier to understand. There is no functional difference.
Add comment to explain why we need to do this.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25281 a1c6a512-1295-4272-9138-f99709370657
2010-03-22 02:29:40 +00:00
Jack Halpin
da325b6270 sd-as3525v2.c: Correct SD_APP_OP_COND command to send full voltage range for v1 SD cards.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25266 a1c6a512-1295-4272-9138-f99709370657
2010-03-21 06:49:42 +00:00
Jack Halpin
f1d9491e9c sd-as3525v2.c: Only manipulate MCI_CLKENA for drive being used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25265 a1c6a512-1295-4272-9138-f99709370657
2010-03-21 06:10:44 +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é
91647264f8 lcd-ssd1303 (all Clips) : move model specific code in their own files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25248 a1c6a512-1295-4272-9138-f99709370657
2010-03-19 15:13:29 +00:00
Rafaël Carré
004317a863 sd-as3525v2: correctly check send_cmd return value (which is boolean)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25246 a1c6a512-1295-4272-9138-f99709370657
2010-03-18 16:40:21 +00:00
Jack Halpin
016153a0b9 SansaAMSv2: Add support for uSD cards to sd-as3525v2.c and activate hotswap and multidrive.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25245 a1c6a512-1295-4272-9138-f99709370657
2010-03-18 13:25:13 +00:00
Rafaël Carré
fb6a5431f2 sd-as3525v2: sd_get_info() is already in common SD code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25243 a1c6a512-1295-4272-9138-f99709370657
2010-03-18 10:29:13 +00:00
Rafaël Carré
ab7365610b as3525*: revert r25198 and inline memory_init in crt0.S
We do not need a stack pointer at this step, and we are sure to not use
memory not initialized yet (like bss)

Fixes FS#11114 (tested on Fuze)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25229 a1c6a512-1295-4272-9138-f99709370657
2010-03-17 05:02:42 +00:00
Thomas Martitz
b5b2a03ee2 A tiny bit more Sansa Fuze v2 work.
- buttonlight works
 - backlight turns on (quite weak though and no brightness adjustment/backlight off functional)
 - don't share drivers with e200v2/fuzev1 for now as it's not entirely clear how dbop plays into this
 - deactivte scrollwheel as it's messing up the timer setup in kernel-as3525.c indicating the dbop input reading doesn't work well
 - still no working bootloader/no lcd or buttons

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25225 a1c6a512-1295-4272-9138-f99709370657
2010-03-16 22:38:57 +00:00
Rafaël Carré
f74a6ed38a Sansa Clipv2: use similar button driver to Clipv1
Fixes some buttons not being read (hold is still buggy)

FlySpray: FS#11111
Author: Pascal Below

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25209 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 23:01:45 +00:00
Rafaël Carré
ba68f2dedd sd-as3525v2: add card hotswap to sd_thread
Clip+: add (disabled) configuration for µSD slot

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25194 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 02:36:16 +00:00
Rafaël Carré
72e0bf3381 sd-as3525v2: prepare for multidrive builds
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25193 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 01:57:15 +00:00
Rafaël Carré
9dba6593cd as3525: do not assume we can record from microphone
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25191 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 01:00:00 +00:00
Rafaël Carré
6159278e0d Clip+: si4702 FM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25190 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 00:36:13 +00:00
Rafaël Carré
ade669f0e7 sd-as3525v2: reduce the delay before reading response
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25189 a1c6a512-1295-4272-9138-f99709370657
2010-03-15 00:36:08 +00:00
Rafaël Carré
c3c7306098 sd-as3525: do not reverse 2 times long responses, read them directly in the needed order
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25185 a1c6a512-1295-4272-9138-f99709370657
2010-03-14 21:46:25 +00:00
Rafaël Carré
db7aedf93a sd-as3525v2: do not reverse 2 times long responses, read them directly in the needed order
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25184 a1c6a512-1295-4272-9138-f99709370657
2010-03-14 21:38:36 +00:00
Rafaël Carré
291e2b1ae6 sd-as3525v2: delay a bit before reading the command response
Especially when using caches we might read the response too fast and get
the response for the previous command instead.

Now Clip+ boots fine with both instruction & data caches enabled, the
delay might need to be lowered though: boot time is a bit longer.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25183 a1c6a512-1295-4272-9138-f99709370657
2010-03-14 21:38:30 +00:00
Jack Halpin
405f6e6dbc SansaAMS: debug-as3525.c Allow View HW info page to display correct info for both V1 & V2 versions of as3525.
calc_freq(CLK_PLLA) for as3525v2 simply returns 240MHz instead of calculating until we understand how it is calculated.
Now displays 922T or 926ejs depending on version.
Remove SD and uSD info from as3525v2 as it is not useful due to different SD controller.
Increased the lines used for each page of display on clip screen size.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25120 a1c6a512-1295-4272-9138-f99709370657
2010-03-11 19:01:49 +00:00
Thomas Martitz
02660557ad Fix a bunch of boot.lds files so that they build with newer ld. The stack/bss sections need NOLOAD. otherwise the linker would try to include those into the binary. I don't know why this ever worked with our current ld version.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25078 a1c6a512-1295-4272-9138-f99709370657
2010-03-08 23:16:57 +00:00
Rafaël Carré
8653c0a567 Sansa AMS: do not pretend we can power off the tuner
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25029 a1c6a512-1295-4272-9138-f99709370657
2010-03-05 01:43:47 +00:00