Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/arm/mach-at91/sama5.c
52361 views
1
// SPDX-License-Identifier: GPL-2.0-or-later
2
/*
3
* Setup code for SAMA5
4
*
5
* Copyright (C) 2013 Atmel,
6
* 2013 Ludovic Desroches <[email protected]>
7
*/
8
9
#include <asm/hardware/cache-l2x0.h>
10
#include <asm/mach/arch.h>
11
#include <asm/mach/map.h>
12
#include <asm/outercache.h>
13
#include <asm/system_misc.h>
14
15
#include "generic.h"
16
#include "sam_secure.h"
17
18
static void sama5_l2c310_write_sec(unsigned long val, unsigned reg)
19
{
20
/* OP-TEE configures the L2 cache and does not allow modifying it yet */
21
}
22
23
static void __init sama5_secure_cache_init(void)
24
{
25
sam_secure_init();
26
if (IS_ENABLED(CONFIG_OUTER_CACHE) && sam_linux_is_optee_available())
27
outer_cache.write_sec = sama5_l2c310_write_sec;
28
}
29
30
static const char *const sama5_dt_board_compat[] __initconst = {
31
"atmel,sama5",
32
NULL
33
};
34
35
DT_MACHINE_START(sama5_dt, "Atmel SAMA5")
36
/* Maintainer: Atmel */
37
.init_late = sama5_pm_init,
38
.dt_compat = sama5_dt_board_compat,
39
MACHINE_END
40
41
static const char *const sama5_alt_dt_board_compat[] __initconst = {
42
"atmel,sama5d4",
43
NULL
44
};
45
46
DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5")
47
/* Maintainer: Atmel */
48
.init_late = sama5_pm_init,
49
.dt_compat = sama5_alt_dt_board_compat,
50
.l2c_aux_mask = ~0UL,
51
MACHINE_END
52
53
static const char *const sama5d2_compat[] __initconst = {
54
"atmel,sama5d2",
55
NULL
56
};
57
58
DT_MACHINE_START(sama5d2, "Atmel SAMA5")
59
/* Maintainer: Atmel */
60
.init_early = sama5_secure_cache_init,
61
.init_late = sama5d2_pm_init,
62
.dt_compat = sama5d2_compat,
63
.l2c_aux_mask = ~0UL,
64
MACHINE_END
65
66