Commit Graph

108 Commits

Author SHA1 Message Date
James Buren 581081a3df mi4: replace chksum_crc32 with crc_32r
This uses an equivalent algorithm but with a different initial value
than we normally use (all bits off vs all bits on). Use the new crc_32r
to replace the original MI4 crc32 implementation.

This frees up some extra space on mi4 targets which gives us more
room on a few very space constrained targets (sansa c200/e200, etc).

Change-Id: Iaaac3ae353b30566156b1404cbf31ca32926203d
2021-06-21 09:36:54 +00:00
Solomon Peachy 7d0d32dbc6 Nuke the never-functional iriver ifp-7xx port
It never worked, and hasn't compiled in something like a decade, Given
the HW capabilities (limited onboard flash, no expandability) there's
really no point in trying to fix/complete it.

Change-Id: I7d175089840396f8891645bd10010d730dd5bfdc
2021-04-26 07:42:58 -04:00
Aidan MacDonald 9313274302 FiiO M3K: fix LCD weirdness when booting via RoLo
Change-Id: I2234a0d1b3095adbcca0bbd060fd5a7e13a895c1
2021-04-21 19:10:34 +01:00
Aidan MacDonald 4b26372591 MIPS: make sure to fill 'jr' branch delay slot with 'nop'
Inline assembly in RoLO and the FiiO M3K bootloader used 'jr' to
jump to a newly loaded Rockbox binary, but incorrectly left the
branch delay slot open. That gives GCC an opening to place illegal
instrutions, etc, which might cause an unhandled exception.

Change-Id: Ia7a561fe530e94a41189d25f18a767c448177960
2021-04-07 19:59:57 +01:00
Solomon Peachy 10b873c407 xduoox3: In ROLO, allow the ADC to be shut down.
The hang we were seeing was due to IRAM wonkiness. that's fixed.

Change-Id: Ie33a1110639fe51ad540e4e172e41f22f3bf875b
2021-03-17 18:09:40 -04:00
Solomon Peachy bcee955169 rolo: use audio_hard_stop() instead of audio_stop()
This kills the audio thread entirely, including voice stuff.

Change-Id: Id6fd58a97d5a57285016351bbfd3e843b2f339f2
2021-03-04 09:49:38 -05:00
William Wilgus a4a5f5f33f Check core max allocations for valid handle
fix rolo warnings

Change-Id: Ia2c669a5517aec54e5b2c0dc5934c88a4f49f2a9
2021-03-04 14:25:58 +00:00
Solomon Peachy 2628155fc9 Clean up places that use #if defined(CPU_ARM | CPU_COLDFIRE | CPU_MIPS)
Since that encompasses _all_ of our native targets in a post-archos world,
either replace it with #if (CONFIG_PLATFORM & PLATFORM_NATIVE) or
delete it altogher as appropriate.

Change-Id: I9128a456e850d5c96a9e05806aad3acd923f90c5
2021-03-04 14:14:33 +00:00
William Wilgus 15b4d22913 ROLO check for OOM
Splqash failure and return on OOM

Change-Id: I97b8783ba42545e30a5639e8a751d1e6834aebc8
2021-03-04 08:58:34 -05:00
Solomon Peachy 6533d983ca hosted: Add ROLO support for hosted targets
Change-Id: I2d46a63ee8225a9d9d77dd80a06c418af78c260c
2020-10-11 14:18:42 +00:00
William Wilgus 3c2b6809d9 Xduoo X3 no ADC after ROLO
Speachy suggested we don't shut down the adc on ROLO
this fixes the random adc drop out on ROLO

Change-Id: Ife7d679ce51a6f767963210ee650815f1de12223
2020-09-13 13:29:00 -04:00
Solomon Peachy 0cb162a76b mips: Heavily rework DMA & caching code
Based on code originally written by Amaury Pouly (g#1789, g#1791, g#1527)
but rebased and heavily updated.

Change-Id: Ic794abb5e8d89feb4b88fc3abe854270fb28db70
2020-09-03 15:34:28 -04:00
Johannes Rauh da190727e7 Enable boot from SD for Sansa e200
Change-Id: I0940f2cd5fc914d6d5061b5798b1a636009649b7
2020-08-19 19:17:01 -04:00
William Wilgus d7b9eb6b63 ROLO - Enable multiboot firmware
I never added multiboot awareness to ROLO

When a new firmware file was loaded [Bootdata] would not be
copied to the new instance resulting in the firmware
running off the internal drive till next reboot

Bootloaders shares the rb-loader code but should not be
affected by the removal of static from write_bootdata()

Change-Id: Iccb18eebeee5c59f9534df51eb6826876c441762
2020-08-08 02:41:13 -04:00
Solomon Peachy 092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
Michael Sevakis 63eae4339a rolo.c: Change 'int errno' to 'int err'
It can cause issues if errno.h finds itself included there

Change-Id: Id5d2be66cd3af4c2760e4a37d3332853e9b54f95
2017-11-07 16:48:07 -05:00
Mihail Zenkov 7cb1e5ae8b Fix AMSv2 variant 1 detection if rockbox loaded from SD card
Change-Id: Ie7c9c06170601e109f8d3de9686773c38a6e224a
2016-04-22 20:43:45 +00:00
Michael Giacomelli 11c8b3927d Fix warning in rolo.
Change-Id: Idb902f44a6aa2648e5cbd0e19ee2d14394479de8
2016-01-24 00:04:18 +01:00
Mihail Zenkov 3f54101858 Enable frequency scaling on AMSv2 devices.
Voltage scaling is not yet enabled, but will follow once we are sure
these changes are stable.  Preliminary testing suggests a large
increase in battery life, which will be further improved by voltage
scaling.  Patch by Mihail Zenkov with help from myself and others on
the forums.

Change-Id: I171d20bbee19a48c13cd14efb0d023883cc8c687
2016-01-21 19:26:00 +01:00
Thomas Martitz c72b454286 Fix reds. Also apply the new scrolling to lcd charcell (this even uncovered an
error).

Change-Id: I29243bb36b6cec1471bd6c0afc64e00547a68c50
2013-12-15 00:38:48 +01:00
Thomas Martitz 1c5d0b41ee scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api.
Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-12-14 23:11:30 +01:00
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
Marcin Bukat ecbda694b2 rename rkw.h header file
Change-Id: I2cb6ea7da9c20ed0ef87f4b8ea90d2e4a4a3bca2
2012-03-04 00:36:02 +01:00
Marcin Bukat 4718ff9db0 Add RKW support to rolo
Change-Id: If0dc0173701e1a4a9e1aa785548596c366306c2b
2012-03-04 00:34:43 +01:00
Rafaël Carré 2200c2aa22 rolo: include lcd-remote.h only when needed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31610 a1c6a512-1295-4272-9138-f99709370657
2012-01-07 19:45:09 +00:00
Michael Sevakis 6a67707b5e Commit to certain names for cache coherency APIs and discard the aliases.
Wouldn't surprise me a bit to get some non-green.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31339 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 07:27:24 +00:00
Thomas Martitz d0b72e2590 GSoC/Buflib: Add buflib memory alocator to the core.
The buflib memory allocator is handle based and can free and
compact, move or resize memory on demand. This allows to effeciently
allocate memory dynamically without an MMU, by avoiding fragmentation
through memory compaction.

This patch adds the buflib library to the core, along with
convinience wrappers to omit the context parameter. Compaction is
not yet enabled, but will be in a later patch. Therefore, this acts as a
replacement for buffer_alloc/buffer_get_buffer() with the benifit of a debug
menu.

See buflib.h for some API documentation.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30380 a1c6a512-1295-4272-9138-f99709370657
2011-08-30 14:01:33 +00:00
Thomas Martitz d1322b7159 GSoC/Buflib: Replace all direct accesses to audiobuf with buffer API functions.
Namely, introduce buffer_get_buffer() and buffer_release_buffer().
buffer_get_buffer() aquires all available and grabs a lock, attempting to
call buffer_alloc() or buffer_get_buffer() while this lock is locked will cause
a panicf() (doesn't actually happen, but is for debugging purpose).
buffer_release_buffer() unlocks that lock and can additionally increment the
audiobuf buffer to make an allocation. Pass 0 to only unlock if buffer was
used temporarily only.
buffer_available() is a replacement function to query audiobuflen, i.e. what's
left in the buffer.
Buffer init is moved up in the init chain and handles ipodvideo64mb internally.

Further changes happened to mp3data.c and talk.c as to not call the above API
functions, but get the buffer from callers. The caller is the audio system
which has the buffer lock while mp3data.c and talk mess with the buffer.
mpeg.c now implements some buffer related functions of playback.h, especially
audio_get_buffer(), allowing to reduce #ifdef hell a tiny bit.

audiobuf and audiobufend are local to buffer.c now.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30308 a1c6a512-1295-4272-9138-f99709370657
2011-08-14 15:13:00 +00:00
Rafaël Carré 74cee6297c rolo: use BX for ARM branches
This is equivalent to mov pc
Remove an instruction from the asm() for PP cop restart : use register constraint

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26431 a1c6a512-1295-4272-9138-f99709370657
2010-05-31 14:42:27 +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
Rafaël Carré 1bc59454d5 rolo: make PP code pp6100-compatible
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25798 a1c6a512-1295-4272-9138-f99709370657
2010-05-03 21:50:48 +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 Sparmann 6afe802a83 Add a "Flushing storage buffers" message to ROLO if it needs to do that.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23313 a1c6a512-1295-4272-9138-f99709370657
2009-10-21 20:29:51 +00:00
Michael Sparmann 940fd995a4 storage_flush() should be done before disabling interrupts in ROLO.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23312 a1c6a512-1295-4272-9138-f99709370657
2009-10-21 20:21:41 +00:00
Jens Arnold 2dd45f7c6d Make RoLo work on PP5002. * Rename CACHE_CTL flag values on PP5002 for consistency.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23277 a1c6a512-1295-4272-9138-f99709370657
2009-10-19 21:38:52 +00:00
Thomas Martitz ee7247998a Fix rolo for AMS Sansa and simplify a few #ifdefs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23275 a1c6a512-1295-4272-9138-f99709370657
2009-10-19 21:32:40 +00:00
Dave Chapman 178337970e Nano2G - call storage_flush() before rolo_restart() to ensure FTL is flushed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23087 a1c6a512-1295-4272-9138-f99709370657
2009-10-11 02:06:42 +00:00
Dave Chapman 0ada0ae789 Enable rolo on the Nano2G - it hasn't been thoroughly tested, but seems to be working.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23086 a1c6a512-1295-4272-9138-f99709370657
2009-10-11 01:54:29 +00:00
Maurus Cuelenaere 48203093ce Fix RoLo on MIPS targets
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21185 a1c6a512-1295-4272-9138-f99709370657
2009-06-04 11:57:43 +00:00
Karl Kurbjun 4fa96fbc91 M:Robe 500i: More LCD initialization, and beginnings of support for QVGA as well as VGA on the LCD. MPEGPlayer now works with reasonable performance on smaller videos, but YUV blitting persists after MPEGPlayer is left, some cleanup/changes to the initialization code. This should be functionally equivalent for the ZVM, but the #ifdef's may need to be added back for app.lds. Get the bootloader building again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20598 a1c6a512-1295-4272-9138-f99709370657
2009-04-01 03:21:18 +00:00
Maurus Cuelenaere 38436038a9 Ingenic Jz4740:
* Add initial RoLo support
 * Don't enable IRAM in plugins for now
 * Initial try at getting PCM working (doesn't crash anymore at least)
 * Replace hard-coded constant with #define in usb-jz4740


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20115 a1c6a512-1295-4272-9138-f99709370657
2009-02-26 21:15:40 +00:00
Michael Sevakis 21f0c9a282 Make basic cache functions into calls, and get rid of CACHE_FUNCTION_WRAPPERS and CACHE_FUNCTIONS_AS_CALL macros. Rename flush/invalidate_icache to cpucache_flush/invalidate. They're inlined only if an implementation isn't provided by defining HAVE_CPUCACHE_FLUSH/INVALIDATE.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19971 a1c6a512-1295-4272-9138-f99709370657
2009-02-11 12:55:51 +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 2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Michael Sevakis fa5bd07f6b Oops. Lost sync on a few instances and 'HI' registers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17684 a1c6a512-1295-4272-9138-f99709370657
2008-06-03 05:19:32 +00:00
Michael Sevakis 191320cd0f Rename CPU/COP_INT_CLR to CPU/COP_INT_DIS since it's really a 'write one to disable' register and hasn't anything to do with acknowledging interrupts-- that's handled at the module level.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17683 a1c6a512-1295-4272-9138-f99709370657
2008-06-03 05:08:24 +00:00
Michael Sevakis 6dd6ea74af Gigabeat S RoLo: Properly execute firmware copy from an IRAM stub because the currently running image was being overwritten in place. Minor tweak to rolo.c based on imx31 errata sheet about not masking FIQ without masking IRQ which is fine to use on all ARM anyway.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17414 a1c6a512-1295-4272-9138-f99709370657
2008-05-08 12:09:14 +00:00
Bertrik Sikken 2124a9fad0 Made rolo.h consistent with rolo.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17310 a1c6a512-1295-4272-9138-f99709370657
2008-05-03 07:17:44 +00:00
Karl Kurbjun 6c6a2ed910 Working ROLO for the Gigabeat F/X
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17304 a1c6a512-1295-4272-9138-f99709370657
2008-05-02 03:27:17 +00:00
Michael Sevakis 7fee4868f9 For TCC and IMX Rolo, use a full flush and invalidate before branching.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17149 a1c6a512-1295-4272-9138-f99709370657
2008-04-16 23:49:21 +00:00