summaryrefslogtreecommitdiff
path: root/firmware/system.c (follow)
Commit message (Collapse)AuthorAge
* AMS: Return ascodec to interrupt-based I2C2 driverMichael Sevakis2017-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix reds.Thomas Martitz2011-12-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31416 a1c6a512-1295-4272-9138-f99709370657
* Initial commit of the Samsung YP-R0 port.Thomas Martitz2011-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz2010-06-21
| | | | | | | | | | | #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
* Simplify some redundant boolean expressionsBertrik Sikken2009-05-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21013 a1c6a512-1295-4272-9138-f99709370657
* A few tweaks to get USB support compiling again on TCC targets (part of ↵Rob Purchase2009-03-09
| | | | | | FS#9917 by Michaël Burtin). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20264 a1c6a512-1295-4272-9138-f99709370657
* Remove struct spinlock to cleanup some mess and simplify. It's only used in ↵Michael Sevakis2009-02-03
| | | | | | 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
* Clean up panicf and introduce system_exception_wait to do further target ↵Michael Sevakis2009-01-08
| | | | | | 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
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | 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
* remove leftover debug stuffMarcoen Hirschberg2008-06-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17820 a1c6a512-1295-4272-9138-f99709370657
* initial Meizu M6SL port (take 2)Marcoen Hirschberg2008-06-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17819 a1c6a512-1295-4272-9138-f99709370657
* Make sure the linker considers crt0*.o before all files specified on the ↵Jens Arnold2008-04-29
| | | | | | 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
* Enable nocache sections using the linker. PP5022/4 must use SW_CORELOCK now ↵Michael Sevakis2008-04-06
| | | | | | 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
* Gigabeat S: Interrupt enabled bootloader. Miscellaneous integration changes.Michael Sevakis2008-02-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16243 a1c6a512-1295-4272-9138-f99709370657
* Finally, out goes struct spinlock for anything but mutiprocessor targets ↵Michael Sevakis2008-01-18
| | | | | | where it becomes a reenterable corelock. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16105 a1c6a512-1295-4272-9138-f99709370657
* Fixed warnings when logf is enabled.Miika Pekkarinen2007-10-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15243 a1c6a512-1295-4272-9138-f99709370657
* Finally full multicore support for PortalPlayer 502x targets with an eye ↵Michael Sevakis2007-10-16
| | | | | | 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
* Commit a subset of the dual core changes that have to do with cache ↵Michael Sevakis2007-09-28
| | | | | | 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
* Add divide-by-zero trap for ARM instead of just silently ignoring them.Michael Sevakis2007-07-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13832 a1c6a512-1295-4272-9138-f99709370657
* Fix build errors.Barry Wardell2007-04-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13240 a1c6a512-1295-4272-9138-f99709370657
* Move PortalPlayer system.c code into the target tree.Barry Wardell2007-04-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13239 a1c6a512-1295-4272-9138-f99709370657
* Fix some very probable typo's.Barry Wardell2007-04-22
| | | | | | | | | 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
* PP5020/PP5024: Add ASM optimized inline current_core.Michael Sevakis2007-04-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13155 a1c6a512-1295-4272-9138-f99709370657
* Moved SH1 system code to target tree. * First shot at hwcompat cleanup.Jens Arnold2007-04-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13114 a1c6a512-1295-4272-9138-f99709370657
* Now charcell displays require lcd_update() for updating the main lcd content ↵Jens Arnold2007-04-06
| | | | | | like bitmap displays. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13050 a1c6a512-1295-4272-9138-f99709370657
* Fixed compilation problems with boostctrl_mtx.Miika Pekkarinen2007-03-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12927 a1c6a512-1295-4272-9138-f99709370657
* Make scheduler functions thread safe core wise. A big step towards playback ↵Miika Pekkarinen2007-03-26
| | | | | | 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
* PNX0101 changes:Tomasz Malesinski2007-03-24
| | | | | | | | | | 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
* Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - ↵Daniel Ankers2007-03-04
| | | | | | 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
* Replace some inl/outl with register #define's instead. Also tidy up pp5020.h ↵Barry Wardell2007-03-03
| | | | | | so that it's in increasing address order. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12574 a1c6a512-1295-4272-9138-f99709370657
* Remap flash ROM to 0x20000000 on the ipods and H10s, and implement ↵Dave Chapman2007-02-23
| | | | | | 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
* Simple cpu boost tracker for LOGF builds. Shows the last 64 cpu_boost() ↵Jonathan Gordon2007-01-22
| | | | | | calls from the debug menu git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12087 a1c6a512-1295-4272-9138-f99709370657
* Prepare core support for the iriver bootloader supporting ROM imagesMiika Pekkarinen2007-01-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11991 a1c6a512-1295-4272-9138-f99709370657
* Move system specific rebootGreg White2007-01-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11903 a1c6a512-1295-4272-9138-f99709370657
* merge a big part of the unofficial gigabeat cvs back. Includes working ↵Marcoen Hirschberg2006-12-29
| | | | | | bootloader and rockbox with audio. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11850 a1c6a512-1295-4272-9138-f99709370657
* Removed the cpu boost tracking debug feature for now because ofMiika Pekkarinen2006-12-05
| | | | | | | 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
* Sansa doesn't use a Wolfson codec. Various other changes to allow Sansa to ↵Daniel Ankers2006-11-22
| | | | | | 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
* Removed the Gmini 120 and Gmini SP code. These ports are dead, unfortunately.Jens Arnold2006-11-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11504 a1c6a512-1295-4272-9138-f99709370657
* Use HAVE_FLASHED_ROCKBOX when target is flashable. Currenly only used by the ↵Michael Sevakis2006-11-08
| | | | | | H100 series. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11470 a1c6a512-1295-4272-9138-f99709370657
* Big Patch adds primarily: Samplerate and format selection to recording for ↵Michael Sevakis2006-11-06
| | | | | | 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
* Moved coldfire code in system.c and system.h into target tree.Michael Sevakis2006-10-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11399 a1c6a512-1295-4272-9138-f99709370657
* move the iriver h1x0/h3x0 targets to the target treeJonathan Gordon2006-10-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11392 a1c6a512-1295-4272-9138-f99709370657
* Logf output on the serial port for h100 targetsLinus Nielsen Feltzing2006-10-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11207 a1c6a512-1295-4272-9138-f99709370657
* UIE(), panicf(): Make reboot with ON react immediately on targets with real ↵Jens Arnold2006-10-08
| | | | | | LED (archos recorders, player). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11154 a1c6a512-1295-4272-9138-f99709370657
* coldfire: set INTBASE and SPURVEC at startup, fixed typo in GPI0 int namePeter D'Hoye2006-10-08
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11153 a1c6a512-1295-4272-9138-f99709370657
* Add CPU boost tracker to see where boosts are coming fromSteve Bavin2006-10-05
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11125 a1c6a512-1295-4272-9138-f99709370657
* Detect charger connected on H10. No need to sleep(HZ) when powering off.Barry Wardell2006-09-20
| | | | | | | | 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
* Initial commit of work for port to the Tatung Elio TPJ-1022 - yet another ↵Dave Chapman2006-08-31
| | | | | | PortalPlayer PP5020 target. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10828 a1c6a512-1295-4272-9138-f99709370657
* Enable CPU boosting on H10 models.Barry Wardell2006-08-30
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10806 a1c6a512-1295-4272-9138-f99709370657
* Threading changes in preparation for multiple core supportDaniel Ankers2006-08-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10681 a1c6a512-1295-4272-9138-f99709370657