rockbox/firmware/target/arm/s5l8700/ipodnano2g
Michael Sevakis 1654efc313 Unify storage threads into one
* Editing a bunch of drivers' thread routines in order to
implement a new feature is tedious.

* No matter the number of storage drivers, they share one thread.
No extra threads needed for CONFIG_STORAGE_MULTI.

* Each has an event callback called by the storage thread.

* A default callback is provided to fake sleeping in order to
trigger idle callbacks. It could also do other default processing.
Changes to it will be part of driver code without editing each
one.

* Drivers may sleep and wake as they please as long as they give
a low pulse on their storage bit to ask to go into sleep mode.
Idle callback is called on its behalf and driver immediately put
into sleep mode.

* Drivers may indicate they are to continue receiving events in
USB mode, otherwise they receve nothing until disconnect (they
do receive SYS_USB_DISCONNECTED no matter what).

* Rework a few things to keep the callback implementation sane
and maintainable. ata.c was dreadful with all those bools; make
it a state machine and easier to follow. Remove last_user_activity;
it has no purpose that isn't served by keeping the disk active
through last_disk_activity instead.

* Even-out stack sizes partly because of a lack of a decent place
to define them by driver or SoC or whatever; it doesn't seem too
critical to do that anyway. Many are simply too large while at
least one isn't really adequate. They may be individually
overridden if necessary (figure out where). The thread uses the
greatest size demanded. Newer file code is much more frugal with
stack space. I barely see use crack 50% after idle callbacks
(usually mid-40s). Card insert/eject doesn't demand much.

* No forcing of idle callbacks. If it isn't necessary for one or
more non-disk storage types, it really isn't any more necessary for
disk storage. Besides, it makes the whole thing easier to implement.

Change-Id: Id30c284d82a8af66e47f2cfe104c52cbd8aa7215
2017-10-26 14:35:41 -04:00
..
adc-nano2g.c Implement (unused) ADC wrapper for Nano2G to fix the red 2010-03-11 14:02:59 +00:00
audio-nano2g.c
backlight-nano2g.c Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
button-target.h button-target.h : move prototypes to button.h 2012-01-08 00:07:19 +00:00
ftl-nano2g.c Improve readability by adding parenthesis 2015-01-11 18:19:26 +01:00
ftl-target.h emBIOS backports part two: Fix a stupid global variable *instantiation* in a header file, which might have caused all hell of trouble. 2010-08-12 08:46:52 +00:00
lcd-asm-nano2g.S Remove superfluous executable bits on a bunch of files. 2011-06-08 14:22:03 +00:00
lcd-nano2g.c lcd drivers: Convert lcd_[remote_]framebuffer to a pointer 2012-02-28 11:44:59 +11:00
nand-nano2g.c Unify storage threads into one 2017-10-26 14:35:41 -04:00
nand-target.h emBIOS backports part three: Make the NAND flash driver return more useful error codes if initialization fails. 2010-08-12 08:49:12 +00:00
piezo-nano2g.c Make more local functions static. 2011-12-21 17:36:18 +00:00
piezo.h Fix the gpl notice in the previous commits new files, and fix the yelow gevearts naughtily ignored 2011-11-16 10:37:48 +00:00
pmu-nano2g.c ipod nano 2g: make functions/variables static where possible, add missing #includes 2010-08-08 10:49:32 +00:00
pmu-target.h Enable iPod Nano 2G boosting (without undervolting for now) 2010-02-17 15:54:48 +00:00
power-nano2g.c iPod Nano 2G and Classic: Fix power and charging detection. 2016-02-14 15:42:54 +01:00
powermgmt-nano2g.c Rework powermgmt to enable code re-use on appliation and sims. 2012-01-03 23:44:38 +00:00
rtc-nano2g.c Move intrinsic RTC implmentation differences to driver files 2017-01-26 23:07:49 -05:00
serial-nano2g.c iPod Nano2G: add IPOD_ACCESSORY_PROTOCOL 2016-05-14 19:39:09 +02:00