soc: Remove copyright notices
[coreboot.git] / src / soc / cavium / cn81xx / bootblock.c
blobd65fbe520dfc333a39ec4499effd5701291dc535
1 /*
2 * This file is part of the coreboot project.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 2 of the License.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * Derived from Cavium's BSD-3 Clause OCTEONTX-SDK-6.2.0.
17 #include <commonlib/helpers.h>
18 #include <soc/bootblock.h>
19 #include <soc/sysreg.h>
20 #include <soc/timer.h>
21 #include <libbdk-arch/bdk-asm.h>
23 static void init_sysreg(void)
25 /* The defaults for write buffer timeouts are poor */
26 u64 cvmmemctl0;
27 BDK_MRS(s3_0_c11_c0_4, cvmmemctl0);
28 cvmmemctl0 |= AP_CVMMEMCTL0_EL1_WBFTONSHENA |
29 AP_CVMMEMCTL0_EL1_WBFTOMRGCLRENA;
30 BDK_MSR(s3_0_c11_c0_4, cvmmemctl0);
33 void bootblock_soc_early_init(void)
37 void bootblock_soc_init(void)
39 /* initialize system registers */
40 init_sysreg();
42 /* Set watchdog to 5 seconds timeout */
43 watchdog_set(0, 5000);
44 watchdog_poke(0);
46 /* TODO: additional clock init? */