Debian Codegraph @

src/soc/cavium/cn81xx/bootblock.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 /*
4 * Derived from Cavium's BSD-3 Clause OCTEONTX-SDK-6.2.0.
5 */
6
7 #include <commonlib/helpers.h>
8 #include <soc/bootblock.h>
9 #include <soc/sysreg.h>
10 #include <soc/timer.h>
11 #include <libbdk-arch/bdk-asm.h>
12
13 static void init_sysreg(void)
14 {
15 /* The defaults for write buffer timeouts are poor */
16 u64 cvmmemctl0;
17 BDK_MRS(s3_0_c11_c0_4, cvmmemctl0);
18 cvmmemctl0 |= AP_CVMMEMCTL0_EL1_WBFTONSHENA |
19 AP_CVMMEMCTL0_EL1_WBFTOMRGCLRENA;
20 BDK_MSR(s3_0_c11_c0_4, cvmmemctl0);
21 }
22
23 void bootblock_soc_early_init(void)
24 {
25 }
26
27 void bootblock_soc_init(void)
28 {
29 /* initialize system registers */
30 init_sysreg();
31
32 /* Set watchdog to 5 seconds timeout */
33 watchdog_set(0, 5000);
34 watchdog_poke(0);
35
36 /* TODO: additional clock init? */
37 }