Debian Codegraph @

src/mainboard/cavium/cn8100_sff_evb/bootblock.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <bootblock_common.h>
4 #include <soc/soc.h>
5 #include <soc/spi.h>
6 #include <soc/uart.h>
7
8 void bootblock_mainboard_early_init(void)
9 {
10 if (CONFIG(BOOTBLOCK_CONSOLE)) {
11 if (!uart_is_enabled(CONFIG_UART_FOR_CONSOLE))
12 uart_setup(CONFIG_UART_FOR_CONSOLE, CONFIG_TTYS0_BAUD);
13 }
14 }
15
16 static void configure_spi_flash(void)
17 {
18 /* FIXME: Only tested on EM100 Pro */
19 spi_init_custom(0, // bus
20 25000000, // speed Hz
21 0, // idle low disabled
22 0, // zero idle cycles between transfers
23 0, // MSB first
24 0, // Chip select 0
25 1); // assert is high
26 }
27
28 void bootblock_mainboard_init(void)
29 {
30 configure_spi_flash();
31 }