summaryrefslogtreecommitdiffstats
path: root/firmware/system.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-25AMS: Return ascodec to interrupt-based I2C2 driverMichael Sevakis1-16/+13
1. Slightly revised and regularized internal interface. Callback is used for read and write to provide completion signal instead of having two mechanisms. 2. Lower overhead for asynchronous or alterate completion callbacks. We now only init what is required by the transfer. A couple unneeded structure members were also nixed. 3. Fixes a bug that would neglect a semaphore wait if pumping the I2C interrupts in a loop when not in thread state or interrupts are masked. 4. Corrects broken initialization order by defining KDEV_INIT, which makes kernel_init() call kernel_device_init() to initialize additional devices _after_ the kernel, threading and synchronization objects are safe to use. 5. Locking set_cpu_frequency has to be done at the highest level in system.c to ensure the boost counter and the frequency are both set in agreement. Reconcile the locking inteface between PP and AMS (the only two currently using locking there) to keep it clean. Now works fine with voltages in GIT HEAD on my Fuze v2, type 0. Previously, everything crashed and died instantly. action.c calling set_cpu_frequency from a tick was part of it. The rest may have been related to 3. and 4. Honestly, I'm not certain! Testing by Mihail Zenkov indicates it solves our problems. This will get the developer builds running again after the kernel assert code push. Change-Id: Ie245994fb3e318dd5ef48e383ce61fdd977224d4
2011-12-24Fix reds.Thomas Martitz1-2/+4
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31416 a1c6a512-1295-4272-9138-f99709370657
2011-12-24Initial commit of the Samsung YP-R0 port.Thomas Martitz1-1/+1
This port is a hybrid native/RaaA port. It runs on a embedded linux system, but is the only application. It therefore can implement lots of stuff that native targets also implement, while leveraging the underlying linux kernel. The port is quite advanced. User interface, audio playback, plugins work mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page). Included in utils/ypr0tools are scripts and programs required to generate a patched firmware. The patched firmware has the rootfs modified to load Rockbox. It includes a early/safe USB mode. This port needs a new toolchain, one that includes glibc headers and libraries. rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may also work. Most of the initial effort is done by Lorenzo Miori and others (on ABI), including reverse engineering and patching of the original firmware, initial drivers, and more. Big thanks to you. Flyspray: FS#12348 Author: Lorenzo Miori, myself Merry christmas to ypr0 owners! :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
2010-06-21Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz1-1/+1
#if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
2009-05-21Simplify some redundant boolean expressionsBertrik Sikken1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21013 a1c6a512-1295-4272-9138-f99709370657
2009-03-09A few tweaks to get USB support compiling again on TCC targets (part of ↵Rob Purchase1-0/+1
FS#9917 by Michaël Burtin). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20264 a1c6a512-1295-4272-9138-f99709370657
2009-02-03Remove struct spinlock to cleanup some mess and simplify. It's only used in ↵Michael Sevakis1-32/+11
boosting for multiprocesors and a pure two-corelock heirarchy will do just fine. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19910 a1c6a512-1295-4272-9138-f99709370657
2009-01-08Clean up panicf and introduce system_exception_wait to do further target ↵Michael Sevakis1-57/+1
tasks and wait for a button when an unrecoverable error has occurred (panic, UIE, etc.). Returning from that function should reboot or don't return from it. Move UIE and __div0 for ARM to its own file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19716 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg1-2/+4
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-27remove leftover debug stuffMarcoen Hirschberg1-6/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17820 a1c6a512-1295-4272-9138-f99709370657
2008-06-27initial Meizu M6SL port (take 2)Marcoen Hirschberg1-0/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17819 a1c6a512-1295-4272-9138-f99709370657
2008-04-29Make sure the linker considers crt0*.o before all files specified on the ↵Jens Arnold1-6/+0
command line by using STARTUP() instead of INPUT() in the .lds. Using INPUT() makes the linker process crt0*.o after all files specified on the command line, making linking fail if there are librockbox.a members which are only referenced by crt0*.o. Remove the hackaround that was needed for building the gigabeat S bootloader before (aka UIE() problem). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17289 a1c6a512-1295-4272-9138-f99709370657
2008-04-06Enable nocache sections using the linker. PP5022/4 must use SW_CORELOCK now ↵Michael Sevakis1-4/+4
with shared variables in DRAM (it seems swp(b) is at least partially broken on all PP or I'm doing something very wrong here :\). For core-shared data use SHAREDBSS/DATA_ATTR. NOCACHEBSS/DATA_ATTR is available whether or not single core is forced for static peripheral-DMA buffer allocation without use of the UNCACHED_ADDR macro in code and is likely useful on a non-PP target with a data cache (although not actually enabled in config.h and the .lds's in this commit). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16981 a1c6a512-1295-4272-9138-f99709370657
2008-02-08Gigabeat S: Interrupt enabled bootloader. Miscellaneous integration changes.Michael Sevakis1-0/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16243 a1c6a512-1295-4272-9138-f99709370657
2008-01-18Finally, out goes struct spinlock for anything but mutiprocessor targets ↵Michael Sevakis1-1/+1
where it becomes a reenterable corelock. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16105 a1c6a512-1295-4272-9138-f99709370657
2007-10-21Fixed warnings when logf is enabled.Miika Pekkarinen1-0/+6
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15243 a1c6a512-1295-4272-9138-f99709370657
2007-10-16Finally full multicore support for PortalPlayer 502x targets with an eye ↵Michael Sevakis1-11/+63
towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
2007-09-28Commit a subset of the dual core changes that have to do with cache ↵Michael Sevakis1-1/+3
handling, stacks, firmware startup and thread startup. Tested on e200, H10-20GB, iPod Color and 5.5G. Thread function return implemented for all targets. Some changes to plugins to follow shortly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14879 a1c6a512-1295-4272-9138-f99709370657
2007-07-09Add divide-by-zero trap for ARM instead of just silently ignoring them.Michael Sevakis1-1/+17
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13832 a1c6a512-1295-4272-9138-f99709370657
2007-04-22Fix build errors.Barry Wardell1-4/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13240 a1c6a512-1295-4272-9138-f99709370657
2007-04-22Move PortalPlayer system.c code into the target tree.Barry Wardell1-386/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13239 a1c6a512-1295-4272-9138-f99709370657
2007-04-22Fix some very probable typo's.Barry Wardell1-7/+7
CPU_INT_STAT is at 0x60004000, not 0x64004000. CPU_HI_INT_STAT is at 0x60004100, not 0x64004100. Fix wrong IRQ CLR addresses being used by system_init(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13238 a1c6a512-1295-4272-9138-f99709370657
2007-04-14PP5020/PP5024: Add ASM optimized inline current_core.Michael Sevakis1-10/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13155 a1c6a512-1295-4272-9138-f99709370657
2007-04-11Moved SH1 system code to target tree. * First shot at hwcompat cleanup.Jens Arnold1-401/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13114 a1c6a512-1295-4272-9138-f99709370657
2007-04-06Now charcell displays require lcd_update() for updating the main lcd content ↵Jens Arnold1-3/+0
like bitmap displays. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13050 a1c6a512-1295-4272-9138-f99709370657
2007-03-26Fixed compilation problems with boostctrl_mtx.Miika Pekkarinen1-0/+9
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12927 a1c6a512-1295-4272-9138-f99709370657
2007-03-26Make scheduler functions thread safe core wise. A big step towards playback ↵Miika Pekkarinen1-40/+48
running on COP (not yet possible because more protection on file system level is necessary). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12926 a1c6a512-1295-4272-9138-f99709370657
2007-03-24PNX0101 changes:Tomasz Malesinski1-87/+0
Make PNX0101-specific system.c and crt0.S. Add new register names from LPC2880 user manual. Add support for timer. Enable CPU frequency changing. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12904 a1c6a512-1295-4272-9138-f99709370657
2007-03-04Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - ↵Daniel Ankers1-91/+146
iPod G3 will be coming soon.) This allows threads to be run on either core provided that all communications between the cores is done using uncached memory. There should be no significant change in battery life from doing this. Documentation (on the RockboxKernel wiki page) will follow shortly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12601 a1c6a512-1295-4272-9138-f99709370657
2007-03-03Replace some inl/outl with register #define's instead. Also tidy up pp5020.h ↵Barry Wardell1-3/+3
so that it's in increasing address order. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12574 a1c6a512-1295-4272-9138-f99709370657
2007-02-23Remap flash ROM to 0x20000000 on the ipods and H10s, and implement ↵Dave Chapman1-0/+8
dbg_save_roms() in the debug menu for those targets to dump the content to a file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12467 a1c6a512-1295-4272-9138-f99709370657
2007-01-22Simple cpu boost tracker for LOGF builds. Shows the last 64 cpu_boost() ↵Jonathan Gordon1-1/+47
calls from the debug menu git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12087 a1c6a512-1295-4272-9138-f99709370657
2007-01-12Prepare core support for the iriver bootloader supporting ROM imagesMiika Pekkarinen1-11/+24
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11991 a1c6a512-1295-4272-9138-f99709370657
2007-01-04Move system specific rebootGreg White1-17/+0
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11903 a1c6a512-1295-4272-9138-f99709370657
2006-12-29merge a big part of the unofficial gigabeat cvs back. Includes working ↵Marcoen Hirschberg1-1/+9
bootloader and rockbox with audio. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11850 a1c6a512-1295-4272-9138-f99709370657
2006-12-05Removed the cpu boost tracking debug feature for now because ofMiika Pekkarinen1-38/+2
different kind of problems. Better implementation can be done later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11665 a1c6a512-1295-4272-9138-f99709370657
2006-11-22Sansa doesn't use a Wolfson codec. Various other changes to allow Sansa to ↵Daniel Ankers1-2/+4
compile correctly with a normal build. Based on FS#6336 by Pavel Gnelitsa git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11570 a1c6a512-1295-4272-9138-f99709370657
2006-11-10Removed the Gmini 120 and Gmini SP code. These ports are dead, unfortunately.Jens Arnold1-237/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11504 a1c6a512-1295-4272-9138-f99709370657
2006-11-08Use HAVE_FLASHED_ROCKBOX when target is flashable. Currenly only used by the ↵Michael Sevakis1-11/+8
H100 series. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11470 a1c6a512-1295-4272-9138-f99709370657
2006-11-06Big Patch adds primarily: Samplerate and format selection to recording for ↵Michael Sevakis1-2/+1
SWCODEC. Supprort for samplerates changing in playback (just goes with the recording part inseparably). Samplerates to all encoders. Encoders can be configured individually on a menu specific to the encoder in the recording menu. File creation is delayed until flush time to reduce spinups when splitting. Misc: statusbar icons for numbers are individual digits to display any number. Audio buffer was rearranged to maximize memory available to recording and properly reinitialized when trashed. ColdFire PCM stuff moved to target tree to avoid a complicated mess when adding samplerate switching. Some needed API changes and to neaten up growing gap between hardware and software codecs. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11452 a1c6a512-1295-4272-9138-f99709370657
2006-10-30Moved coldfire code in system.c and system.h into target tree.Michael Sevakis1-279/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11399 a1c6a512-1295-4272-9138-f99709370657
2006-10-30move the iriver h1x0/h3x0 targets to the target treeJonathan Gordon1-110/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11392 a1c6a512-1295-4272-9138-f99709370657
2006-10-12Logf output on the serial port for h100 targetsLinus Nielsen Feltzing1-0/+22
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11207 a1c6a512-1295-4272-9138-f99709370657
2006-10-08UIE(), panicf(): Make reboot with ON react immediately on targets with real ↵Jens Arnold1-6/+8
LED (archos recorders, player). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11154 a1c6a512-1295-4272-9138-f99709370657
2006-10-08coldfire: set INTBASE and SPURVEC at startup, fixed typo in GPI0 int namePeter D'Hoye1-1/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11153 a1c6a512-1295-4272-9138-f99709370657
2006-10-05Add CPU boost tracker to see where boosts are coming fromSteve Bavin1-4/+44
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11125 a1c6a512-1295-4272-9138-f99709370657
2006-09-20Detect charger connected on H10. No need to sleep(HZ) when powering off.Barry Wardell1-0/+2
More sensible USB support for H10: plugging in puts it into USB charging mode and leaves Rockbox usable, holding 'O' while pluggin in the USB cable will reboot the H10 (continuing to hold 'O' starts it up in UMS mode), holding any other button brings up the USB screen as previously. Implement system_reboot() for all PP5020 devices. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11015 a1c6a512-1295-4272-9138-f99709370657
2006-08-31Initial commit of work for port to the Tatung Elio TPJ-1022 - yet another ↵Dave Chapman1-1/+1
PortalPlayer PP5020 target. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10828 a1c6a512-1295-4272-9138-f99709370657
2006-08-30Enable CPU boosting on H10 models.Barry Wardell1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10806 a1c6a512-1295-4272-9138-f99709370657
2006-08-21Threading changes in preparation for multiple core supportDaniel Ankers1-41/+61
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10681 a1c6a512-1295-4272-9138-f99709370657