This driver will subsume the old button-lradc driver and support far more
options. It can sense LRADC channels, PSWITCH, GPIOs and it handles special
"buttons" like headphone insertion and hold detection. It also provides a
more natural description of the buttons using a target-defined table with some
macros to make it easy to read and write. It uniformely handles debouncing on
LRADC channels and PSWITCH.
Change-Id: Ie61d1f593fdcf3bd456ba1d53a1fd784286834ce
On some OSes like Windows or if running in a virtual machine, the one second
timeout might be too short.
Change-Id: I717f7a2aaed1cb3d40e8fbe6f9b1081b43ceea95
Original fix by Marcin: it had a problem because crt0 on imx233 is more
complicated than many targets: since we use virtual memory, we first disable
the MMU, then move the entire image (including init and itext stuff), then
setup a temporary stack to setup the MMU. Only when the MMU is enabled, can
we move the init and itext stuff to its right location and finally boot.
This requires some trickery because:
- the initial move copies everything, including init and itext
- the stack overlaps with init and itext to reclaim space
- the temporary stack cannot be the same as the main stack to avoid trashing
the init and itext code, also it needs to be a physical address
Change-Id: Ibaf331c7d90b61f99225d93c9e621eb0f3f8f2dc
Rework the irq code, to put more code in the C part. When interrupt
nesting is enable, Rockbox gets pretty unstable so disable it for now.
Change-Id: Iee18b539c80ea408273f6082975faaa87d3ee1b6
Plugins/Applications/main_menu_config allows you to edit the
main menu order without having to manually edit config.cfg.
Press the standard OK button to access the internal menu
which allows you to move items up/down in the order and toggle
their visibility. Exit via this menu to have the order saved.
(Suggestions welcome to improve this UI)
Change-Id: I59715ef1ca265aeb6f9666ef27026bc1093f2579
The UI now has a "read-only" check box to prevent accidently changes: once
unchecked, the UI can do write to register (only full register writes are
supported for now). If the register supports it, the UI provides SCT writes
as well. The display register panel was moved to its own class to cleanup
things a bit.
Change-Id: I0fc6aab3b351f9080076102ee6fad0037ab5353b
Unfortunately the hardware is not very helpful when changing voltage: in DCDC
mode we have the DC_OK_IRQ but in linear regulator mode, the only available
bit doesn't work when lowering the voltages. At the moment, simply sleep for a
little while before a better solution is found.
Change-Id: I89335873e9e42e5c6e9131f40db7839b008c021c
On the ZEN, the LCD is fed continuously by the DMA and this refresh needs to
be stop when the bootloader gives control to the firmware, otherwise the DMA
will source data from invalid region and it might even lock-up if the new
code touches the memory setup. Work around this by properly stopping the LCD
driver: the bootloader assumes that if the target defines HAVE_LCD_ENABLE
in bootloader build (which is unusual) then it needs to stop the LCD. Since
stopping the LCD could produce funny screens, power down backlight
which is expected to power down the LCD too, giving a nice black screen
instead of some random pixels.
Change-Id: I7ce5ba9bfd08e596907c4ff8f80feb189f0576ce
The old could trigger an immediate IRQ if for example the count was 0
when setting up the timer: since the count was updared *after* clearing the
IRQ, it could fire in between.
Change-Id: I0357b201655bc0e56425ffb249ca807525f30217
The code was a mess with respect to soc handling: some code just plain copied
the SoC descriptor which are big objects, some was using indexes. The new soc
factor out everything in a few classes which hide these ugly details so that
descriptors are never copied.
Change-Id: I17af8b47f997a528b58221621389d42d24fded93
A SoC descriptor is not a small object: it can be as large as ~100KiB so
it's better to avoid copying things over.
Change-Id: I1ef862e1260299cdaa0c4d2822ac45968713498a
zenxfi2: add support for internal storage on the SD version
The code can now skip devices marked as PROBE if they fail to init, thus
making it possible to handle various kinds of internal storages. The current
code probably doesn't interplay nicely since it acquires pins and never
release them so it will probably break NAND code when it's ready but NAND code
is not ready yet anyway.
Change-Id: I4cb962de4215661e521743a3f511445dbbf28673
The current code does hazardous tweaks to the power subsystem: indeed if one
boots with USB plugged and some stub powers on the DCDC switch, it will fail.
Indeed, a hardware bug prevents from going back to linear regulators (see
errata) so we cannot expect to reach a known state (linreg on, dcdc off)
on each configuration and in particular, powering down the 4p2 rail in
such a configuration will result in a power brownout.
This commit works around this issue by not touching the initial power
configuration until USB is (un)plugged, which are the best spots to get
known states.
Change-Id: I8741a3995df8ae61ca1c887a3ecb7903d0ac5136