blob: 16b0aa7bf572a635f460b15c193d7773d1155d4e [file] [log] [blame]
Andrei Narkevitchb0be4612020-01-27 17:26:19 -08001/*
2 * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include "target_cfg.h"
9#include "cmsis.h"
10#include "Driver_Flash.h"
11#include "flash_layout.h"
12
13/* Flash device name must be specified by target */
14extern ARM_DRIVER_FLASH FLASH_DEV_NAME;
15
16/* bootloader platform-specific hw initialization */
17__WEAK int32_t boot_platform_init(void)
18{
19 int32_t result;
20
21 result = FLASH_DEV_NAME.Initialize(NULL);
22 if (result == ARM_DRIVER_OK) {
23 return 0;
24 }
25
26 return 1;
27}