Michael Sevakis
863c03f2ae
Gigabeat S: Renovate bootloader a bit to show splash, implement verbose, shutdown on low battery, handle hold-switch-on and wait only so long for USB if a USB charger is inserted at boot instead of being connected to a host. 'Bootloader USB mode' display is just part of normal printf stream now. Move interrupt stacks into .bss area so they aren't loaded (for firmware too).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29099 a1c6a512-1295-4272-9138-f99709370657
2011-01-21 07:05:51 +00:00
Michael Sevakis
1b275d8ddb
Some static data is only used by .init functions. Add .initdata to declare such data (otherwise section conflicts arise). For i.MX31, use INITDATA_ATTR in the appropriate places.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29008 a1c6a512-1295-4272-9138-f99709370657
2011-01-08 20:42:51 +00:00
Michael Sevakis
9d97ee1b54
Gigabeat S/i.MX31: Take care of an interrupt priority inversion that can happen during PCM callback lockout when DVFS switches frequecies during the lockout, preventing a thread from unlocking the callback until DVFS finishes, causing an SSI FIFO underrun. Hadn't thought of an acceptable way to deal with it before.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28996 a1c6a512-1295-4272-9138-f99709370657
2011-01-07 20:40:36 +00:00
Michael Sevakis
89a7a8138e
Gigabeat S: Make it a removable mass-storage device. Windows will assign a drive to only the main data partition by default. To access the bootloader partition instead, press 'Vol -' while it connects (in bootloader and firmware). Hopefully doesn't break anything for anyone.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28972 a1c6a512-1295-4272-9138-f99709370657
2011-01-05 19:35:51 +00:00
Michael Sparmann
9339be1279
Rework ATA driver to get rid of lots of target-specific constants and allow for non-memory-mapped task file registers.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28950 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 22:51:47 +00:00
Michael Sevakis
4048cf27a2
Gigeabeat S: Reset DMA size info when stopping audio playback and recording transfers so that size remaing/peak buffer calls return 0/NULL when stopped.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28941 a1c6a512-1295-4272-9138-f99709370657
2011-01-01 22:35:00 +00:00
Michael Sevakis
65850011cc
Gigabeat S: Do simple direct keypad scanning rather than triggering a separate scan interrupt and it all does the same thing but with 1 tick less latency.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28926 a1c6a512-1295-4272-9138-f99709370657
2010-12-29 18:20:31 +00:00
Marcin Bukat
b8a7f5137b
move dbg_ports() from apps/menu_debug.c to target tree. FS#11712 by me.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28522 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 14:24:25 +00:00
Rafaël Carré
66f8fb52a9
*/app.lds: remove STUBOFFSET
...
This is related to gdb, and gdb can only work on SH and ifp
This was mistakenly kept when app.lds was forked for each SoC
Side-effect: fix DEBUG builds when the rockbox binary is expected to
be loaded at the start of DRAM and there is no runtime relocation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28124 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 17:09:55 +00:00
Rafaël Carré
aca255e8e8
gigabeats: remove inline from extern functions
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28022 a1c6a512-1295-4272-9138-f99709370657
2010-09-07 14:30:30 +00:00
Thomas Martitz
0e2286f226
Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this and a bit further cleanup in main gets rid of a warning when compiling for android.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27788 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 13:38:25 +00:00
Michael Sevakis
90a2671833
i.MX31: Make DMA ISR call loop a bit more efficient.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27192 a1c6a512-1295-4272-9138-f99709370657
2010-06-30 07:08:10 +00:00
Michael Sevakis
ce4da595e1
Gigabeat S: INIT section wasn't properly overlapping the uninitialized areas thus wasn't being reclaimed.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27190 a1c6a512-1295-4272-9138-f99709370657
2010-06-30 05:49:56 +00:00
Michael Sevakis
6920d2b9cd
i.MX31: Only include the SDMA code that will be used on the target. Simplify the script selection.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27189 a1c6a512-1295-4272-9138-f99709370657
2010-06-30 05:02:58 +00:00
Michael Sevakis
e286b0bbc0
Remove atomic register bit manipulation functions from i.MX and s3c target code and introduce generic functions for ARM (bitmod32, bitset32, and bitclr32). Multiprocessor support is possible but just not implemented at the moment, only interrupt lockout.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27188 a1c6a512-1295-4272-9138-f99709370657
2010-06-30 02:02:46 +00:00
Michael Sevakis
d164678738
Gigabeat S: The forced shutoff voltage level can be lowered a tiny bit it seems.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27170 a1c6a512-1295-4272-9138-f99709370657
2010-06-29 07:29:42 +00:00
Michael Sevakis
c2851389b9
Gigabeat S: Use statically initialized channel descriptors. Also, there's no need for them to be in non-cached memory since they're only used on the AP side.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27103 a1c6a512-1295-4272-9138-f99709370657
2010-06-24 08:40:05 +00:00
Michael Sevakis
60f843bf18
Configure Gigabeat S with EABI compiler by default. Implement the INIT section that this enables (due to selective need for long calls). Remove pcm_postinit from INIT section since it's asynchronous. Disable strict aliasing on SPC codec for now just to shut it up.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26779 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 14:39:35 +00:00
Torne Wuff
991e92fd3d
New USB charging system, part 1 - API rework and user-visible setting update
...
1) "Charge during USB connection" option is now tristate: off/on/force. Currently "force" behaves just like "on", but in future it will allow charging even when it was not possible to positively identify a charger.
2) The H300 code has been adjusted to use the new system but there should be no functional differences, it already had the USB charging option and its USB/charging support is hardware controlled.
3) The Gigabeat S code has been adjusted to use the new system: the player now has the USB charging option, which wasn't previously available. The player will only charge at full speed when allowed to do so by a working USB host, so USB AC adapters won't work very well; however, they didn't work before either, so this is not a change in functionality.
4) The iPod Nano 2G code has been adjusted to use the new system: it already had the USB charging option. Using a USB AC adapter won't charge at full speed any more (it did before) - the old implementation was equivalent to the not-yet-implemented "force" option in the new system.
No other target should be affected. Support for the "force" mode and support for at least some other iPod models will come in a future commit :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26570 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 10:05:27 +00:00
Rafaël Carré
0ea7905395
ARM: use BX when branch to an address in register
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26432 a1c6a512-1295-4272-9138-f99709370657
2010-05-31 15:14:26 +00:00
Michael Sevakis
6b6123444e
Gigabeat S PCM: Sync some comments to changes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26341 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 23:22:55 +00:00
Michael Sevakis
25ebd9832d
Gigabeat S PCM: There's no reason to touch any hardware registers in order to lock out PCM callbacks.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26340 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 23:14:39 +00:00
Michael Sevakis
72ccb14ab1
Gigabeat S: Turn off hardware effects (tone and 3d) when doing digital loopback for FM recording otherwise the signal and levels are poorly represented in monitoring (can't just do ADC->DAC for general FM and get voice too). Some tweaking to input setup to improve gain a tiny bit. A little bit quieter startup too.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26300 a1c6a512-1295-4272-9138-f99709370657
2010-05-26 05:13:45 +00:00
Michael Sevakis
d56999890f
Make PCM->driver interface about as simple as it will get. Registered callback, zero data, alignment and stops are handled entirely inside pcm.c; driver merely calls fixed pcm.c callback. Remove pcm_record_more and do it just like playback; the original reason behind it isn't very practical in general. Everything checks out on supported targets. There wer some compat changes I can't check out on many unsupoorted but if there's a problem it will be a minor oops. Plugins become incompatible due to recording tweak-- full update. Sorted API.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26253 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 16:42:32 +00:00
Michael Sevakis
9594f86c1a
Gigabeat S: Use longer battery filter; lag is not a problem with voltage for charging since it's I-controlled. Initialize local copy of last_inputs for the power routines in target init otherwise the battery filter is reinitialized too soon.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26180 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 23:39:59 +00:00
Michael Sevakis
3356effcdf
Gigabeat S: Wrong thing messing with IPU_CONF. No fiddling is needed just yet.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26155 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 00:42:55 +00:00
Michael Sevakis
54c649697b
Gigabeat S: Implement LCD contrast, invert and flip modes. Enhance LCD power management. Include init data but it's not needed yet (identical to Gigabeat F).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26154 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 23:50:00 +00:00
Michael Sevakis
e34c0593e7
Gigabeat S: There's no reason to pause the LCD DMA when changing the framebuffer address.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26054 a1c6a512-1295-4272-9138-f99709370657
2010-05-15 14:58:16 +00:00
Michael Sevakis
4d04132c76
PCM bottom layer simplification. pcm_rec_peak_addr variable no longer has to be handled there. Driver can just return current pointer for recording peaks. A new define, HAVE_PCM_REC_DMA_ADDRESS, specifies that physical addresses are being used for recording and translation is needed before starting a new block. The drivers need not worry about aligning start and size nor should care if either will be zero. All this will be checked in the logical layer first.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25970 a1c6a512-1295-4272-9138-f99709370657
2010-05-12 14:05:36 +00:00
Michael Sevakis
43d2c7ad19
Clean the DCache just before going to main because areas were written by init code that need to be coherent (.ncbss and .sdmacode).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25896 a1c6a512-1295-4272-9138-f99709370657
2010-05-08 08:32:09 +00:00
Michael Sevakis
a420561bf8
Gigabeat S: Reclaim about 800K of memory that was laying unused. Get rid of DEVBSS_ATTR for this target and implement as NOCACHEBSS_ATTR. Plugin and codec buffers move so all that is now incompatible (do full update). No version increase for plugins/codecs because the loader will reject them.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25895 a1c6a512-1295-4272-9138-f99709370657
2010-05-08 07:45:34 +00:00
Michael Sevakis
d7ef247412
i.MX31/Gigabeat S minor cleaning: Make HW access more obvious in places I forgot to do earlier. Reduce the number of structs that need to be filled-out for some drivers just to simplify a little. Change some types.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25870 a1c6a512-1295-4272-9138-f99709370657
2010-05-07 10:53:19 +00:00
Michael Sevakis
affea5fe9e
i.MX31: Make some style changes to some driver code so that hardware vs. variable access is more obvious to the eye. Change a few data types and qualifiers. No functional differences.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25865 a1c6a512-1295-4272-9138-f99709370657
2010-05-07 02:29:18 +00:00
Frank Gevaerts
ab4a162763
Fix gigabeat S includes so it builds again
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25855 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 22:13:54 +00:00
Thomas Martitz
50a6ca39ad
Move c/h files implementing/defining standard library stuff into a new libc directory, also standard'ify some parts of the code base (almost entirely #include fixes).
...
This is to a) to cleanup firmware/common and firmware/include a bit, but also b) for Rockbox as an application which should use the host system's c library and headers, separating makes it easy to exclude our files from the build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25850 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 21:04:40 +00:00
Michael Sevakis
0defb8483c
Gigabeat S bootloader: Fix archaic call placement in dptc_stop which hangs the bootloader before jumping to FW. Let the backlight LED ramp up after unplugging USB which just looks better.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25840 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 04:45:05 +00:00
Michael Sevakis
992b7e10b8
Gigabeat S: There's no compelling reason to start automatic scaling in the bootloader only stop it milliseconds later. Do init to default frequency and working point, however.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25839 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 04:17:34 +00:00
Michael Sevakis
021f9e9e56
Changed a macro to a raw in int constant. Didn't mean to do that. Put it back right.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25838 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 03:30:59 +00:00
Michael Sevakis
a36a498c57
i.MX31/Gigabeat S: This should fix stability problems. One problem was to start using the DVFS controller properly so that interrupts will be masked at the lowest and highest frequency indexes. Millions of useless interrupts were occurring at 132MHz because its index was 2, not 3, which masks it automatically when it can't go slower. Stopping the flood was enough to actually see the difference in general. IRQ must be disabled when fiddling with the CCM registers and only enabled when waiting for voltage ramp as having them enables also causes spurious DVFS ints. Implement interruptible ISR pro/epilogue more safely (always using IRQ stack even in SVC mode handling). Fix an improper inequality in DVFS code (which set regs for down when going up and v.v.). Misc. support changes. Have internal tables take less RAM.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25837 a1c6a512-1295-4272-9138-f99709370657
2010-05-06 03:23:51 +00:00
Michael Sevakis
630b4fc555
i.MX31/Gigabeat S: The nested IRQ code was just totally wrong and not actually working anyway (which is why it wasn't crashing). AVIC doesn't seem truthful about priority of current ISR either :\. Sometimes there were channel swaps during really active DVFS due to FIFO underflow from a needed long delay in the ISR (100us, and IIS TX only has 45us reserve) and DMARQ *must* be serviced low-latency. Get it doing as was intended.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25822 a1c6a512-1295-4272-9138-f99709370657
2010-05-05 07:15:20 +00:00
Michael Sevakis
4048a1cf4b
Merely correct a comment.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25802 a1c6a512-1295-4272-9138-f99709370657
2010-05-04 10:43:32 +00:00
Michael Sevakis
5edcb11f44
i.MX31/Gigabeat S: Just a little paranoid change to switcher write to active regulators method, to keep things localized a bit more from global data pool, for safety's sake. It's going to Mars afterall.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25801 a1c6a512-1295-4272-9138-f99709370657
2010-05-04 10:37:06 +00:00
Michael Sevakis
931e06de64
i.MX31/Gigabeat S: Actually enable DPTC which can set optimal voltage for 528MHz. Requires an SPI and PMIC interface rework because of the low-latency needs for the DPTC to work best with minimal panicing. SPI can work with multitasking and asynchronously from interrupt handlers or normal code.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25800 a1c6a512-1295-4272-9138-f99709370657
2010-05-04 10:07:53 +00:00
Michael Sevakis
b3f1eb8bba
Gigabeat S: Those odd calls to irq_handler can still happen rarely after executing WFI. With no explanation forthcoming after trying many things, hide head in sand and ignore them and the IRQ will get vectored to the correct handler anyway. Have vector tables execute an immediate return and remove irq_handler from compilation altogether.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25792 a1c6a512-1295-4272-9138-f99709370657
2010-05-03 07:48:00 +00:00
Michael Sevakis
1c770046b6
Gigabeat S: All the target backlight functions are currently called on the backlight thread whereas that wasn't the case when the hardware fading was added. Now there's no danger of setting brightness interfering while setting up fades, so get rid of the superfluous mutex.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25700 a1c6a512-1295-4272-9138-f99709370657
2010-04-23 17:35:01 +00:00
Michael Sevakis
11cca264ff
i.MX31/Gigabeat S: Implement frequency and voltage scaling-- 1.6V for 528MHz, and 1.35V for 264MHz and 132MHz. Keep DPTC overdrive ( > 400MHz) voltage scaling off for now because of uncertainties. Simplify the (working) mess later.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25699 a1c6a512-1295-4272-9138-f99709370657
2010-04-23 15:32:50 +00:00
Michael Sevakis
6cee7579db
i.MX31: Add some enums and a couple helper functions to make dealing with pin muxing and pad configuration a bit more sane. Convert any existing code which changes mux/pad settings to use helpers.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25698 a1c6a512-1295-4272-9138-f99709370657
2010-04-23 13:46:04 +00:00
Michael Sevakis
f359ec7630
Gigabeat S: Employ more accurate battery charging curve.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25615 a1c6a512-1295-4272-9138-f99709370657
2010-04-13 04:57:35 +00:00
Michael Sevakis
79d90b9e76
Gigabeat S/i.MX31: Continue, and most likely complete, the platform/player-specific code/data shuffling begun in r25547.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25564 a1c6a512-1295-4272-9138-f99709370657
2010-04-10 09:24:06 +00:00
Michael Sevakis
eb755ec351
Gigabeat S: Slow down the SPI clock to 1/8 current speed. It seems lower voltages can reveal the weakness that forbids maximum-speed clocking per the SPI spec. OF leaves it set much slower. Push it a bit over OF since it's been gotten away with fairly cleanly so far. Settings on pins and interface to be more thoroughly investigated.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25554 a1c6a512-1295-4272-9138-f99709370657
2010-04-09 13:21:32 +00:00