Commit graph

265 commits

Author SHA1 Message Date
Rafaël Carré
73b3f5417f Sansa Clip: backlight brightness is not possible, so remove references to it
We don't need to mess with CCU_IO register (it's only needed for targets
with a SD slot) so don't keep its value when changing buttonlight

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19139 a1c6a512-1295-4272-9138-f99709370657
2008-11-18 17:40:32 +00:00
Rafaël Carré
678b6d02ac Sansa AMS: Use IRAM (in app linker script and crt0.S)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19137 a1c6a512-1295-4272-9138-f99709370657
2008-11-18 17:15:56 +00:00
Dave Chapman
de89a00cca Correct the xoffset used when display_flipped is false - fixes the display in the main Rockbox build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19128 a1c6a512-1295-4272-9138-f99709370657
2008-11-17 20:08:09 +00:00
Rafaël Carré
5302448e68 Sansa AMS: Don't make sd_init() fail if a SD card is not present in the slot
Fix contributed by kugel

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19126 a1c6a512-1295-4272-9138-f99709370657
2008-11-17 16:06:46 +00:00
Rafaël Carré
aeb60e20a3 Sansa AMS: when not in the bootloader, disable fast hardware power off
A button press of ~10s will trigger the hardware power off instead of ~1s

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19123 a1c6a512-1295-4272-9138-f99709370657
2008-11-16 22:36:13 +00:00
Rafaël Carré
d3e783b268 Fix the Sansa AMS SD driver
- Make write_sectors() function fail.
- Disable interrupts while transferring data and do not yield(), so we are sure the FIFO is not overflowed
Note this solution is only temporary since it's not friendly to other threads and confuse kernel tick precision
This will be reverted when we will be using DMA to access the SD card, but for now it permits further development
- PL180: Rename the MMC_* registers into MCI_*, to not make people believe it is a MMC only controller
- Supports non aligned destination buffers when reading
- Correct the timeout units which were lamely copied from ata-sd-pp.c and were in milliseconds (note that the timeouts are disabled now)
- Higher a bit the stack size
- Use the full initialization procedure in the bootloader and the loaded firmware
- Use the CCU_IO register only when a SD slot is present
- Put some panicf() around to catch problems

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19122 a1c6a512-1295-4272-9138-f99709370657
2008-11-16 22:26:50 +00:00
Dominik Wenger
a4c0660537 add the OF offset also for sansa fuze, and make it only for internal SD.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19108 a1c6a512-1295-4272-9138-f99709370657
2008-11-15 19:24:51 +00:00
Dominik Wenger
83dc89f751 m200v4: make buttons work again (added a small delay). make m200 keymap better. Add button mappings for the sim. Remove some config defines temporary to make building work again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19104 a1c6a512-1295-4272-9138-f99709370657
2008-11-14 21:57:43 +00:00
Dave Chapman
e25c1c6e43 Add more driver stubs to make the Fuze and e200v2 main builds compile; Correct the memory definition for the Fuze (8MB)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19090 a1c6a512-1295-4272-9138-f99709370657
2008-11-11 14:46:13 +00:00
Jonathan Gordon
0d812dd235 FS#9535 - Sansa Fuze sim
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19086 a1c6a512-1295-4272-9138-f99709370657
2008-11-11 11:26:07 +00:00
Rafaël Carré
c48001b172 Sansa AMS: remove symbol already defined in audio/as3514.c driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19078 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 21:04:32 +00:00
Rafaël Carré
d4c4faaec8 Sansa AMS: declare ascodec_init() function in the header
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19077 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 20:59:10 +00:00
Rafaël Carré
02dfae031a Sansa AMS: use the AS3514 ADC driver
Move the ADC defines to as3514.h, and make adc-target.h only include as3514.h
Implement the missing API (ascodec_readbytes, ascodec_(un)lock)

Revert the changes to the PP-specific arm/ascodec-target.h in r19073,
use a AS3525 specific ascodec-target.h while moving the AS3514 specific
code in export/as3514.h

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19076 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 20:55:56 +00:00
Rafaël Carré
22c450a7f4 Merge target/arm/as3525/as3525-codec.h into target/arm/ascodec-target.h
The AMS Sansa use the same AS3514 registers (except USB_UTIL which was added)
Use the register defines in AMS Sansa code instead of hardcoded values

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19073 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 19:53:12 +00:00
Dave Chapman
1811858476 Revert r19069 - the m200s can't charge. Also, don't use charger_inserted() as a method for detecting USB (this gives a false positive with USB wall chargers), and protect the definition of charger_inserted() with #if CONFIG_CHARGING.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19071 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 18:15:52 +00:00
Dominik Wenger
b25f903360 make m200v4 build compilable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19070 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 17:41:18 +00:00
Jonathan Gordon
889b8c96da quick fix for the e200v2 to skip the OF
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19067 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 13:01:46 +00:00
Rafaël Carré
59a9699027 Fuze: remove an unused variable
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19066 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 11:14:09 +00:00
Rafaël Carré
6b566568eb Fix Clip firmware building by adding missing symbols
Implement some of the new functions
Use as3514 rtc
Add AS3525 case in rolo.c
Copy card_get_info_target() from ata-sd-pp.c , and use the correct 32bits words order

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19064 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 11:04:43 +00:00
Daniel Stenberg
b52a3da2b5 ... and the entire dir is renamed too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19063 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 10:21:36 +00:00
Daniel Stenberg
55634f7410 grrr, I need to learn to do case insensitive grepping when that's the better idea...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19062 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 09:50:25 +00:00
Daniel Stenberg
044ba22b93 "mv m200v2 m200v4"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19060 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 09:27:40 +00:00
Rafaël Carré
7ddaaf074b Fix as3525 bootloader broken by r19049 - we need to operate between
100kHz and 400kHz for the identification phase

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19056 a1c6a512-1295-4272-9138-f99709370657
2008-11-09 23:52:08 +00:00
Rafaël Carré
fa748db6ff sd.h : avoid namespace collision by prefixing defines with SD_
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19055 a1c6a512-1295-4272-9138-f99709370657
2008-11-09 23:40:21 +00:00
Rafaël Carré
9acf856da7 AS3525 SD : fix 2nd initialization (in loaded firmware)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19049 a1c6a512-1295-4272-9138-f99709370657
2008-11-09 10:00:52 +00:00
Bertrik Sikken
e79cacc9d5 Also rename as3525_codec in the e200/fuze backlight driver
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19048 a1c6a512-1295-4272-9138-f99709370657
2008-11-09 10:00:16 +00:00
Bertrik Sikken
4ca4e523fe Rename functions as3525_codec_* to ascodec_* to prepare re-use of as3514 code for sansa v2 players
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19047 a1c6a512-1295-4272-9138-f99709370657
2008-11-09 09:25:53 +00:00
Rafaël Carré
aef27e1f0c Sansav2 Bootloader
Adds read-only SD driver, largely copied from ata-sd-pp.c
Only tested on the embedded SD, on the Clip
First steps to build a Normal firmware

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19045 a1c6a512-1295-4272-9138-f99709370657
2008-11-09 06:17:21 +00:00
Rafaël Carré
3952e6d008 AS3525: enable access to the embedded SD card
Don't reset the peripherals
Don't mind about the spare register
Don't mind about MEMSTICK peripheral
Use correct clock speeds for IDE

Tested on Clip only

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19036 a1c6a512-1295-4272-9138-f99709370657
2008-11-07 10:52:26 +00:00
Jonathan Gordon
2b81bce27c FS#9532 - e200v2 buttons
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19035 a1c6a512-1295-4272-9138-f99709370657
2008-11-07 05:31:05 +00:00
Jens Arnold
4944a1c1e1 Common data must be included in .bss or it won't get zeroed in crt0. Fix the archos self-extractor as well to play safe.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19033 a1c6a512-1295-4272-9138-f99709370657
2008-11-07 00:15:53 +00:00
Rafaël Carré
5bef735cf5 AS3525: disable interrupts
init_threads() requires that they are disabled when called
anyway they are not needed at the moment, so leave them disabled

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19029 a1c6a512-1295-4272-9138-f99709370657
2008-11-06 15:46:22 +00:00
Rafaël Carré
6e645cc4eb AS3525: we won't use threads in the bootloader
Disable tick_start()
Call kernel_init() _after_ system_init()

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19028 a1c6a512-1295-4272-9138-f99709370657
2008-11-06 15:24:19 +00:00
Rafaël Carré
94c06c7e95 AS3525: implement tick_start() with TIMER2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19027 a1c6a512-1295-4272-9138-f99709370657
2008-11-06 14:34:37 +00:00
Rafaël Carré
baecdb632c AS3525: use kernel_init() in bootloader
This way creation of scrolling thread doesn't risk crashing the system

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19026 a1c6a512-1295-4272-9138-f99709370657
2008-11-06 02:31:40 +00:00
Rafaël Carré
c3e667c198 AS3525: timer support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19025 a1c6a512-1295-4272-9138-f99709370657
2008-11-06 02:31:32 +00:00
Rafaël Carré
23d6df43f8 AS3525 : wait until PLLA is locked when changed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18996 a1c6a512-1295-4272-9138-f99709370657
2008-11-03 22:48:56 +00:00
Rafaël Carré
aa061bc192 AS3525 : fix interrupts support (but leave them disabled)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18979 a1c6a512-1295-4272-9138-f99709370657
2008-11-02 17:11:33 +00:00
Rafaël Carré
091f2a0c4f AS3525: disable interrupts, higher clock frequencies
fclk (CPU) at 240MHz
pclk (peripherals) at 64MHz

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18972 a1c6a512-1295-4272-9138-f99709370657
2008-11-02 00:34:44 +00:00
Rafaël Carré
a85e2cd991 AS3525 : enable instruction and data cache
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18969 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 23:40:59 +00:00
Dave Chapman
307d009cf1 Clean up the Fuze LCD driver. The only functional change is to write 0x7030 instead of 0x30 to register 0x03 (which seems to be a HD66789R-style R_ENTRY_MODE register) - this fixes the corrupted colours.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18968 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 23:31:05 +00:00
Frank Gevaerts
9e6fb8a12d Adapt sansa v2 sd driver to the new storage layer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18967 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 22:55:35 +00:00
Dave Chapman
2a5d491480 Unify the e200v2 and Fuze backlight/buttonlight code - it is identical.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18966 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 22:05:35 +00:00
Rafaël Carré
646cac0bde Remove Linux's mmci.h since the license is strict GPLv2
Rewrite a new header distributed under GPLv2 or later, and place it in
export/ in case other targets ship with an ARM PL180 controller

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18959 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 14:38:45 +00:00
Dave Chapman
74c75e5c04 Add Sansa Fuze to the build system, including a first (untested) attempt at an LCD driver. Lots of things are just copied from the e200v2, so this code needs testing, and then drivers properly merged if they prove to be the same.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18957 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 10:29:23 +00:00
Rafaël Carré
603a9c7c7d Clip: add backlight and buttonlight code
Revive lcd_enable() as well, and use it in _backlight_on/off()
Don't update the lcd framebuffer if the display is off

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18952 a1c6a512-1295-4272-9138-f99709370657
2008-10-31 22:02:41 +00:00
Rafaël Carré
cd9b1379ff Sansa Clip simulator
First draft at keymapping based on e200

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18948 a1c6a512-1295-4272-9138-f99709370657
2008-10-31 18:54:37 +00:00
Rafaël Carré
52cb009662 Sansav2 SD : minor modifications
Declare a structure constant
Fix a comment (wrong bit number)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18946 a1c6a512-1295-4272-9138-f99709370657
2008-10-31 18:54:24 +00:00
Rafaël Carré
f4a0f457be Sansav2 bootloader: explicitely link everything into IRAM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18937 a1c6a512-1295-4272-9138-f99709370657
2008-10-30 20:01:01 +00:00
Rafaël Carré
e1b4838481 Embryo of a SD driver for Sansav2
Debug code included, needed until the bootloader is ready

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18926 a1c6a512-1295-4272-9138-f99709370657
2008-10-29 20:21:59 +00:00
Jonathan Gordon
8f7f219dba FS#9511 - working lcd update (and lcd_update_rect() ) for the e200v2, working button light also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18914 a1c6a512-1295-4272-9138-f99709370657
2008-10-29 06:11:33 +00:00
Jonathan Gordon
0a8446ad7d fix lcd mirror and rotation problem on the e200v2. also remove a wierd whitespace charchter
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18913 a1c6a512-1295-4272-9138-f99709370657
2008-10-29 03:05:07 +00:00
Dave Chapman
6a038d1a97 Oops, revert 18911 - this was added a couple of commits ago.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18912 a1c6a512-1295-4272-9138-f99709370657
2008-10-29 02:22:39 +00:00
Dave Chapman
914a6f2ed0 e200v2 LCD - it helps to enable the DBOP clock.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18911 a1c6a512-1295-4272-9138-f99709370657
2008-10-29 02:18:42 +00:00
Dave Chapman
8df1a7e29a e200v2: implement the backlight handling (copy/paste from the c200v1/e200v1 code - this should probably be unified, along with other upcoming v2 code), plus clean up the lcd init by calling lcd_init() directly in the bootloader, instead of lcd_init_device().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18910 a1c6a512-1295-4272-9138-f99709370657
2008-10-29 01:42:03 +00:00
Rafaël Carré
b771428d86 e200v2 lcd: Add missing DBOP clock initialization
Code confirmed to work (i.e. displaying a rotated, mirrored image) after
the backlight has been enabled.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18909 a1c6a512-1295-4272-9138-f99709370657
2008-10-29 01:07:33 +00:00
Rafaël Carré
b3ee07c22e Sansav2 : initializes SDRAM
The AS3525 SoC ships with an ARM PL172 MPMC controller
Also correct the memory sizes in tools/configure

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18899 a1c6a512-1295-4272-9138-f99709370657
2008-10-28 11:24:29 +00:00
Bertrik Sikken
e5d72ac5f7 Fix line endings and set svn properties
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18892 a1c6a512-1295-4272-9138-f99709370657
2008-10-26 21:21:55 +00:00
Bertrik Sikken
95726a5c23 FS#9503 - Sansa v2 audio/PMU communication driver (for the AS3525 SoC)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18886 a1c6a512-1295-4272-9138-f99709370657
2008-10-26 13:28:52 +00:00
Dave Chapman
34535494a7 A little more work on the e200v2 LCD driver (still untested - I don't own one). The lcd_update*() functions are taken from the X5 LCD driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18881 a1c6a512-1295-4272-9138-f99709370657
2008-10-25 23:22:02 +00:00
Dave Chapman
c5082f58c6 Remove some trailing whitespace - no functional change
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18879 a1c6a512-1295-4272-9138-f99709370657
2008-10-25 19:13:11 +00:00
Dominik Wenger
3ae419d955 fill in button and backlight functions for m200 "v2"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18874 a1c6a512-1295-4272-9138-f99709370657
2008-10-25 15:57:18 +00:00
Dave Chapman
08c41d42bb Add e200v2 and m200v2 targets. Move the telechips lcd-ssd1815.c (currently used by Logik DAX and m200v1 ports) driver up in the target tree and share with the m200v2 - as2525 parts contributed by Rafael Carre. Includes the start (but is still very incomplete) of an LCD driver for the e200v2. m200v2 is not yet fully supported by mkamsboot - that will come soon. Also some minor cleanups for the Clip.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18836 a1c6a512-1295-4272-9138-f99709370657
2008-10-19 14:11:01 +00:00
Dave Chapman
80cdc34a54 Rename the clip directory to sansa-clip to be consistent with the first (PortalPlayer) Sansa ports
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18786 a1c6a512-1295-4272-9138-f99709370657
2008-10-12 18:07:23 +00:00
Dave Chapman
da8bff107e Commit FS#9467 - initial work on port to Sansa Clip by Rafaël Carré and François Dinel. A few cosmetic changes were made by me prior to committing: 1) TAB policing in button-clip.c; 2) Add François Dinel to CREDITS; 3) Add François Dinel as (C) holder in button-target.h (it was previously blank); 4) Add Rockbox header to bootloader/sansa_as3525.c with Rafaël Carré as (C) holder; 5) Change target_id to 50 (next available number) in tools/configure and fixed indentation; 6) Change MODEL_NUMBER in config-clip.h to 50 (next available number); 7) Remove unused in/out macros from system-target.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18782 a1c6a512-1295-4272-9138-f99709370657
2008-10-12 16:46:01 +00:00