rockbox/firmware/target/arm/imx233
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-zen zen/zenxfi: increase LCD clock frequency 2017-08-27 17:49:11 +02:00
creative-zenxfi2 zenxfi2: fix touchscreen bug 2017-09-17 00:04:14 +02:00
creative-zenxfi3 imx233: make microphone bias, bias pin and resistor configurable 2016-09-21 00:36:51 +01:00
pins imx233: add stmp3600 and stmp3700 pin descriptions 2013-06-18 16:21:38 +02:00
regs imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
samsung-ypz5 Samsung YP-Z5: keypad adaption to the new button API 2017-05-16 12:10:50 +10:00
sansa-fuzeplus Improve radio RDS driver and framework 2017-02-11 22:19:32 -05:00
sony-nwz nwz-370/380: increase adc button error margin 2016-05-28 17:11:49 +02:00
adc-imx233.c imx233: cosmetics 2016-05-28 17:07:42 +02:00
adc-target.h Fix sim red 2013-11-19 22:12:42 +00:00
app.lds imx233: remove redundant lines in linker script 2017-01-24 15:34:20 +01:00
ata-imx233.c imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
ata-target.h Unify storage threads into one 2017-10-26 14:35:41 -04:00
audio-imx233.c imx233: remove weak attribute on some functions 2017-02-04 17:16:32 +01:00
audio-imx233.h imx233: remove weak attribute on some functions 2017-02-04 17:16:32 +01:00
audioin-imx233.c imx233: make microphone bias, bias pin and resistor configurable 2016-09-21 00:36:51 +01:00
audioin-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
audioout-imx233.c imx233: fix audio debug screen on stmp3700 2017-01-14 01:17:25 +01:00
audioout-imx233.h imx233: slightly rework 3D audio setting 2016-12-12 12:15:24 +01:00
boot.lds imx233: remove redundant lines in linker script 2017-01-24 15:34:20 +01:00
button-imx233.c imx233: remove weak attribute on some functions 2017-02-04 17:16:32 +01:00
button-imx233.h imx233: remove weak attribute on some functions 2017-02-04 17:16:32 +01:00
button-lradc-imx233.c imx233: make button-lradc drive able to handle VDDIO derived values 2014-02-10 23:14:25 +01:00
button-lradc-imx233.h imx233: make button-lradc drive able to handle VDDIO derived values 2014-02-10 23:14:25 +01:00
clkctrl-imx233.c imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
clkctrl-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
clock-target.h
crt0.S imx233: fix app.lds to properly support INIT_ATTR 2014-02-17 19:02:21 +01:00
dcp-imx233.c Add missing kernel.h includes (hopefully all of them). 2014-01-05 20:32:09 +01:00
dcp-imx233.h Fix copyright headers 2012-12-29 01:40:35 +01:00
debug-imx233.c Don't call touchscreen functions when we don't have a touchscreen 2017-09-17 00:27:10 +02:00
dma-imx233.c imx233: workaround hardware dma bug 2017-01-15 18:41:27 +01:00
dma-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
dualboot-imx233.c imx233: add capability to boot OF or updater instead of Rockbox 2016-12-12 12:03:08 +01:00
dualboot-imx233.h imx233: add capability to boot OF or updater instead of Rockbox 2016-12-12 12:03:08 +01:00
emi-imx233.c imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
emi-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
fmradio-imx233.c imx233: rewrite i2c driver 2016-06-01 22:55:37 +02:00
fmradio-imx233.h imx233: factor fmradio i2c and tuner power code 2013-11-19 20:39:10 +00:00
gpmi-imx233.c imx233: add gpmi stubs 2012-05-19 16:10:52 +02:00
gpmi-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
i2c-imx233.c imx233: rewrite i2c driver 2016-06-01 22:55:37 +02:00
i2c-imx233.h imx233: rewrite i2c driver 2016-06-01 22:55:37 +02:00
icoll-imx233.c imx233: add more icoll statistics 2016-12-12 13:20:10 +01:00
icoll-imx233.h imx233: add more icoll statistics 2016-12-12 13:20:10 +01:00
kernel-imx233.c imx233: simplify timrot API 2016-05-28 17:18:32 +02:00
kernel-imx233.h imx233: fix touchscreen driver 2017-05-16 12:14:43 +10:00
lcdif-imx233.c imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
lcdif-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
led-imx233.c imx233: add small framework for LED 2017-01-16 20:08:13 +01:00
led-imx233.h imx233: add small framework for LED 2017-01-16 20:08:13 +01:00
lradc-imx233.c imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
lradc-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
nand-imx233.c Do some housekeeping with fat.h and SECTOR_SIZE 2017-03-12 22:05:44 -04:00
ocotp-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
partitions-imx233.c imx233: be less strict about partition checks (>=1GB only) 2014-01-21 18:52:28 +01:00
partitions-imx233.h imx233/creative: workaround stupid Creative partition table 2013-11-11 02:02:11 +00:00
pcm-imx233.c imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
pinctrl-imx233.c imx233: fix pinctrl for stmp3600 and stmp3700 2013-06-17 00:29:25 +02:00
pinctrl-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
power-imx233.c imx233: update comment about vbusvalid 2017-08-27 17:48:39 +02:00
power-imx233.h imx233: don't print stmp3780 debug info on stmp3700 2017-07-31 01:04:24 +02:00
powermgmt-imx233.c imx233: fix red 2016-05-28 16:50:07 +01:00
powermgmt-imx233.h imx233: speedup charging trickle phase 2016-05-28 16:21:03 +01:00
pwm-imx233.c imx233: add small framework for LED 2017-01-16 20:08:13 +01:00
pwm-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
rtc-imx233.c imx233: implement alarm wake up 2013-07-02 00:45:00 +02:00
rtc-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
sdmmc-imx233.c Unify storage threads into one 2017-10-26 14:35:41 -04:00
sdmmc-imx233.h Fix red, forgotten file 2016-05-29 20:21:26 +01:00
ssp-imx233.c imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
ssp-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
system-imx233.c zen/zenxfi: always set EMI frequency to 130MHz 2017-08-27 17:50:59 +02:00
system-target.h imx233: refactor power off and reboot 2016-12-12 12:06:42 +01:00
timer-imx233.c imx233: simplify timrot API 2016-05-28 17:18:32 +02:00
timrot-imx233.c imx233: simplify timrot API 2016-05-28 17:18:32 +02:00
timrot-imx233.h imx233: simplify timrot API 2016-05-28 17:18:32 +02:00
touchscreen-imx233.c imx233: fix touchscreen driver 2017-05-16 12:14:43 +10:00
touchscreen-imx233.h Fix copyright headers 2012-12-29 01:40:35 +01:00
uartdbg-imx233.c imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
uartdbg-imx233.h imx233: generate register headers using headergen_v2 and update code for it 2016-05-28 16:49:22 +02:00
usb-imx233.c imx233: fix usb_detect() to be consistent with vbus detection 2013-10-21 01:23:14 +02:00