diff options
Diffstat (limited to 'src/soc/marvell/mvmap2315/bootblock.c')
-rw-r--r-- | src/soc/marvell/mvmap2315/bootblock.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/soc/marvell/mvmap2315/bootblock.c b/src/soc/marvell/mvmap2315/bootblock.c index 5aa9eb547b..47bf470abb 100644 --- a/src/soc/marvell/mvmap2315/bootblock.c +++ b/src/soc/marvell/mvmap2315/bootblock.c @@ -17,11 +17,15 @@ #include <stdint.h> #include <stdlib.h> +#include <arch/io.h> #include <bootblock_common.h> #include <console/console.h> #include <timestamp.h> #include <console/uart.h> +#include <soc/addressmap.h> +#include <soc/bdb.h> #include <soc/gic.h> +#include <soc/load_validate.h> #include <soc/uart.h> void bootblock_soc_early_init(void) @@ -37,10 +41,32 @@ void bootblock_soc_early_init(void) void bootblock_soc_init(void) { + struct bdb_pointer bdb_info; + + write32((void *)MVMAP2315_BOOTBLOCK_CB1, 0); + write32((void *)MVMAP2315_BOOTBLOCK_CB2, 0); + + set_bdb_pointers((u8 *)MVMAP2315_BDB_LCM_BASE, &bdb_info); + + printk(BIOS_DEBUG, "loading and validating APMU firmware.\n"); + load_and_validate(&bdb_info, APMU_FIRMWARE); + + printk(BIOS_DEBUG, "loading and validating MCU firmware.\n"); + load_and_validate(&bdb_info, MCU_FIRMWARE); + /* initializing UART1 to free UART0 to be used by romstage */ uart_num = 1; uart_init(uart_num); + while (read32((void *)MVMAP2315_BOOTBLOCK_CB1) != 0x4) + ; + + printk(BIOS_DEBUG, "loading and validating AP_RW firmware.\n"); + load_and_validate(&bdb_info, AP_RW_FIRMWARE); + + write32((void *)MVMAP2315_BOOTBLOCK_CB2, 0x4) + ; + while (1) ; } |