summaryrefslogtreecommitdiff
path: root/arch/mips/lib
diff options
context:
space:
mode:
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2020-07-12 01:45:56 +0300
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2020-07-18 15:23:25 +0300
commit60772433dd42987f3b965188d9577150084b8956 (patch)
treec170a4737477d2b296d802438444e724dafe9ece /arch/mips/lib
parentb55e07e5656c6838a14453705e90189908ad7d92 (diff)
downloadu-boot-60772433dd42987f3b965188d9577150084b8956.tar.xz
mips: refactor disabling of caches
Logically this code belongs to cache_init.S. If a complex SoC needs to replace the generic cache init, mips_cache_disable() can now be called from custom start.S files. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/mips/lib')
-rw-r--r--arch/mips/lib/cache_init.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/mips/lib/cache_init.S b/arch/mips/lib/cache_init.S
index 2233d27137..602741c65d 100644
--- a/arch/mips/lib/cache_init.S
+++ b/arch/mips/lib/cache_init.S
@@ -418,6 +418,12 @@ return:
jr R_RETURN
END(mips_cache_reset)
+LEAF(mips_cache_disable)
+ move R_RETURN, ra
+ change_k0_cca_kseg1 CONF_CM_UNCACHED
+ jr R_RETURN
+ END(mips_cache_disable)
+
LEAF(change_k0_cca)
mfc0 t0, CP0_CONFIG
#if __mips_isa_rev >= 2