riscv: cache: Flush L2 cache before jump to linux
authorRick Chen <rick@andestech.com>
Wed, 28 Aug 2019 10:46:09 +0000 (18:46 +0800)
committerAndes <uboot@andestech.com>
Tue, 3 Sep 2019 01:31:03 +0000 (09:31 +0800)
commit7045ed9f1ad9bb2b8d19f3b5d39d7e1be8da36a6
tree0a7d13eefc015724d2bc1c482686ada4e54ee691
parenta8323d1816c978c012ea2fbbc844f0cbd5c82bdc
riscv: cache: Flush L2 cache before jump to linux

Flush and disable L2 cache in dcache_disable()
which will be called in cleanup_before_linux()
before jump to linux.

The sequence will be preferred as below:
L1 flush -> L1 disable -> L2 flush -> L2 disable

Signed-off-by: Rick Chen <rick@andestech.com>
Cc: KC Lin <kclin@andestech.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/riscv/cpu/ax25/cache.c