Commit graph

9403 commits

Author SHA1 Message Date
Thomas Martitz
bb0e4cc543 touchscreen: Fix kinetic scrolling when the statusbar is off.
The scrolling code cannot differentiate between the BUTTON_TOUCHSCREEN post
from normal touches and the one posted in the timeout callback.

To fix introduce a global special button (BUTTON_REDRAW) that results
in the desired redraw. This existed already as a local kludge for android
and is now generalized.

Change-Id: I6bfa6c66431c48f5042fcd8fce2ea72cd3457f58
2012-04-05 15:01:59 +02:00
Thomas Martitz
4b56ee048a Refactor and unify objcopy calls in the build system. Also now properly handles DEBUG builds on hosted targets to keep debug symbols if necessary.
Change-Id: I884031b79c6d49479e4d95752f35ced68872dd5d
2012-04-04 21:48:19 +02:00
Frank Gevaerts
9ca9b657e4 Revert 1207c7b and fix the actual warnings.
The warnings 1207c7b was supposed to get rid of are sim-only. This
means the binsize argument used for the _FORTIFY_SOURCE fix did not
apply at all. This one actually checks the return values.

Change-Id: Ic4cd8c25de4305310baa868c077a66981cdfcb4b
2012-04-03 20:59:11 +02:00
Frank Gevaerts
416da2260c Call tuner_power(true) from the correct place for lv24020lp.
This fixes radio not working on c200 and e200 (and possibly others),
as reported in FS#12631.

Change-Id: Idd66fa3b74916cc6f2de45ae7dd89b3bfd70f070
2012-04-02 22:14:07 +02:00
Cástor Muñoz
a85780bacc Classic/6G: CPU frequency/voltage scaling
This patch implements HAVE_ADJUSTABLE_CPU_FREQ, it modifies the
following parameters when CPU is unboosted:

- s5l8702 voltage is decreased: 1.200V -> 1.050V
- CPU frequency is divided by 4: 216MHz -> 54MHz
- AHB frequency is divided by 2: 108MHz -> 54MHz

Change-Id: I2285b83efb7e1567864ac288f2d4ba55f058f7c5
2012-03-31 01:18:15 +02:00
Cástor Muñoz
a75b5b83d4 Classic/6G: click wheel controller powersave
Mask click wheel controller clock gate when the hold switch is in
the locked position

Change-Id: I9de33db189afdb76cc5057e4c0e7efc587cf762b
2012-03-31 01:18:15 +02:00
Rafaël Carré
41b46231cb usb-nano2g-6g: missing brace in non-default preprocessor path
Change-Id: Iacf6719e58b927bb619d469048e16797cae5cecd
2012-03-30 18:58:38 -04:00
Thomas Martitz
72988f3c0c android: implement system_exception_wait and system_reboot, so that the panicf() screen can be exited.
Change-Id: I1fb095a7ae01a99c84722eeec199b1007b0f6088
2012-03-30 11:23:07 +02:00
Thomas Martitz
148a80e1d1 panicf(): fix wrong font and colors being displayed.
Change-Id: I57680d5857b577d731b5703e209ccc6e9511ef17
2012-03-30 11:23:07 +02:00
Thomas Martitz
a54c687300 Apparently make doesn't like inline comments
Change-Id: If604af9713cf95dafbeb1a601219ca1b3a8964fa
2012-03-28 23:14:39 +02:00
Thomas Martitz
7b1a369cf7 build system: completely autodetect target cpu architecture.
The existing ARCH Makefile variable is exported to the C code as well.
Additionally the version (arm-only for now) is detected as well. This
allows to for complete autodetection, i.e. that optimized ASM is picked up
if determined by preprocessor (CPU_ARM, etc).

Building a sim/raaa on a arm host will now automatically generate a arm
optmized build like we have for native targets.

Change-Id: I0b35393f8fb3ebd20beaa9e7371fa57bf3782107
2012-03-28 23:02:39 +02:00
Cástor Muñoz
7ec426e497 Classic/6G: hold switch detection using GPIO
Configures GPIO ports to detect holdswitch status instead of
polling the PMU via I2C, this fixes some random crashes

Change-Id: I407c9ca4c2c9203842f9e774b1c8d0455d59048c
Reviewed-on: http://gerrit.rockbox.org/194
Reviewed-by: Michael Giacomelli <giac2000@hotmail.com>
2012-03-28 00:51:22 +02:00
Thomas Martitz
f269aa0060 build system: unify/simplify library handling a bit.
libs in $ROOT/lib now add to $(CORE_LIBS) and $(EXTRA_LIBS) and are
automatically linked by the core and codecs/plugins respectively.

Change-Id: Iff482c792a8c8142718f6a16a450c6e2f1497c9a
2012-03-26 22:27:40 +02:00
Marcin Bukat
5513c6db56 rk27xx: implement system_init()
For now it contains explicit SDRAM setup, cutting clock for unused
modules and turning off unused PLLs. This improves slightly mem
throughput as well as saves quite a bit of power.

Change-Id: I19a2827ac90a6868856c676fbe1e051c42f0d608
2012-03-22 23:48:31 +01:00
Thomas Martitz
901521d6de android: lcd_update/_rect() changes
* rename some java methods (to update(), initialize())
* re-create the ByteBuffer object from the framebuffer on every update.
  This is needed now since 2c71aa9 added the possiblity for lcd_framebuffer to change.
* do so, along with the creation of the dirty Rect object, in native code.

Change-Id: Id39ea8e4b6148987c5f216a87e0ff3c8e7babe92
2012-03-22 23:26:50 +01:00
Thomas Martitz
58e097d4a6 android: Add facility for java code to wait native code to be ready.
Especially when unzipping rockbox.zip, the native code can be initialized
a lot later than the java code. The java code needs to be prevented from
accessing rockbox structures (e.g. current_tick, event queues) before they're
ready.

This commit adds wait_rockbox_ready() and fixes dodgy behavior of starting
rockbox via widget play button, headset remote buttons or multimedia keys.
Also fixes wrong small list items before first redraw.

Change-Id: I1caf925e829a9c1c6bb6e0016d5c80574574c91e
2012-03-22 20:44:52 +01:00
Thomas Martitz
04cd1fd99b Remove left-over debug statement (oops).
Change-Id: Ic672ad77bd9e30285f4bd95275a170f8ec75869b
2012-03-20 23:08:37 +01:00
Thomas Martitz
1f83d2c6d2 lcd_fillrect(): Unify 16bit implementations (move to 16bit-common.c)
Change-Id: I457ea9fcb67869fdac7f1201a059a362b087e908
2012-03-20 23:04:43 +01:00
Thomas Martitz
bae2470758 Refactor lcd_clear_viewport().
* Unify 16bit implementaitons (move to 16bit-common.c).
* Add viewport clipping (within #ifdef HAVE_VIEWPORT_CLIP) like other lcd_* functions have.

Change-Id: I4e96b2efdb94d2f7bc5bcdb710554117989579ec
2012-03-20 22:42:31 +01:00
Jonathan Gordon
287bf71247 sdl: Fix the sdl init so the sim will get a taskbar item
Change-Id: Ib0049f96c54b4471a8185937d92bb6e8a492142a
2012-03-20 21:26:37 +11:00
Bertrik Sikken
bb6ac6fcba sansa clip+: properly reset display using the reset pin
Change-Id: Ic4bb85cfca4e21d908e187381b868d3f7ef18f88
2012-03-19 21:00:06 +01:00
Marcin Bukat
e1796fbc20 mrobe500: fix warrnig in bootloader
Change-Id: I327dad2b8f335468d38ff8d717f7885c14492b7e
2012-03-19 08:43:27 +01:00
Marcin Bukat
395290b7cd fix cache function name
Change-Id: Ica743c1ea4e8e5fd4e4c70c00b0dc1fd019268a2
2012-03-19 08:42:53 +01:00
Frank Gevaerts
0fdbbc3afd Add RBCODEC_LIB to android and ypr0 builds so they link again.
Change-Id: I022c7beba844a9b2cfcb8ec7950a1348e4bf511a
2012-03-18 13:37:49 +01:00
Rafaël Carré
24bd9d5393 gmtime: avoid a modulus
since WEEK_SECONDS = 7 * DAY_SECONDS, the result is the same

Change-Id: Iec161fc2de626c99c1aabf80ab1d3243eac602d9
2012-03-18 10:09:08 +01:00
Szymon Dziok
b67f1b2872 HDD6330: Correct voltage values, based on the values found in the OF.
Change-Id: I76a101cd2c96be06fc95ca16871e5c86c2326c2d
2012-03-17 19:20:21 +01:00
Szymon Dziok
740722f913 HDD6330: Simplify strange OF voltage calculation, it's linear anyway.
Change-Id: I33ecad4a265a4c7e8883da7b6d28fb061a4c8e68
2012-03-17 19:20:21 +01:00
Amaury Pouly
e5b5041583 imx233/fuze+: rework lradc/adc code, add external temperature sensing(battery)
Rework code to be more useful:
- move battery channel init to lradc
- always init lradc from system (previously from adc)
- don't reserve channels for vddio, nmos or pmos
- implement external temperature sensing using current source
- use this for battery sensing on the Fuze+ (calibration needed)

Change-Id: I5f9a24b9243db7d1e6bdb16b84bc891e61d0c318
2012-03-17 17:42:49 +01:00
Amaury Pouly
e07b22f27e fuze+: add unknown channel to debug menu
imx233: always divide physical channels by two for wider range

The Fuze+ OF monitors channel 2 but I'm unable to determine the meaning of it.
Print the value on the debug menu so that people can have a look at it.

Change-Id: I8a942febeafbce06014178abda12e38a16c26664
2012-03-15 18:47:23 +01:00
Amaury Pouly
9caffa8bf7 imx233/fuze+: rework i2c and fmradio_i2c init
Only enable fmradio_i2c once with _init() called from system.
Move actual i2c init to system for consistency.
Move tuner power pin setup to power instead of fmradio.

Change-Id: Idb56bfba5803f71b5d049f174c48d2afb969a6ea
2012-03-15 15:01:11 +01:00
Amaury Pouly
a4fd5bf7cb imx233: enable charging in bootloader USB mode by including powermgmt
Change-Id: I8b91b3ab60cb9ffaa127333e9bcef8c33be742fa
2012-03-15 15:01:11 +01:00
Jonathan Gordon
014a08cabb skin_engine: New tag to draw a rectangle (optionally with a gradient)
%dr(x, y, width, height, [colour1[, colour2]]):
x,y - viewport relative pixel coordinates to start the rectangle.
width, height - obvious. can be '-' to fill the viewport
if both colours are left out the viewports foreground colour will be used
if one colour is specified it will fill the rectangle that colour.
if both colours are specified it will gradient fill the rectangle.

Change-Id: Iad451e99ded663bc7c5d182443659db7d909b388
2012-03-15 22:52:53 +11:00
Bertrik Sikken
47115ba834 Convert IMX233 RTC driver (used in fuze+) to use mktime and gmtime
Change-Id: Ie71d495509a81db5e02078398f5d722c00136072
2012-03-13 19:27:55 +01:00
Bertrik Sikken
16a95618de fix year calculation in gmtime
Change-Id: I9a5f29ad73b5620096d38874c70351db9bd90062
2012-03-12 08:50:10 +01:00
Michael Sevakis
64bb720edf Coldfire: Optimize emac context save/restore in mixer ISR.
Save only once if emac is used in ISR and restore only once per ISR
call if already saved.

Change-Id: I0e40db5d4aab2a8552480f76873f59ff6ccd9977
Reviewed-on: http://gerrit.rockbox.org/176
Tested-by: Michael Sevakis <jethead71@rockbox.org>
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
2012-03-12 00:16:12 +01:00
Rafaël Carré
d2aafd19e4 gmtime: reduce array size: days in month fit in 8 bits
Change-Id: Idcebdf0ae120cfc82a1f471d0553d23ca36d7eef
2012-03-11 17:19:48 -04:00
Bertrik Sikken
727e8aa681 Introduce gmtime.c and use it in the AS3514 RTC driver
Change-Id: I00a09ae28a68f8153fb8fa854fea741ddfb0bf09
Reviewed-on: http://gerrit.rockbox.org/175
Tested-by: Bertrik Sikken <bertrik@sikken.nl>
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Reviewed-by: Rafaël Carré <rafael.carre@gmail.com>
2012-03-11 22:10:54 +01:00
Andrew Ryabinin
b069562ef4 rk27xx: lcdif refactoring: make lcdif-rk27xx.c more generic
iomux_lcd now has parameter for display bit mode settings, so we doesn't need ifdef here.
lcd_init_device moved to target specific code
lcdif_init configure pins and lcd cotroller

Change-Id: I3a2d7fd38b08fe3bc5ebefa8c9f7288c21f58212
Reviewed-on: http://gerrit.rockbox.org/153
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Tested-by: Marcin Bukat <marcin.bukat@gmail.com>
2012-03-06 09:37:11 +01:00
Michael Sevakis
d18a5cad7f Tweak paramters of mp3_play_data and callback.
Use generic void * and size_t and make mp3_play_data and its callback
agree on types. Use mp3_play_callback_t instead of prototyping
right in the function call (so it's not so messy to look at). Change
doesn't appear to require plugin API version increment.

Change-Id: Idcab2740ee316a2beb6e0a87b8f4934d9d6b3dd8
2012-03-04 14:50:47 -05:00
Michael Sevakis
cd8e11b463 Tweak some PCM drivers for less typecasting with the data pointer.
Yeah, sizeof (void) here with GCC is 1. If something has a problem
with that, we'll set it straight.

Change-Id: I9ad3eee75dd440f6404a04a501d1533c8bc18ba9
2012-03-04 08:52:50 -05:00
Bertrik Sikken
f6e17e86fe AMSv2: add proper definitions for charge current
Change-Id: I6a14570e94df1be62ae46816d2ff4e3f2b7bc21a
2012-03-04 12:23:05 +01:00
Andrew Ryabinin
f8de21f460 rkw-loader: Fix wrong include
Change-Id: Iee19d074e7766925d1d68787116b84a08c784a1a
2012-03-04 14:30:19 +04:00
Marcin Bukat
ecbda694b2 rename rkw.h header file
Change-Id: I2cb6ea7da9c20ed0ef87f4b8ea90d2e4a4a3bca2
2012-03-04 00:36:02 +01:00
Marcin Bukat
587f52f50e rk27xx: switch to RKW format for binary
Change-Id: I859473abbaf05c8268d832b25d15f27f1ea44648
2012-03-04 00:35:32 +01:00
Marcin Bukat
e2d6f9290d rk27generic: Implement power_off()
Change-Id: I6e7685c83c080cbeeff06c588971901e522e4f85
2012-03-04 00:35:19 +01:00
Marcin Bukat
f30043a0db rk27xx: add rolo_restart() rk27xx specific variant
Change-Id: Ib786a9ef6318d259ecef783becdd7c0fa6f52730
2012-03-04 00:34:59 +01:00
Marcin Bukat
4718ff9db0 Add RKW support to rolo
Change-Id: If0dc0173701e1a4a9e1aa785548596c366306c2b
2012-03-04 00:34:43 +01:00
Marcin Bukat
2f8b44aae2 Add RKW firmware file format loader
Change-Id: I5283fdcdb8d263fd9375a6d29396f82650aeb686
2012-03-04 00:34:26 +01:00
Marcin Bukat
1c565c9c3b rk27xx: rework linker scripts and crt0.S
Change-Id: Id1d509056026bc67e1a5051c60818336933d4aeb
2012-03-04 00:33:27 +01:00
Frank Gevaerts
b9ce249772 Don't define CPU_* for __PCTOOL__
Change-Id: Id49577a002627eb830f833f101b83471d11ec271
2012-03-03 20:35:19 +01:00