From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andes Date: Tue, 28 May 2019 17:39:12 +0800 Subject: [U-Boot] [PATCH 4/6] riscv: cache: Flush L2 cache before jump to linux In-Reply-To: <20190528093914.4672-1-uboot@andestech.com> References: <20190528093914.4672-1-uboot@andestech.com> Message-ID: <20190528093914.4672-5-uboot@andestech.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Rick Chen Flush and disable cache in cleanup_before_linux() which will be called before jump to linux. The sequence will be preferred as below: L1 flush -> L1 disable -> L2 flush -> L2 disable Signed-off-by: Rick Chen Cc: Greentime Hu --- arch/riscv/cpu/ax25/cpu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/riscv/cpu/ax25/cpu.c b/arch/riscv/cpu/ax25/cpu.c index 76689b2..9e7579a 100644 --- a/arch/riscv/cpu/ax25/cpu.c +++ b/arch/riscv/cpu/ax25/cpu.c @@ -7,6 +7,7 @@ /* CPU specific code */ #include #include +#include /* * cleanup_before_linux() is called just before we call linux @@ -22,6 +23,9 @@ int cleanup_before_linux(void) cache_flush(); icache_disable(); dcache_disable(); +#ifdef CONFIG_RISCV_NDS_CACHE + v5l2_disable(); +#endif return 0; } -- 2.7.4