rockbox/firmware/target/arm/rk27xx
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
..
hm60x hm60x: Add lcd type information to debug info. 2013-03-25 16:32:58 +04:00
hm801 hm60x/hm801: Add hold button support. 2012-12-29 00:19:23 +04:00
ihifi Introduce IHIFI760/960 targets. 2013-12-16 00:45:18 +04:00
ma Add missing kernel.h includes (hopefully all of them). 2014-01-05 20:32:09 +01:00
rk27generic rk27xx: Use DMA for lcd_update_rect() 2013-05-11 12:55:23 +02:00
adc-rk27xx.c rk27xx: substitute magic constants with meaningful names for clock gating 2013-01-10 20:23:41 +01:00
adc-target.h hm801: Implement additional button driver. 2012-10-18 14:10:02 +04:00
app.lds rk27xx: Implement HAVE_INIT_ATTR magic 2014-01-10 09:01:08 +01:00
ata-nand-rk27xx.c Cleanup MV/MD macros a little. 2013-08-17 12:18:22 -04:00
audio-rk27xx.c fix yellow 2013-04-11 11:42:12 +02:00
backlight-rk27xx.c Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
backlight-target.h Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
boot.lds rk27xx: rework linker scripts and crt0.S 2012-03-04 00:33:27 +01:00
crt0.S rk27xx: Implement HAVE_INIT_ATTR magic 2014-01-10 09:01:08 +01:00
debug-rk27xx.c Introduce IHIFI760/960 targets. 2013-12-16 00:45:18 +04:00
ftl-rk27xx.c
ftl-target.h
i2c-rk27xx.c rk27xx: fix i2c driver 2013-04-09 09:31:40 +02:00
kernel-rk27xx.c rk27xx: substitute magic constants with meaningful names for INTC 2013-01-10 20:23:41 +01:00
lcd-hifiman.c rk27xx: Use DMA for lcd_update_rect() 2013-05-11 12:55:23 +02:00
lcdif-rk27xx.c rk27xx: Use DMA for lcd_update_rect() 2013-05-11 12:55:23 +02:00
lcdif-rk27xx.h rk27xx: Slightly refactor lcd_set_gram_area() 2013-05-11 12:30:38 +02:00
nand-rk27xx.c Fix identations. 2013-04-04 15:47:24 +04:00
nand-target.h
pcm-rk27xx.c Add missing kernel.h includes (hopefully all of them). 2014-01-05 20:32:09 +01:00
rkw-loader.c Move load_firmware() to separate file 2013-06-27 13:50:11 +02:00
rolo_restart.S rk27xx: ungate all clocks before jumping into rolo'ed code. This should fix booting OF this way 2012-04-30 23:17:29 +02:00
sd-rk27xx.c Unify storage threads into one 2017-10-26 14:35:41 -04:00
spfd5420a.h
system-rk27xx.c rk27xx: avoid one multiply in udelay() as pointed by kugel 2013-04-12 10:08:45 +02:00
system-target.h rk27xx: sd: properly align buffer used for DMA transfers. 2014-11-29 21:00:11 +03:00
timer-rk27xx.c rk27xx: substitute magic constants with meaningful names for INTC 2013-01-10 20:23:41 +01:00
usb-drv-rk27xx.c Fix warnings from 6ed0087 2014-08-16 06:00:36 -04:00
usb-rk27xx.c Revert "rk27xx: implement usb driver" 2013-08-11 19:21:24 +02:00