rockbox/firmware/target/arm/as3525
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
..
sansa-c200v2 Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
sansa-clip Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
sansa-clipplus Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
sansa-clipv2 Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
sansa-clipzip Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
sansa-e200v2 Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
sansa-fuze Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
sansa-fuzev2 Increase button delays in preperation for frequency scaling. 2016-01-18 23:51:25 +01:00
sansa-m200v4 Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
adc-target.h adc-target.h: cleanup 2012-01-08 00:39:29 +00:00
app.lds Make INITDATA_ATTR work on everything that has INIT_ATTR enabled for code. 2012-05-01 01:28:50 -04:00
ascodec-as3525.c AMS: Return ascodec to interrupt-based I2C2 driver 2017-01-25 00:05:13 +01:00
audio-as3525.c AS3525v1/v2: 2011-12-08 19:20:00 +00:00
backlight-e200v2-fuze.c Get rid of stupid _backlight_* function names 2015-01-12 11:09:27 +01:00
boot.lds Get the linker files that slipped through in r31337. 2011-12-17 02:00:59 +00:00
button-clip.c Change the clipv2 button driver to use fixed delays rather than processor cycle counting. 2016-01-18 22:35:56 +01:00
button-e200v2-fuze.c Add missing kernel.h includes (hopefully all of them). 2014-01-05 20:32:09 +01:00
clock-target.h AMSv2: DBOP frequency divided by 2 2016-03-27 21:06:27 +00:00
dbop-as3525.c DBOP noise on C200v2 goes away if we precharge long enough. 2010-06-27 02:50:24 +00:00
dbop-as3525.h Sansa AMS: Time has shown that switching between 16 and 32bit mode costs much time (due to the micro delay needed), so do 32bit transfers unconditionally for lcd updates at the cost of updating slightly larger rectangles (gives upto 15% speed up, nearly at maximum now). 2010-01-07 22:21:41 +00:00
debug-as3525.c AMS: Return ascodec to interrupt-based I2C2 driver 2017-01-25 00:05:13 +01:00
dma-pl081.c Deal with a complication when transferring recording method from PP5024: since the FIFO POP is always read until empty, keep track of sample parity instead of always saving the first one in the FIFO upon entering the ISR or else the first of a duplicate that is also the last in the FIFO would get duplicated. Also, give top priority to audio interrupts in all cases. 2011-12-12 20:12:22 +00:00
dma-target.h AS3525: Implement a true audio pause and full-resolution audio tick. Take care of a few atomic hotspots. 2011-01-19 09:15:23 +00:00
fmradio-i2c-as3525.c Improve radio RDS driver and framework 2017-02-11 22:19:32 -05:00
kernel-as3525.c fix previous commit 2012-01-08 00:18:43 +00:00
lcd-as-e200v2-fuze-fuzev2.S lcd: fix function name in comments in assembly files (lcd_write_yup_420 instead of lcd_write_yuv420) 2012-01-11 13:14:30 +01:00
lcd-clip.h lcd-clip.h: mentions clipv2 2010-07-22 17:17:31 +00:00
lcd-fuze.c Do not include kernel.h in system.h. 2014-01-05 19:35:23 +01:00
lcd-fuze.h Fuzev1/v2 : lcd_set_flip() 2010-05-29 13:43:18 +00:00
lcd-ssd1303.c lcd-ssd1303: Fix big oops putting height where there should've been width. 2012-05-19 17:21:54 -04:00
memory-init.S Initial framework for the Sandisk Sansa Clip Zip 2011-08-27 16:21:19 +00:00
pcm-as3525.c AMS: Change DMA transfer size for audio. 2015-06-01 18:23:57 +02:00
power-as3525.c ascodec-target.h: remove 2012-01-08 01:43:16 +00:00
powermgmt-target.h AMSv2: add proper definitions for charge current 2012-03-04 12:23:05 +01:00
scrollwheel-as3525.c Fix FS#12351: The poweroff timer was not reset on scroll wheel activity for e200 and simulator. Thanks to Nick Peskett. 2011-10-28 17:23:40 +00:00
sd-as3525.c Unify storage threads into one 2017-10-26 14:35:41 -04:00
sd-as3525v2.c Unify storage threads into one 2017-10-26 14:35:41 -04:00
system-as3525.c Slightly increase CVDD2 on AMSv2. 2017-06-14 17:37:29 +02:00
system-target.h AMS: Return ascodec to interrupt-based I2C2 driver 2017-01-25 00:05:13 +01:00
timer-as3525.c AMS SoC's: Some register bit changes need interrupt protection: timer API and CGU_PERI. 2010-07-02 06:00:00 +00:00
tuner-as3525v2.c typo 2011-12-15 19:42:21 +00:00
usb-as3525.c as3525v2: use the new USB DesignWare driver 2016-08-15 02:56:23 +02:00
usb-drv-as3525.c AMSv1: rename USB interrupt handler 2012-04-30 14:24:34 -04:00
usb-drv-as3525.h Merge functionality of wakeups and semaphores-- fewer APIs and object types. semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them. 2011-03-02 08:49:38 +00:00