The current code was spreaded over power and powermgmt which made
it behave strangely, especially since there are relationships
between power management and frequency scaling. The new code makes
sure power management is initialised before frequency scaling
starts. It also makes sure to start from a known state, thus
fixing potential issue when the bootloader stops in a trickle
state where DCDC is improperly configured.
Change-Id: Ibded2e590e108f6c98daa52d2cf1bd28763c8923
Implement the switch function as specified by the specification,
that is wait for the response AND transfer 64 bytes of data. This
fixes some issue when the SD card take a long time to switch. In
particular waiting 100ms (max per spec) will not work if no data
is transfered in some cases.
Change-Id: Ia22350468018b842e57ce6f6c1a8d676eba97fb8
This adds the application part of alarm wake up. On some targets
like the Fuze+, it will also require a bootloader change to make
sure that the device doesn't power down on alarm wake up (for
example on the Fuze+ the bootloader requires the power button to
be hold sufficiently long, thus preventing alarm wake up to work)
Change-Id: I5d01957852355fddbd48110d3d75a5533f07879e
On the ZEN X-Fi2, the fractiona dividers are gated by the
bootloader and must be ungated before switching emi to pll.
Change-Id: I5df57ed5581054883da4cbb3b4f3ce3539391ab5
The idea is to share loading code between bootloaders and rolo().
Change-Id: I1656ed91946d7a05cb7c9fa7a16793c3c862a5cd
Reviewed-on: http://gerrit.rockbox.org/190
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Currently we don't know where the serial number is stored on the
stmp3600. It is probably using the laser fuses but this needs to
be investigated
Change-Id: I1ac25e38b8f65635abb68788ceb65df0a740dabd
The STMP3600 cannot lock some usb bits so there is only a single
status in POWER_STS. Also stmp3600 has no clock bypass and frac
div.
Change-Id: I101f4263bdddeff58e142d10f9b76dd643bf928d
This driver does debouncing and best lradc usage and only requires
a sorted table of values to work, this factoring code as much as
possible.
Change-Id: I84b46f4b08094634e1c5deb5ca9ba20763389e66
The driver is current unused and very minimal. It can used on
targets which have an accessible UART port and it will be used on
some creative targets as backlight control.
Change-Id: Id710d63574aadb0a2d7327b03187506b469470b1
Although everything is implemented, recording still doesn't work,
dma is stuck. Add code for reference until this get a proper fix.
Change-Id: Ifc016b00876230c6d337a5cd4f8bb90b856efac8
The old driver didn't behave nicely because it waiting for
stability which could never arrive on some gestures. The new one
uses a fixed delay and averaging.
Change-Id: I8ff80f373b6792e6d5fc3cfe41b709642e61c38b
The lcd data line were not setup as input anymore, making register
reading plain broken and probably lead to bad lcd detection.
Change-Id: I281460f845537c58045f3893261ded5c9c6e53b5
Power management is somewhat different on stmp3700 which doesn't
have the 4.2V rail and completely different on stmp3600 which has
several DCDC. Currently only handle imx233.
Change-Id: Ic7815141286117b74022ffc53cfa48664fd7faac
Using the ssp macros, we can easily handle the stmp3600 which
has a single ssp block. Take care of all the nasty differences
between targets like bus width
Change-Id: If98a091cc262e9e6834f6fb9826f7c5515bfe621
Currently don't do anything on stmp3600 because emi is completely
different. On stmp3700 it is unsure how the pll lock is handled
and this will need more testing.
Change-Id: I3d11282531f54f2ecc4187c0d913e2c61f4de14d
Add finer granularity to start command: now commands can be
prepared, schedule and semaphore increased independently.
Change-Id: Ib1ed1f20f4b46dc61b6dbab6ddec8b54e3d832b9
Factorise pin setup, rewrite PIO code, add support for lcdif irq,
handle all the various differences between the stmps, drop yuv
blitting code since it already exists in the common lcd drivers.
Change-Id: Ifc40aed9b3b12f16611ce960602e46a5bc87ae53
The lradc architecture of the stmp3600 is rather different:
only channels 6 and 7 have configurable source and we need to
take care when allocating channels so that we can actually
measure the right channel! Delegate die temperature sensing to
the power block on stmp3600.
Change-Id: I0860eb4ea98240facc3d4a19d61684eca5f630cc
There are many small differences between them. In particular
some regulators are not available on stmp3600. Also the vbusvalid
detect method is not available as an irq on stmp3600 and seems
broken on stmp3700. Finally die temperature is handled by the
power block on stmp3600.
Change-Id: I2c68b418738f15564e445d3a1496018cef97fff7
Under some circumstance (timeout), the dma interrupt is not fired
and only the error one is. This can happen with some picky SD
cards and with the current code it causes a 1 second timeout.
This code properly catches the error interrupt to stop as soon
as possible.
Change-Id: I9c53ea272d01793f0f229571502e99eb62f1b723
The current pwm interface is too low-level. Introduce a higher
level setup function which directly computes the parameters from
the required frequency.
Change-Id: Ie95c7522e9f42492fe872203f4cab46770a9649a
The clkctrl functions were becoming a mess. Normalise the names,
get rid of the xtal derived as special case and use the same
interface.
Change-Id: Ib954a8d30a6bd691914b5e0d97774ec9fc560c50
A number of pins on the imx233 are standard and manually calling
functions to acquire, set function/drive/output is painful. This
will become unmanageable when we will add support for the other
stmp chips.
Introduce the concept of virtual pin which is a way to completely
describe a virtual pin (virtual because pins are muxed).
Change-Id: I01b6e040945648e58e1d1abab06529c9571c5f10
The current pinctrl functions were a mess. Normalise the functions
names to make them shorter and clearer.
Change-Id: Iac6ff84625ef2b7610268e3a5802dc0088de3167