Commit graph

692 commits

Author SHA1 Message Date
Marcin Bukat
0b29691324 Move load_firmware() to separate file
The idea is to share loading code between bootloaders and rolo().

Change-Id: I1656ed91946d7a05cb7c9fa7a16793c3c862a5cd
Reviewed-on: http://gerrit.rockbox.org/190
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2013-06-27 13:50:11 +02:00
Amaury Pouly
27aca8f276 imx233: don't dcp on stmp3600, allow touchscreen with HAVE_*
Change-Id: Icb9dd3c9b9abdf1c013a78d67576ac857a7f010f
2013-06-18 16:41:23 +02:00
Amaury Pouly
0b6198f8a8 imx233: add basic ATA driver
The current driver only works in PIO mode.

Change-Id: I1cf2eaedcce0172a254c3bab0e1257886226d3a0
2013-06-18 16:41:13 +02:00
Amaury Pouly
bbb789120c imx233: add uartdbg driver
The driver is current unused and very minimal. It can used on
targets which have an accessible UART port and it will be used on
some creative targets as backlight control.

Change-Id: Id710d63574aadb0a2d7327b03187506b469470b1
2013-06-18 16:24:28 +02:00
Amaury Pouly
ea8b22a9b6 zenxfi3: drop audio routing driver in favor of the generic one
Change-Id: Ia104c148f9139434d2c70190d2834b06de20de23
2013-06-18 16:19:28 +02:00
Amaury Pouly
11c907a83c zenxfi2: drop audio routing driver in favor of the generic one
Change-Id: I8186f4b8e7cdc5abc549dffb033178921f447998
2013-06-18 16:18:08 +02:00
Amaury Pouly
d997dafb6c fuzeplus: drop audio routing driver in favor of the generic one
Change-Id: I89828ef858606bf09e115ff9c27ff9ecc8bf8b8e
2013-06-18 16:15:07 +02:00
Andrew Ryabinin
fa4e1baa83 Introduce HiFi E.T MA9 port.
Change-Id: I79aadc958fd5222f26f91ed127f8c6fb2c465dc2
2013-05-06 14:09:24 +04:00
andypotter
ecaa401660 Add Serial Port 1 support for iPod Photo/Color/4G/Mini2G
Based on FS#9920 by Ryan Press with changes to selection logic so
that it works on my iPod Photo. Should also work on iPod Color/4G
and Mini2G. Moved all target specific code from
firmware/drivers/serial.c into new file
firmware/target/arm/pp/uart-pp.c in the same manner as other
target specific uart code.
Update to fix build error on ipodmini2g by adding defines in config file.
Removed unwanted whitespace
Tested on iPod Photo.

Change-Id: Ia5539563966198e06372d70b5adf2ef78882f863
Reviewed-on: http://gerrit.rockbox.org/455
Reviewed-by: andypotter <liveboxandy@gmail.com>
Tested-by: andypotter <liveboxandy@gmail.com>
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2013-04-25 21:02:09 +02:00
Michael Sevakis
0c7b787398 Straighten out the mad twisted state of sound.c and related areas.
This is going right in since it's long overdue. If anything is goofed,
drop me a line or just tweak it yourself if you know what's wrong. :-)

Make HW/SW codec interface more uniform when emulating HW functionality
on SWCODEC for functions such as "audiohw_set_pitch". The firmware-to-
DSP plumbing is in firmware/drivers/audiohw-swcodec.c. "sound_XXX"
APIs are all in sound.c with none in DSP code any longer.

Reduce number of settings definitions needed by each codec by providing
defaults for common ones like balance, channels and SW tone controls.

Remove need for separate SIM code and tables and add virtual codec header
for hosted targets.

Change-Id: I3f23702bca054fc9bda40f49824ce681bb7f777b
2013-04-15 12:02:05 -04:00
Michael Sevakis
f5a5b94686 Implement universal in-PCM-driver software volume control.
Implements double-buffered volume, balance and prescaling control in
the main PCM driver when HAVE_SW_VOLUME_CONTROL is defined ensuring
that all PCM is volume controlled and level changes are low in latency.

Supports -73 to +6 dB using a 15-bit factor so that no large-integer
math is needed.

Low-level hardware drivers do not have to implement it themselves but
parameters can be changed (currently defined in pcm-internal.h) to work
best with a particular SoC or to provide different volume ranges.

Volume and prescale calls should be made in the codec driver. It should
appear as a normal hardware interface. PCM volume calls expect .1 dB
units.

Change-Id: Idf6316a64ef4fb8abcede10707e1e6c6d01d57db
Reviewed-on: http://gerrit.rockbox.org/423
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2013-04-11 22:55:16 +02:00
Amaury Pouly
a924df8d6d rk27xx: implement radio support
Change-Id: I59d3905e9b2a3df8aa235e424c7a6e0eff6d73e9
Reviewed-on: http://gerrit.rockbox.org/427
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Tested-by: Marcin Bukat <marcin.bukat@gmail.com>
2013-04-11 11:18:23 +02:00
Lorenzo Miori
60592165ca Samsung YP-R0 hosted target code refactoring
As per title this patch aims at splitting common target
code and specific target code in a better way to
support future ports within the same environment
(e.g. Samsung YP-R1 where the Linux and the SoC
are the same, with differences in hardware devices
handling)

Change-Id: I67b4918c46403b184d3d8f42ab5aae7d01037fd0
Reviewed-on: http://gerrit.rockbox.org/409
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Tested-by: Thomas Martitz <kugel@rockbox.org>
2013-03-06 00:21:22 +01:00
Amaury Pouly
5aa19f3eeb imx233: implement emi frequency scaling (disabled by default)
CPU frequency scaling is basically useless without scaling the
memory frequency. On the i.MX233, the EMI (external memory
interface) and DRAM blocks are responsable for the DDR settings.
This commits implements emi frequency scaling. Only some settings
are implemented and the timings values only apply to mDDR
(extracted from Sigmatel linux port) and have been checked to
work on the Fuze+ and Zen X-Fi2/3. This feature is still disabled
by default but I expected some battery life savings by boosting
higher to 454MHz and unboosting lower to 64MHz.
Note that changing the emi frequency is particularly tricky and
to avoid writing it entirely in assembly we rely on the compiler
to not use the stack except in the prolog and epilog (because
it's in dram which is disabled when doing the change) and to put
constant pools in iram which should always be true if the
compiler isn't completely dumb and since the code itself is put
in iram. If this proves to be insufficient, one can always switch
the stack to the irq stack since interrupts are disabled during
the change.

Change-Id: If6ef5357f7ff091130ca1063e48536c6028f23ba
2013-01-10 00:51:35 +00:00
Marcin Bukat
3fea2c7e84 min2440: make it build again
Change-Id: Id084a7508093e1c7e94006a3adc3beba4025b8a6
2012-10-17 09:33:31 +02:00
Amaury Pouly
4908b8eb1c imx233: merge sd and mmc drivers, fix dma issues
Merge sd and mmc drivers into a single sdmmc driver. This allows
some factoring of the code and simplify bug fixing. Also fix the
dma/cache related issue by doing all transfers via a correctly
aligned buffer. The current code is not smart enough to take
advantage of large user buffers currently but at least it is safe!

Change-Id: Ib0fd16dc7d52ef7bfe99fd586e03ecf08691edcd
2012-08-18 18:24:42 +02:00
Michael Giacomelli
d46b090771 Introduce logging to disk feature into rockbox.
Logs information, errors, etc to disk using the register_storage_idle_func
mechanism to write to the disk when available.  Currently, this is disabled
in normal builds, but can be enabled by adding ROCKBOX_HAS_LOGDISKF to the
config file.  By default, it uses a 2KB buffer and drops text if the buffer
overflows.

The system includes a simple warning level mechanism that can be used to by
default exclude non-serious errors from logging on release builds.

Change-Id: I0a3d186a93625c7c93dae37b993a0d37e5a3a925
Reviewed-on: http://gerrit.rockbox.org/288
Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info>
Tested-by: Michael Giacomelli <mgiacomelli@gmail.com>
Reviewed-by: Michael Giacomelli <mgiacomelli@gmail.com>
2012-08-07 00:53:46 +02:00
Frank Gevaerts
d1560e5869 Add the Android/MIPS target
Change-Id: Iec1d2f08c8a43e486ab1696566a718b18598ff95
2012-06-11 22:29:45 +02:00
Bertrik Sikken
c4183e1d67 Move s3c2440 i2c driver in firmware/SOURCES to a more logical place
Change-Id: I5c40d15fc92efc1ce74b54c736e805f9f4a62f77
2012-06-09 17:24:38 +02:00
Lorenzo Miori
3cad5573b6 ypr0: This patch adds radio support to Samsung YP-R0
Basically it uses the default SI4700 radio chip driver, the only thing that's different is the I2C access,
written specifically to interact with my kernel module.
Next things to add are:
- RDS support!

Change-Id: I0ed125641e00f93124d7a34f90dd508e7f1db5a4
Signed-off-by: Lorenzo Miori <memorys60@gmail.com>
2012-05-28 19:39:14 +02:00
Thomas Martitz
3f365fc06b load_code: Get rid of win32 specific code in favor SDL_LoadFunction & friends APIs.
Refactor native/hosted implementation seperation while at it
(no wrappers starting with _ anymore).

Change-Id: If68ae89700443bb3be483c1cace3d6739409560a
2012-05-26 22:46:56 +02:00
Amaury Pouly
58f8bddf88 zenxfi2: add fmradio i2c glue
Change-Id: Ifa8781b3c416002355b17591a4fdbed8a20979a8
2012-05-20 01:35:24 +02:00
Amaury Pouly
e401683482 zenxfi3&stfm1000: implement fmradio i2c and debug screen
Change-Id: I83dbdee13185d9adcf590dc213da5a8c97adb2ba
2012-05-19 18:04:25 +02:00
Amaury Pouly
12c64a4b79 Initial commit for the Creative ZEN X-Fi2 and X-Fi3 ports
These are really similar devices so one commit for both is ok.

Change-Id: I8bd1d3fef1eb6d00aaadfb7af56c771f62d0c9c3
2012-05-19 16:10:52 +02:00
Amaury Pouly
85d5c19347 imx233: add touchscreen driver
Change-Id: I406076d110e33cdae871222191d82262fabcf16a
2012-05-19 16:10:52 +02:00
Amaury Pouly
9d87113958 imx233: add pwm driver
Change-Id: Ib920b119f52b492247d75e97c5ec9298146d583c
2012-05-19 16:10:52 +02:00
Amaury Pouly
07138ba2ba imx233: move the freescale partition handling to its own file
The freescale firmware partitions has a lots of quirks that
need to be dealt with, so do it the proper way.

Change-Id: I8a5bd3fb462a4df143bc6c931057f3ffedd4b3d3
2012-05-19 16:10:52 +02:00
Amaury Pouly
9ced006c06 imx233: move icoll stuff to its own file
The icoll code now has an IRQ storm detection mechanism which
will prevent the device from hard freezing in case it happen.

Change-Id: I9861238dce61d29af1e48f9c534ec63a7f23465c
2012-05-19 16:10:51 +02:00
Rafaël Carré
2eccc02d7d sansa AMS: i2s_reset() is never used 2012-05-06 23:47:05 -04: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
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
Marcin Bukat
f30043a0db rk27xx: add rolo_restart() rk27xx specific variant
Change-Id: Ib786a9ef6318d259ecef783becdd7c0fa6f52730
2012-03-04 00:34:59 +01:00
Marcin Bukat
2f8b44aae2 Add RKW firmware file format loader
Change-Id: I5283fdcdb8d263fd9375a6d29396f82650aeb686
2012-03-04 00:34:26 +01:00
Marcin Bukat
b4eab59951 Arm stack unwinder
Simplified stack unwinder for ARM. This is port of
http://www.mcternan.me.uk/ArmStackUnwinding/
backtrace() is called from UIE() on native targets
and from panicf() on both native and ARM RaaA.

Change-Id: I8e4b3c02490dd60b30aa372fe842d193b8929ce0
2012-02-22 08:33:26 +01:00
Cástor Muñoz
e29619b4d2 FS#12524 - iPod Classic/6G: hardware click support
Based on the piezo driver for the nano2g.

Signed-off-by: Nils Wallménius <nils@rockbox.org>
2012-02-11 23:46:35 +01:00
Amaury Pouly
d32891fa59 fuze+: change rendering scheme, do not rely on generic framebuffer and implement rect updating and yuv blitting correctly.
Now lcd_framebuffer is the only framebuffer in the system. We still use a ARM-buffered buffer
which serve as an intermediate buffer for copying, to accomodate the requirement of the controller.
We implement lcd_update_rect() properly using this new scheme (this requires two little quirks),
this allows to implement lcd_blit_yuv with the right semantic (bypasses the framebuffer). YUV to RGB
conversion is still done in software but the DCP CSC should be able to do that but the hardware rotation
scheme is not the same as our software so it will require some tricks.

Change-Id: I0752e9c2f1a705d2e6a6010084e1f150965d8370
2012-01-27 20:08:33 +01:00
Thomas Martitz
9e7b417452 firmware/target/arm doesn't contain code for hosted anymore.
Change-Id: Id6149d4b81d4c402d18571567645c066224cf6f1
2012-01-22 18:46:45 +01:00
Thomas Martitz
c94cf3b888 Move optimized ffs to firmware/asm, using the new automatic-asm-picking infrastructure.
Change-Id: I5e7bdc8be7de50ef604c16078857fff1b84650dc
2012-01-22 18:46:45 +01:00
Thomas Martitz
5e9b62cd8a ypr0: Use generic lcd memframe driver. 2012-01-22 18:46:45 +01:00
Thomas Martitz
094cbd586f Implement a C version lcd-as-memframe.c and move it and the asm to firmware/asm.
Change-Id: I20c3af0368202493d54fb776530300a39d47873a
2012-01-22 18:46:45 +01:00
Thomas Martitz
a035261089 Move optimized memcpy and friends and strlen to firmware/asm,
using the new automatic-asm-picking infrastructure.
2012-01-22 18:46:45 +01:00
Thomas Martitz
d3ae11d75a android/ypr0: Merge lc-*.c to generic lc-unix.c.
Change-Id: Ica76dec903486c32fda8355acdc58f0315c4d384
2012-01-21 18:39:20 +01:00
Thomas Martitz
5d13ecc4a8 android/ypr0: Merge fs-*.c to generic filesystem-unix.c.
Change-Id: I52e2c29346baf0d282243880477cd149311ce3d1
2012-01-21 18:39:19 +01:00
Thomas Martitz
954cd771fb android/ypr0: Merge kernel-*.c to generic kernel-unix.c.
Change-Id: Ife3fceb53829ef4e13bae73d8d2f10d7e56d484d
2012-01-21 18:39:19 +01:00
Thomas Martitz
5b4a6c4267 Hosted: Merge debugf() implementations. Cleanup debug.h.
Fixes debug build for ypr0.

Change-Id: I9c0eff651dcf268a3fafed1a71fcc47f3e323d36
2012-01-21 18:39:19 +01:00
Thomas Martitz
cf333a61c7 Move supprt-arm.S to separate library.
Core, codecs and plugins link it separately so this gets rid of SOURCES trickery.
Don't build it for hosted targets.

Change-Id: If15ef90e93cd218a4352ae8e89eea95d3122452f
2012-01-21 18:39:19 +01:00
Amaury Pouly
35ba39e57f imx233: add DCP driver (only memcpy implemented), move channel arbiter to kernel-imx233
Change-Id: I2bc5a49459c354027fc67a880bbf3b87c942bdd0
2012-01-15 02:29:30 +01:00
Rafaël Carré
4fc27c16ae adc-as3514.c : move to drivers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31629 a1c6a512-1295-4272-9138-f99709370657
2012-01-08 02:33:43 +00:00
Rafaël Carré
8552824284 ascodec-target.h: remove
move prototypes to ascodec.h
move code to ascodec*.c

YPR0: use adc-as3514.c instead of duplicating it

TODO: merge as3514.h and ascodec.h ?

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31626 a1c6a512-1295-4272-9138-f99709370657
2012-01-08 01:43:16 +00:00
Thomas Martitz
c1bd9b0361 Rework powermgmt to enable code re-use on appliation and sims.
* Introduce CONFIG_BATTERY_MEASURE define, to allow targets (application)
to break powermgmt.c's assumption about the ability to read battery voltage.
There's now additionally percentage (android) and remaining time measure
(maemo). No measure at all also works (sdl app). If voltage can't be measured,
then battery_level() is king and it'll be used for power_history and runtime
estimation.

* Implement target's API in the simulator, i.e. _battery_voltage(), so it
doesn't need to implement it's own powermgmt.c and other stubs. Now
the sim behaves much more like a native target, although it still
changes the simulated battery voltage quickly,

* Other changes include include renaming battery_adc_voltage() to
_battery_voltage(), for consistency with the new target functions and
making some of the apps code aware that voltage and runtime estimation
is not always available.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31548 a1c6a512-1295-4272-9138-f99709370657
2012-01-03 23:44:38 +00:00