Commit graph

20 commits

Author SHA1 Message Date
Marcin Bukat
490db740a1 rk27xx: avoid one multiply in udelay() as pointed by kugel
Change-Id: Ie33a393b0d4c4b45975ca53ced91dd9f03369db1
2013-04-12 10:08:45 +02:00
Marcin Bukat
3c802a95ed rk27xx: make udelay() more accurate
Change-Id: Ic448c4e5ec52af6aaeebccee4feea49954394677
2013-04-12 09:27:41 +02:00
Marcin Bukat
c66a66728c rk27xx: do not disable irq in commit_discard_dcache_range()
commit_discard_dcache_range() is used in sd, lcd and pcm drivers
to handle transfers form/to data buffers so this should not introduce
any problems. It is reported to fix pop noise observed on some hifimans.
We apparently don't fully understand cache handling on this platform.

Change-Id: I436d291509f91d16a13d10965a28171fb27574ab
2013-02-12 08:48:43 +01:00
Marcin Bukat
29e51a1777 rk27xx: slightly optimize commit_discard_dcache_range()
Change-Id: I13ce643d4ba26db5de9ffa083070d7f40b0e7b1f
2013-01-12 21:57:37 +01:00
Marcin Bukat
2ef7a549d5 rk27xx: optimize irq_handler()
Change-Id: Idd3141e57b70e9b28b91748bc71208d9afffcd57
Reviewed-on: http://gerrit.rockbox.org/381
Reviewed-by: Marcin Bukat <marcin.bukat@gmail.com>
Tested-by: Marcin Bukat <marcin.bukat@gmail.com>
2013-01-11 15:41:11 +01:00
Marcin Bukat
2b6dfdb34e rk27xx: substitute magic constants with meaningful names for clock gating
Change-Id: I6c66c7496db3db78e5c959414464826134dbe200
2013-01-10 20:23:41 +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
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
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
Marcin Bukat
80ec94c497 rk27xx: implement system_exception_wait()
Change-Id: If55cfdf7ef91e732ac0aae6ad9fde24b8918e1b8
2012-07-11 00:27:13 +02:00
Marcin Bukat
fa5d22584a rk27xx: disable watchdog on startup
Some versions of nand loader enable watchdog which resets
player just after reaching main menu.

Change-Id: Ia008bccb40570ab102c0558cd2768f125ae826d7
2012-07-09 22:43:34 +02:00
Marcin Bukat
2bafdae6b1 rk27xx: Do not turn off clocks in bootloader as this breaks OF loading
Change-Id: I8e2fb06e82f33c3cf841a125c13e56401c58b12d
2012-04-27 16:19:42 +02:00
Marcin Bukat
5513c6db56 rk27xx: implement system_init()
For now it contains explicit SDRAM setup, cutting clock for unused
modules and turning off unused PLLs. This improves slightly mem
throughput as well as saves quite a bit of power.

Change-Id: I19a2827ac90a6868856c676fbe1e051c42f0d608
2012-03-22 23:48:31 +01:00
Andrew Ryabinin
40786042df rk27xx: Fix cache broken in r31339. Remove deprecated aliases.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31537 a1c6a512-1295-4272-9138-f99709370657
2012-01-03 15:01:16 +00:00
Michael Sevakis
6a67707b5e Commit to certain names for cache coherency APIs and discard the aliases.
Wouldn't surprise me a bit to get some non-green.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31339 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 07:27:24 +00:00
Marcin Bukat
6d959a0625 rk27xx - implement cache handling functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30451 a1c6a512-1295-4272-9138-f99709370657
2011-09-06 12:39:06 +00:00
Marcin Bukat
5d9b230168 rk27xx - implement cache_commit_discard(). Cache is still not enabled in crt0.S
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30167 a1c6a512-1295-4272-9138-f99709370657
2011-07-19 06:49:03 +00:00
Marcin Bukat
f1c7fba5a4 rk27xx - add missing interrupt source
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30166 a1c6a512-1295-4272-9138-f99709370657
2011-07-18 22:30:53 +00:00
Marcin Bukat
976a1699da Rockchip rk27xx port initial commit. This is still work in progress.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29935 a1c6a512-1295-4272-9138-f99709370657
2011-05-30 21:10:37 +00:00