Michael Sevakis
a07c034de7
Gigabeat S: Interrupt enabled bootloader. Miscellaneous integration changes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16243 a1c6a512-1295-4272-9138-f99709370657
2008-02-08 02:20:05 +00:00
Michael Sevakis
1f021af60c
Gigabeat S mixer: Make some progress. Get the tick and core sleep working using the AVIC. Redo the startup code to remap from IRAM and not include the lcd driver frambuffer in the remapping (until it can be moved). Clean up LCD driver. For other misc. changes, see the diffs. Now it progresses to ATA init and fails with -11 but without crashing or hanging. Replace all bootloaders.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16216 a1c6a512-1295-4272-9138-f99709370657
2008-02-05 04:43:19 +00:00
Michael Sevakis
32a531b09b
Do some simplification in switch_thread regarding interrupt enabling which simplifies kernel objects as well. Simply doing unconditional disable/enable should be fine in the firmware. Not sure about the case in the bootloader for all targets and so will evaluate but that should be fine too if everything is masked.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16107 a1c6a512-1295-4272-9138-f99709370657
2008-01-19 13:27:47 +00:00
Michael Sevakis
6a8379674c
Finally, out goes struct spinlock for anything but mutiprocessor targets where it becomes a reenterable corelock.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16105 a1c6a512-1295-4272-9138-f99709370657
2008-01-18 13:12:33 +00:00
Michael Sevakis
3c64ace573
Fix FS#8052 - kernel.c compilation errors when compiling for debug. Just some minor typos that got in with last minute SW corelock changes.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15380 a1c6a512-1295-4272-9138-f99709370657
2007-10-30 20:36:23 +00:00
Nicolas Pennequin
1839edf64a
Add queue_peek to the kernel (written by Mike Sevakis), and use it to improve upon my previous commit.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15336 a1c6a512-1295-4272-9138-f99709370657
2007-10-27 18:08:18 +00:00
Michael Sevakis
6fac8fcc93
Be sure to register a new mutex owner _before_ waking it. Won't be an issue now but would be with mutex recursion on one used for > 1 core where ownership transfer and cs entry/recursion are allowed to run in parallel (by design). TODO: Add true exchange to wakeup_thread but that's not really important for the time being.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15251 a1c6a512-1295-4272-9138-f99709370657
2007-10-21 19:10:03 +00:00
Michael Sevakis
a9b2fb5ee3
Finally full multicore support for PortalPlayer 502x targets with an eye 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-10-16 01:25:17 +00:00
Michael Sevakis
18e87ff1c0
Stabilize PP5020 targets - tested on H10 5/20GB and iPod Color. Use no interrupts on COP but pulse it through the control interface. Don't mess with LCD clocking during clock changes. Give a reset register a name (DEV_OFF_MASK).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14998 a1c6a512-1295-4272-9138-f99709370657
2007-10-05 23:24:46 +00:00
Michael Sevakis
035529c487
Enable auto reply for queue messages sent with queue_send. It's only nescessary to use queue_reply to return a value other than zero or to return a result before waiting on the queue again.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14923 a1c6a512-1295-4272-9138-f99709370657
2007-09-30 17:23:13 +00:00
Michael Sevakis
7914e90738
Commit a subset of the dual core changes that have to do with cache 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-09-28 10:20:02 +00:00
Will Robertson
590501cfe4
Merge the Gigabeat S branch back into trunk. Fingers crossed nothing breaks.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14805 a1c6a512-1295-4272-9138-f99709370657
2007-09-21 15:51:53 +00:00
Michael Sevakis
e64f7e3a6f
Add a new timeout API to the kernel. Enable only for e200 right now since it's the only user. Use that as the one-shot delay for SD card inserts.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14049 a1c6a512-1295-4272-9138-f99709370657
2007-07-29 04:49:19 +00:00
Michael Sevakis
4ae87c8b8a
Gigabeat: Add timer functionality. Rework tick timer setup to be exactly 100Hz. Metronome should work now but some pcm changes are needed to have faster tocks work correctly (in the works).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13806 a1c6a512-1295-4272-9138-f99709370657
2007-07-06 21:36:32 +00:00
Michael Sevakis
60efd38bbe
Gigabeat: Use vectored IRQ mode interrupts and add a trap for unhandled ones.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13792 a1c6a512-1295-4272-9138-f99709370657
2007-07-05 07:14:24 +00:00
Michael Sevakis
6bba70b0ec
current_tick really does need to be volatile since gcc can optimize away checking the value otherwise - found out the hard way. :)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13715 a1c6a512-1295-4272-9138-f99709370657
2007-06-25 20:46:54 +00:00
Michael Sevakis
bfb281ff63
Messages queues must be guarded on both ends or else it's a race between detecting a message present and missing a wakeup on thread about to wait. Keeping IRQs from interacting with the scheduler would be preferable but this should do at the moment. Add more detailed panic info regarding blocking violations so we know who. Make panicf function well enough on Gigabeat and PortalPlayer targets. Move the core sleep instructions into a CPU-specific inline to keep thing organized.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13374 a1c6a512-1295-4272-9138-f99709370657
2007-05-12 05:20:04 +00:00
Jens Arnold
0b7bb31453
Simplification, queue pointers don't wrap (except at INT_MAX, but the calculation is still correct in this case). Implemented queue_count() for the simulator.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13154 a1c6a512-1295-4272-9138-f99709370657
2007-04-14 09:47:47 +00:00
Miika Pekkarinen
66258a30a4
Make scheduler functions thread safe core wise. A big step towards playback 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-26 16:55:17 +00:00
Michael Sevakis
165f62d0cd
Fix a hole in the scheduler where collisions between waking blocked threads in mutexes with interrupts waking blocked threads in message queues can occur. Queue posts will put the threads on a separate list that is then added to the running list with IRQs disabled on the next task switch or CPU wakeup. Basically no overhead for other operations. Seems a likely cause of my occasional observation of the backlight fade causing playback threads to stop running and a recently reported blocking violation upon USB plugging. Time will tell but banging the backlight on and off frequently hasn't hiccuped again for me on H120.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12915 a1c6a512-1295-4272-9138-f99709370657
2007-03-26 03:24:36 +00:00
Tomasz Malesinski
cd630c9e0a
PNX0101 changes:
...
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-24 19:26:13 +00:00
Michael Sevakis
6d87513aa2
In reponse to a report of a blocking violation, give sync queues a going over and catch any old, obscure leftover issues. A couple spots needed interrupt stopage where there could be confict if an IRQ post wakes a waiting thread because the queue is overflowing. There does appear to be an issue with wakeup_thread, interrupts and running list modification in general.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12895 a1c6a512-1295-4272-9138-f99709370657
2007-03-23 01:00:13 +00:00
Michael Sevakis
0caf3b8cae
Update sync queues to use a statically allocated return value in order to facilitate upcoming COP updates.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12881 a1c6a512-1295-4272-9138-f99709370657
2007-03-21 22:58:53 +00:00
Barry Wardell
2370998a87
Disable bootloader messages in the H10 and Sansa bootloaders unless the PLAY (on H10) or RIGHT (on Sansa) button is being held. Messages are still displayed if an error occurs. This has already been implemented for iPod bootloaders, but still needs implementing for the other bootloaders.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12742 a1c6a512-1295-4272-9138-f99709370657
2007-03-12 22:12:20 +00:00
Miika Pekkarinen
2eefb5acb8
Optimized the gui list code performance, including automatic frame dropping and cpu boosting when button events are getting queued. Improved scrollwheel acceleration code is needed to notice a real change.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12721 a1c6a512-1295-4272-9138-f99709370657
2007-03-11 10:52:36 +00:00
Michael Sevakis
dee43ece20
Put an end to priority inversion in the ata driver. Gave up trying to have fully atomic dual use mutexes so just replaced the ata driver locking with spins. Maybe I'll have better luck later. Things should run smoothly with database updates and such happening in the background.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12688 a1c6a512-1295-4272-9138-f99709370657
2007-03-09 08:03:18 +00:00
Daniel Ankers
82f9056988
Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - 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-04 20:06:41 +00:00
Marcoen Hirschberg
295367686e
merge a big part of the unofficial gigabeat cvs back. Includes working bootloader and rockbox with audio.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11850 a1c6a512-1295-4272-9138-f99709370657
2006-12-29 02:49:12 +00:00
Michael Sevakis
4b902679cc
Convert queues to use intptr_t for event data and return values as most of the time pointer are not passed and it should make some things a bit cleaner.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11818 a1c6a512-1295-4272-9138-f99709370657
2006-12-19 16:50:07 +00:00
Michael Sevakis
43c15921e4
Add queue_send synchronous message sending. Right now only for SWCODEC. Actual usage to be added to playback and recording shortly in upcoming commits.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11776 a1c6a512-1295-4272-9138-f99709370657
2006-12-16 18:35:12 +00:00
Daniel Ankers
242cbd5cd7
Change if CONFIG_CPU==PP50XX to ifdef CPU_PP where appropriate
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11569 a1c6a512-1295-4272-9138-f99709370657
2006-11-22 00:41:30 +00:00
Brandon Low
8a82892e52
Thread API enhancements.
...
1) block_thread -> block_thread + block_thread_w_tmo -- this call was always used in distinct ways so having one call with a conditional was ugly.
2) enhance Slasheri's scheduler controlled boost concept. now any thread may trigger a boost which will last until that thread next sleeps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11509 a1c6a512-1295-4272-9138-f99709370657
2006-11-11 05:33:24 +00:00
Jens Arnold
780f79e7a4
Removed the Gmini 120 and Gmini SP code. These ports are dead, unfortunately.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11504 a1c6a512-1295-4272-9138-f99709370657
2006-11-10 20:26:01 +00:00
Linus Nielsen Feltzing
4950b55837
Patch #6052 - More responsive skip on Archos
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11273 a1c6a512-1295-4272-9138-f99709370657
2006-10-19 11:43:13 +00:00
Miika Pekkarinen
a85044bf9e
New scheduler, with priorities for swcodec platforms. Frequent task
...
switching should be more efficient and tasks are stored in linked
lists to eliminate unnecessary task switching to improve performance.
Audio should no longer skip on swcodec targets caused by too CPU
hungry UI thread or background threads.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10958 a1c6a512-1295-4272-9138-f99709370657
2006-09-16 16:18:11 +00:00
Jens Arnold
1bb8657a8f
Fixed an off-by-one error in the portalplayer timer handling.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10837 a1c6a512-1295-4272-9138-f99709370657
2006-09-01 06:13:33 +00:00
Dave Chapman
657dcb5165
Initial commit of work for port to the Tatung Elio TPJ-1022 - yet another PortalPlayer PP5020 target.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10828 a1c6a512-1295-4272-9138-f99709370657
2006-08-31 19:19:35 +00:00
Marcoen Hirschberg
0a0682474e
initial gigabeat bootloader (only test code)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10536 a1c6a512-1295-4272-9138-f99709370657
2006-08-12 08:27:48 +00:00
Marcoen Hirschberg
dd754886f5
update the gigabeat code and move to target_tree
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10535 a1c6a512-1295-4272-9138-f99709370657
2006-08-12 08:01:54 +00:00
Daniel Stenberg
6a8aebbce7
better check for portalplayer targets
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10407 a1c6a512-1295-4272-9138-f99709370657
2006-08-02 09:46:51 +00:00
Daniel Stenberg
0fc30d1174
added mostly dummy changes to allow building of a Sansa e200 bootloader
...
without functionality
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10399 a1c6a512-1295-4272-9138-f99709370657
2006-08-01 22:28:14 +00:00
Dave Chapman
987879b958
Further iPod 3G work from Seven Le Mesle
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8583 a1c6a512-1295-4272-9138-f99709370657
2006-02-05 17:34:49 +00:00
Thom Johansen
22e6c02f8e
Removed PP5020_ prefix from register defines and added/renamed some
...
defines.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8438 a1c6a512-1295-4272-9138-f99709370657
2006-01-24 22:31:57 +00:00
Thom Johansen
289ec0164b
Properly configurable tick timer for PP5020.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8437 a1c6a512-1295-4272-9138-f99709370657
2006-01-24 22:16:27 +00:00
Linus Nielsen Feltzing
dacc6f3821
Slightly safer version of queue_delete()
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8425 a1c6a512-1295-4272-9138-f99709370657
2006-01-23 10:59:07 +00:00
Linus Nielsen Feltzing
765e0f89d8
New kernel function, queue_delete(struct event_queue *q)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8424 a1c6a512-1295-4272-9138-f99709370657
2006-01-23 10:53:47 +00:00
Dave Chapman
d83e929f3f
Work-in-progress iriver iFP-7xx port by Tomasz Malesinski
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8342 a1c6a512-1295-4272-9138-f99709370657
2006-01-12 00:35:50 +00:00
Dave Chapman
cb7e695ef9
iPod: Fix the bootloader so it can load and run the original Apple firmware again. The Rockbox firmware was doing too much to the hardware so we remove most of the initialisation.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8301 a1c6a512-1295-4272-9138-f99709370657
2006-01-05 17:02:48 +00:00
Thom Johansen
544b03cf9a
Add interrupt handler for iPod. Add timer tick support. Remove temporary thread sleep solution. Remove temporary iPod current_tick solution.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8224 a1c6a512-1295-4272-9138-f99709370657
2005-12-12 13:53:22 +00:00
Thom Johansen
52e91de5d3
First attempt at iPod threading.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7852 a1c6a512-1295-4272-9138-f99709370657
2005-11-13 23:47:38 +00:00