xref: /openbmc/u-boot/arch/arm/mach-kirkwood/cache.c (revision 83d290c56fab2d38cd1ab4c4cc7099559c1d5046)
1*83d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+
256f86e39SMasahiro Yamada /*
356f86e39SMasahiro Yamada  * Copyright (c) 2012 Michael Walle
456f86e39SMasahiro Yamada  * Michael Walle <michael@walle.cc>
556f86e39SMasahiro Yamada  */
656f86e39SMasahiro Yamada #include <common.h>
756f86e39SMasahiro Yamada #include <asm/arch/cpu.h>
856f86e39SMasahiro Yamada 
956f86e39SMasahiro Yamada #define FEROCEON_EXTRA_FEATURE_L2C_EN (1<<22)
1056f86e39SMasahiro Yamada 
l2_cache_disable()1156f86e39SMasahiro Yamada void l2_cache_disable()
1256f86e39SMasahiro Yamada {
1356f86e39SMasahiro Yamada 	u32 ctrl;
1456f86e39SMasahiro Yamada 
1556f86e39SMasahiro Yamada 	ctrl = readfr_extra_feature_reg();
1656f86e39SMasahiro Yamada 	ctrl &= ~FEROCEON_EXTRA_FEATURE_L2C_EN;
1756f86e39SMasahiro Yamada 	writefr_extra_feature_reg(ctrl);
1856f86e39SMasahiro Yamada }
19