]> git.ipfire.org Git - thirdparty/u-boot.git/blame - arch/arm/mach-npcm/npcm7xx/l2_cache_pl310.c
Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
[thirdparty/u-boot.git] / arch / arm / mach-npcm / npcm7xx / l2_cache_pl310.c
CommitLineData
84335544
JL
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (c) 2021 Nuvoton Technology Corp.
4 */
5
d678a59d 6#include <common.h>
84335544
JL
7#include <asm/io.h>
8#include <asm/pl310.h>
9
10void l2_pl310_init(void);
11
12void set_pl310_ctrl(u32 enable)
13{
65cc0e2a 14 struct pl310_regs *const pl310 = (struct pl310_regs *)CFG_SYS_PL310_BASE;
84335544
JL
15
16 writel(enable, &pl310->pl310_ctrl);
17}
18
19void v7_outer_cache_enable(void)
20{
21 l2_pl310_init();
22
23 set_pl310_ctrl(1);
24}
25
26void v7_outer_cache_disable(void)
27{
28 set_pl310_ctrl(0);
29}