1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * Derived from Cavium's BSD-3 Clause OCTEONTX-SDK-6.2.0.
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 */
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 */
32 /* Set watchdog to 5 seconds timeout */
33 watchdog_set(0, 5000);
36 /* TODO: additional clock init? */