rockbox/firmware/target/arm/imx31
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
..
gigabeat-s Improve radio RDS driver and framework 2017-02-11 22:19:32 -05:00
app.lds Make INITDATA_ATTR work on everything that has INIT_ATTR enabled for code. 2012-05-01 01:28:50 -04:00
ata-imx31.c Commit to certain names for cache coherency APIs and discard the aliases. 2011-12-17 07:27:24 +00:00
ata-target.h Unify storage threads into one 2017-10-26 14:35:41 -04:00
avic-imx31.c i.MX31: Simplify nested interrupt handling. Give SVC mode its own stack by grabbing the FIQ stack that's just been taking up space. Just get rid of all FIQ setup since it isn't used anyway. 2011-10-14 00:01:41 +00:00
avic-imx31.h i.MX31: Remove long udelay from DVFS interrupt handler 2013-05-11 21:09:01 -04:00
boot.lds Do some things to make -ffunction-sections work better. 2011-12-17 01:43:32 +00:00
ccm-imx31.c Remove atomic register bit manipulation functions from i.MX and s3c target code and introduce generic functions for ARM (bitmod32, bitset32, and bitclr32). Multiprocessor support is possible but just not implemented at the moment, only interrupt lockout. 2010-06-30 02:02:46 +00:00
ccm-imx31.h i.MX31/Gigabeat S: Implement frequency and voltage scaling-- 1.6V for 528MHz, and 1.35V for 264MHz and 132MHz. Keep DPTC overdrive ( > 400MHz) voltage scaling off for now because of uncertainties. Simplify the (working) mess later. 2010-04-23 15:32:50 +00:00
crt0.S arm: factor all exception handlers out of the crt0.S files 2012-04-06 13:46:32 +02:00
debug-imx31.c i.MX31: Restore screen clearing in DVFS/DPTC debug screen 2017-01-29 19:53:49 -05:00
dvfs_dptc-imx31.c i.MX31: Remove long udelay from DVFS interrupt handler 2013-05-11 21:09:01 -04:00
dvfs_dptc-imx31.h i.MX31: Now that it matters because there's a debug screeen that allows changing things while running, some DVFS/DPTC stuff has to be done more carefully. Trim out some stuff and group functions better as well. 2011-01-23 20:21:35 +00:00
gpio-imx31.c Improve imx31 interrupt code for PMIC and GPIO 2017-01-29 19:07:55 -05:00
gpio-imx31.h Improve imx31 interrupt code for PMIC and GPIO 2017-01-29 19:07:55 -05:00
i2c-imx31.c i.MX31: Implement asynchronous version of I2C driver. 2011-12-29 05:15:36 +00:00
i2c-imx31.h Fix more reds. 2014-03-03 20:26:08 +01:00
iomuxc-imx31.c Remove atomic register bit manipulation functions from i.MX and s3c target code and introduce generic functions for ARM (bitmod32, bitset32, and bitclr32). Multiprocessor support is possible but just not implemented at the moment, only interrupt lockout. 2010-06-30 02:02:46 +00:00
iomuxc-imx31.h i.MX31: Add some enums and a couple helper functions to make dealing with pin muxing and pad configuration a bit more sane. Convert any existing code which changes mux/pad settings to use helpers. 2010-04-23 13:46:04 +00:00
mc13783-imx31.c Improve imx31 interrupt code for PMIC and GPIO 2017-01-29 19:07:55 -05:00
mmu-imx31.c Gigabeat S/i.MX31: Sort files in the /target tree into things that are SoC-generic (into /imx31) and player-specific (into /gigabeat-s, based upon current appearances). Move i2s clock init into the appropriate file. Housekeeping only-- no functional changes. 2010-04-09 01:21:53 +00:00
mmu-imx31.h Gigabeat S/i.MX31: Sort files in the /target tree into things that are SoC-generic (into /imx31) and player-specific (into /gigabeat-s, based upon current appearances). Move i2s clock init into the appropriate file. Housekeeping only-- no functional changes. 2010-04-09 01:21:53 +00:00
rolo_restart_firmware.S Fix assembler .size directives. Currently used binutils don't complain, but 2.21.1 treats these as errors. 2011-11-09 19:20:33 +00:00
sdma-imx31.c Commit to certain names for cache coherency APIs and discard the aliases. 2011-12-17 07:27:24 +00:00
sdma-imx31.h Gigabeat S: Implement MDMA and UDMA disk access for bootloader and main binary. Add a needed SDMA API to check channel errors. Increase audio DMA channels' priority as required. Reads and writes measure faster accross all test_disk tests and especially at 4KB and 1MB. 2009-03-12 06:31:40 +00:00
sdma_script_code.h Some static data is only used by .init functions. Add .initdata to declare such data (otherwise section conflicts arise). For i.MX31, use INITDATA_ATTR in the appropriate places. 2011-01-08 20:42:51 +00:00
sdma_struct.h Fix tabs 2010-01-03 10:19:43 +00:00
serial-imx31.h Gigabeat S/i.MX31: Sort files in the /target tree into things that are SoC-generic (into /imx31) and player-specific (into /gigabeat-s, based upon current appearances). Move i2s clock init into the appropriate file. Housekeeping only-- no functional changes. 2010-04-09 01:21:53 +00:00
spi-imx31.c i.MX31: Some tweaks with variable declaration in SPI driver. 2011-12-29 04:22:20 +00:00
spi-imx31.h i.MX31: Rename something 2011-12-26 15:43:11 +00:00
uart-imx31.c Split off target-specific parts from firmware/drivers/serial.c 2011-04-23 08:23:07 +00:00