Commit graph

3956 commits

Author SHA1 Message Date
Amaury Pouly
f7132e4044 Fix copyright headers
Change-Id: Ie65920b1192e9b737fcc2554d280fbcedfa39800
2012-12-29 01:40:35 +01:00
Andrew Ryabinin
97250a0156 hm60x/hm801: Add hold button support.
Change-Id: I05557ecfbf0bd821d8966862a38f7f22656b36ef
2012-12-29 00:19:23 +04:00
Amaury Pouly
8ecbcad3d1 imx233: use tick insteaf of msec to collect statistics
The current code uses the msec irq to collect statistics and
detect irq storms (debug). But this irq is triggered 1000 times
per sec and we don't need that accuracy. This commit removes the
msec irq and use the tick timer instead which is triggered only
100 times per second.

Change-Id: If14b9503c89a3af370ef322678f10e35fafb4b8a
2012-12-26 21:26:33 +01:00
Amaury Pouly
c96f580d63 fuze+: fix bootloader build
Change-Id: Ibe221d0f94ec4234ce1459073ba9ae77f6de162f
2012-12-26 02:50:41 +01:00
Amaury Pouly
d9177c4c65 fuze+: implement lcd flip and invert
Change-Id: I1efcd0c6aa5e586b64c1b48d401648c7a933c4d9
2012-12-26 02:41:41 +01:00
Amaury Pouly
38878020d2 fuze+: make sure lcd is ready before chaning a register
The lcd driver does not wait for the refresh to be done to return
from lcd_update(). This means that changing a register is unsafe
if done in the middle of the redraw. This could happen when
disabling the lcd for example. Make sure it doesn't happen by
waiting for the lcdif to be ready.

Change-Id: I43ec62a637dd61c3b2a3a6e131c1a9e8035524b1
2012-12-26 02:39:39 +01:00
Amaury Pouly
7fddc2327b fuze+: add lcd debug screen (display kind)
Change-Id: I08ffcfb8e4cf516aae1c23740eedf80d2cfcea41
2012-12-26 02:38:56 +01:00
Amaury Pouly
09e6b890e6 imx233: rework cpu frequency scaling
When changing the cpu frequency, it is important to make sure that
HBUS stays at a reasonable frequency otherwise the chip will
crash. Special care is needed about auto-slow and clk_p/clk_h
ratio on intermediate steps.

Change-Id: Ief9f68ddf286caabe75c879718dac5027ab1560f
2012-12-26 01:17:28 +01:00
Amaury Pouly
e2da3f47d3 imx233: fix regulator voltage setting + always enable DCDC mode
Make sure DCDC is running at boot (it is disabled by default when
5V is present and we don't want to rely on the bootloader to
change this).
When changing the voltage on a regulator, it usually takes 2ms for
the voltage to stabilize. In DCDC mode, there is an irq to notify
about the event so use it ! This is especially important when
changing cpu frequency because increasing the cpu freq while the
voltage is rising is unreliable.

Change-Id: Icfe9ef3ee90156d1e17da0820d9041859f7f3bca
2012-12-26 01:17:28 +01:00
Amaury Pouly
ca83b558df imx233: fix potential hbus dividor settings + doc
HBUS uses the same field for integer and fractional dividers, the
choice is made by a bit. Make sure both are changed together,
otherwise this could result in the wrong divider to be used and in
HBUS freq to be too low or too high (very bad).

Change-Id: I253d8eeee26c5038868b729c4f791511295a39f0
2012-12-26 01:17:28 +01:00
Amaury Pouly
e3f45226bd imx233: simplify sdmmc led handling, fix typo
Change-Id: Iffbb05afd41bd0accfac9c127ea3a26fd33f1387
2012-12-16 21:28:41 +01:00
Marcin Bukat
dac6dbc013 rk27xx: Add status led (icon) support to SD driver
Change-Id: I47a36c0cf7319c2b100b813fdcbea024c7ae0b0a
2012-12-16 12:14:44 +01:00
Marcin Bukat
e1ea08417b rk27xx: introduce meaningfull constants in usb driver
Based on pamaury's work. No (un)functional change yet.

Change-Id: I7fe76c1da20d87d6c92eb3792e3d352877d423d7
2012-12-04 09:18:12 +01:00
Amaury Pouly
d119fb1fc5 imx233: try to improve audio quality
Change-Id: Idaee93fae8d407e5968f8571c54957b7b87da3bb
2012-12-02 11:51:51 +01:00
Marcin Bukat
33b7ade67f rk27xx: use generic fallback of lcd_blit_yuv()
Change-Id: I4d6834c8caa9037938d6291041f14cf9d2888e2b
2012-11-26 09:33:53 +01:00
Michael Giacomelli
0b0d3ee650 Fix building the iPod 6G UI sim by reusing the iPod Video bitmap.
Ideally someone will go through and make a graphic for the 6G, but as it looks nearly identical to the Video its not a huge deal.

Change-Id: If507c6d4f01eb0b1e5fc2f15f6a0e5a3195006c6
2012-11-25 22:54:06 +01:00
Amaury Pouly
5ead8f3f44 imx233: hopefully fix audio pop on startup
Change-Id: I6410c0e11acc02ec996461153b4737f416f8cbee
2012-11-13 18:25:00 +01:00
Marcin Bukat
b35f82c91f HD300: Fix crash in bootloader introduced by 36281c4
Uninitialized struct scroll which is used to pass state between
scrollstrip ISR and button_read_device() can bomb out whole
button subsytem.

Change-Id: I3b415c22cfee4181b2132cddaeff68797c7cc0ea
2012-11-13 13:36:23 +01:00
Rafaël Carré
5ce81fde37 AMS: make sure ROM clock is always on
Change-Id: Ib73b21b944cb609cc26f7f6955d2c894628f65ad
2012-11-12 21:52:55 +01:00
Andrew Ryabinin
b19b250de7 rk27xx: Disable interrupts before invalidating cache.
If interrupts trigger during cache invalidation this could cause memory
corruption. This should be right fix for commit_discard_idcache in
contrast to 72ebcbf and c1ec1ec.

Change-Id: I141fb585004d4a1967b0a03bc37db3964d886564
Reviewed-on: http://gerrit.rockbox.org/345
Tested-by: Andrew Ryabinin <ryabinin.a.a@gmail.com>
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
2012-10-31 09:30:10 +01:00
Andrew Ryabinin
c1ec1ec899 rk27xx: Disable cache while invalidating it.
It seems something wrong with cache handling in rk27xx. OF always disable cache
before invalidating cache ways, therefore, now we do the same.
Hopefully this will fix cache handling, but I couldn't contend that it's really so.

Change-Id: I967c18211f0ddff689b6a17579fbe8685277f132
2012-10-25 14:48:21 +04:00
Marcin Bukat
5dec7af1ec Revert "SH gcc 4.6.3 with link-time optimization, for Archos targets"
This was commited by accident, sorry.
2012-10-24 14:05:39 +02:00
Boris Gjenero
c975de1534 SH gcc 4.6.3 with link-time optimization, for Archos targets
This is work from FS#12431 synced to current HEAD and slightly
tweaked (gcc 4.6.2 -> 4.6.3, binutils 2.21.1 -> 2.22)

Change-Id: I76af91e80ac2a9c16a776c7f0a33cc51603bbf9b
2012-10-24 14:02:41 +02:00
Amaury Pouly
709827b5ea imx233: fix user timer
The running count is only 16-bit wide, since the always tick
setting derives from the crystal clock at 24MHz the user timer
cannot be set lower than ~300Hz which is already too high.
Switch to the 32KHz crystal source to fix this.

Change-Id: Ie7775460b17ea7ab331738734e3d688ad5563857
2012-10-21 14:45:09 +02:00
Andrew Ryabinin
04fb4b77ac hm801: Implement additional button driver.
Several HM-801 DAPs have another buttons circuit.
This patch adds support for such devices so they could work properly.

Change-Id: Ic49e8e46b3e785b91c7c4706003fac3dbc20ae59
2012-10-18 14:10:02 +04:00
Amaury Pouly
be6da12c09 imx233: add more ocotp registers to debug screen
Change-Id: I327ddd5506598c80263424d85afa84cd3c9acfeb
2012-10-11 13:58:10 +02:00
Amaury Pouly
e3e53c965a imx233/fuze+: add status led(icon) support to sd/mmc storage layer
Change-Id: I9c0e1ecd04d1935825606e906e6a434a3afb2175
2012-10-10 17:54:33 +02:00
Lorenzo Miori
d2875fc773 This patch adds RDS capability to Samsung YP-R0 target.
Uses register polling method to decide when it's time to decode
RDS packets.

Change-Id: I1d3cc995ea3350ec7b101438b8f2027130d4a4c9
Reviewed-on: http://gerrit.rockbox.org/320
Reviewed-by: Lorenzo Miori <memorys60@gmail.com>
Tested-by: Lorenzo Miori <memorys60@gmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Tested-by: Thomas Martitz <kugel@rockbox.org>
2012-10-06 23:00:36 +02:00
Andrew Ryabinin
548dcc3c6a hm60x/hm801: Fix blinking white screen.
Change-Id: Ia435616872d5d4adb117d507bdb135bccf083b05
2012-09-27 22:00:58 +04:00
Andrew Ryabinin
82d882e1e2 Fix type cast for LCD_BUFF.
We should cast to (volatile uint32_t*) here, because attempt to refer to volatile
object through use of an lvalue with non-volatile-qualified type will result in
undefined behavior.

Change-Id: I1b2e9688af11d3dcba518a5e31865d703b54b635
2012-09-27 14:26:47 +04:00
Andrew Ryabinin
84134f737f rk27xx lcd code rework
Use DMA engine for fullscreen updates and bypass mode for partial
updates. This gives major boost on rk27generic:
default ARM:AHB:APB 200💯50
HEAD    1/1:  26.3fps 1/4: 105.0fps
patched 1/1: 116.5fps 1/4: 249.5fps

with freq scalling NORMAL mode ARM:AHB:APB 50:50:50
HEAD    1/1:  13.1fps 1/4: 52.5fps
patched 1/1:  54.5fps 1/4: 119.0fps

Tested on rk27generic noname DAP and on Hifimans.

Change-Id: Id9dd4d2d61542c7ea6b5c6336b170d6357cefde9
2012-09-27 09:42:44 +02:00
Marcin Bukat
72ebcbf73b rk27xx: Fix commit_discard_idcache()
This version resembles how OF handle cache invalidates.
This seems to fix mysterious data aborts on plugin/codec loading
after introducing frequency scaling.

Credit goes to mortalis for pinpointing the reason of aborts.

Change-Id: I3477b3f65d593d7b43c36a0b06d863f71f000812
2012-09-19 20:44:36 +02:00
Amaury Pouly
49cded1704 imx233: properly disable frequency scaling for now
Change-Id: I3d700762a7f46e82ac99fed03e1aa9448b6cba47
2012-09-04 20:25:46 +02:00
Marcin Bukat
072badeafb rk27xx: Put some nand handling functions for reference
The functions document my reverse engineer findings about nand
controller. This code is commented out and is purely for reference
as FTL scheme is still unknown.

Change-Id: I70edeb4bfb0cbd51b6adc15afa7193dd8f71e8da
2012-09-04 09:48:48 +02:00
Amaury Pouly
a1b101b107 imx233: disable cpu frequency scaling
Frequency scaling seems to be unstable and causes the device to
freeze. It is unclear why at the moment, perhaps we need to ramp
up the vddd voltage to avoid a false brownout ?

Change-Id: I7aaea9d7c213922a65250fe50775fb785d430226
2012-09-04 00:35:58 +02:00
Amaury Pouly
c8e7964e81 imx233: more consistent debug screen
Change-Id: Ia6a869ec22734f95af2b453e01471b0656b7a273
2012-08-31 23:32:16 +02:00
Amaury Pouly
3a1ba755c6 imx233: fix auto slow divisor
The divisor must be set only when auto-slow is disabled.

Change-Id: I31ed94f43a7c9deb80275dc73f8e3c78463b54c0
2012-08-31 01:24:51 +02:00
Amaury Pouly
ee21359437 fix comment
Change-Id: I3a20b30e5707e98ffd5dfe3d0f267c5b2d4e7753
2012-08-31 01:06:57 +02:00
Amaury Pouly
4faaca13ca fuze+: use safer battery shutoff and dangerous levels
Change-Id: I68258828afd3021bab2067e5af0a5dcd2d44de04
2012-08-31 00:56:55 +02:00
Amaury Pouly
d6732a1a9b fix comment
Change-Id: I9eaa21ecfafda9679b4aa1a3d15fa7a550b48876
2012-08-30 23:13:35 +02:00
Amaury Pouly
8723132aaa fix red
Change-Id: I1ee070291d70b2e30ac2096aa8b3b89e6fcdeff1
2012-08-30 21:17:34 +02:00
Amaury Pouly
16dc22f2be fix red
Change-Id: I6bc5fd019160b05f48c9a65639e1025899651f1e
2012-08-30 21:13:28 +02:00
Amaury Pouly
13912fa1de imx233: fix clktrl auto slow function
Change-Id: I6c004836562b0605530ac334434b17afa89ebad5
2012-08-30 20:57:42 +02:00
Amaury Pouly
c9ad8688f1 imx233: implement basic frequency scaling and enable auto-slow
This does not scale the EMI frequency and keep the processor
betweel 261MHz and 454MHz. It can still be improve. The auto-slow
divisor could still be change, 8 seems reasonable for now

Change-Id: I639bb3f6b7f8efedc7dc58d08127849156eeb1b6
2012-08-30 20:56:39 +02:00
Amaury Pouly
6c2190ea04 fuze+: battery calibration
Change-Id: Iaaca5caa35b9624d8dd9ea14eabde24c5667e892
2012-08-30 20:40:13 +02:00
Amaury Pouly
7ff78c4ccb imx233: fix compilation of sdmmc for non-mmc targets
Change-Id: I0f61d0ca8e385fbfeaba53b81c3320b24aa61ab9
2012-08-30 17:28:13 +02:00
Marcin Bukat
722e24a76a rk27xx: implement frequency scalling
Implemented scheme:
        ARM AHB APB
Normal   50  50  50 MHz
Max     200 100  50 MHz

Frequency scaling is disabled on rk27generic due to too
slow lcd updates when running with 50MHz AHB.

battery_bench shows ~1h runtime improvement on hifiman.

Change-Id: I2c6f8acf6d4570c4e14f5bcc72280b51ce13c408
2012-08-30 13:50:36 +02:00
Amaury Pouly
417da66bb3 fix yellow
Change-Id: I798826c8240fa9ce5a87cb0443002ca1b8882922
2012-08-30 01:16:45 +02:00
Amaury Pouly
7ee1e30609 imx233: add regulator api
Remove the old debug stuff about VDDx and add a clean api to
get/set the regulator (VDDD, VDDA, VDDIO, VDDMEM). This is useful
for proper frequency scaling.

Change-Id: Ia5a1a712fd66652a8ad9601ed00db31aba5a7561
2012-08-30 01:10:36 +02:00
Amaury Pouly
51f63f0b2a imx233: fix header, add emi function
Change-Id: I1030e94f0dad4b66646cafa20b61df8a5c7f9278
2012-08-30 01:10:36 +02:00