| 1 |
|
| 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 |
|
| 19 |
spi_init_custom(0, |
| 20 |
25000000, |
| 21 |
0, |
| 22 |
0, |
| 23 |
0, |
| 24 |
0, |
| 25 |
1); |
| 26 |
} |
| 27 |
|
| 28 |
void bootblock_mainboard_init(void) |
| 29 |
{ |
| 30 |
configure_spi_flash(); |
| 31 |
} |