Skip to content
Snippets Groups Projects
Commit 5730360e authored by Stefan Roese's avatar Stefan Roese Committed by Luka Perkov
Browse files

arm: mvebu: Disable L2 cache before enabling d-cache


L2 cache may still be enabled by the BootROM. We need to first disable
it before enabling d-cache support.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
Tested-by: default avatarKevin Smith <kevin.smith@elecsyscorp.com>
parent a0aad123
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
#include <common.h>
#include <netdev.h>
#include <asm/io.h>
#include <asm/pl310.h>
#include <asm/arch/cpu.h>
#include <asm/arch/soc.h>
......@@ -240,6 +241,13 @@ int cpu_eth_init(bd_t *bis)
#ifndef CONFIG_SYS_DCACHE_OFF
void enable_caches(void)
{
struct pl310_regs *const pl310 =
(struct pl310_regs *)CONFIG_SYS_PL310_BASE;
/* First disable L2 cache - may still be enable from BootROM */
if (mvebu_soc_family() == MVEBU_SOC_A38X)
clrbits_le32(&pl310->pl310_ctrl, L2X0_CTRL_EN);
/* Avoid problem with e.g. neta ethernet driver */
invalidate_dcache_all();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment