mb/system76/cml-u/dt: Make use of chipset devicetree
[coreboot.git] / src / soc / cavium / cn81xx / bootblock.c
blobeac8bd040d73eb63bfaa8c184932fb19b12caac8
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 /*
4 * Derived from Cavium's BSD-3 Clause OCTEONTX-SDK-6.2.0.
5 */
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>
13 static void init_sysreg(void)
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);
23 void bootblock_soc_early_init(void)
27 void bootblock_soc_init(void)
29 /* initialize system registers */
30 init_sysreg();
32 /* Set watchdog to 5 seconds timeout */
33 watchdog_set(0, 5000);
34 watchdog_poke(0);
36 /* TODO: additional clock init? */