rockbox/firmware/target/arm/tms320dm320
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
..
creative-zvm Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
dsp TMS320DM320: Disable CLOCKOUT signal to save some power. 2011-12-22 18:03:44 +00:00
mrobe-500 Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
sansa-connect Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
app.lds Add KEEP() around vectors in linker scripts. 2011-12-18 06:43:08 +00:00
boot.lds Sansa Connect: change bootloader linker file 2016-05-25 17:03:19 +02:00
crt0.S Sansa Connect: change bootloader linker file 2016-05-25 17:03:19 +02:00
debug-dm320.c Add missing kernel.h includes (hopefully all of them). 2014-01-05 20:32:09 +01:00
dma-dm320.c Sandisk Sansa Connect port (FS #12363) 2011-11-16 14:08:01 +00:00
dma-target.h Sandisk Sansa Connect port (FS #12363) 2011-11-16 14:08:01 +00:00
dsp-dm320.c Sansa Connect: Set unknown GIOs to state with lowest power consumption. This slightly improves runtime. 2011-12-26 09:45:18 +00:00
dsp-target.h
dsp_image_helloworld.h
i2c-dm320.c Add missing kernel.h includes (hopefully all of them). 2014-01-05 20:32:09 +01:00
i2c-dm320.h Sansa Connect: Revise codec initialization/shutdown. 2011-12-05 09:53:23 +00:00
kernel-dm320.c Sandisk Sansa Connect port (FS #12363) 2011-11-16 14:08:01 +00:00
sdmmc-dm320.c Unify storage threads into one 2017-10-26 14:35:41 -04:00
spi-dm320.c Fix stupid omission 2017-08-16 11:02:55 -04:00
spi-target.h Clean spi.h and spi-target.h 2012-01-07 22:04:12 +00:00
system-dm320.c Sansa Connect: Set unknown GIOs to state with lowest power consumption. This slightly improves runtime. 2011-12-26 09:45:18 +00:00
system-target.h Sandisk Sansa Connect port (FS #12363) 2011-11-16 14:08:01 +00:00
timer-dm320.c M:Robe 500: Use bit modifiers more. 2011-02-08 05:53:30 +00:00
uart-dm320.c M:Robe 500: Use bit modifiers more. 2011-02-08 05:53:30 +00:00
uart-target.h